--- old/exception_lists/check_rtime	Wed Aug  8 20:59:26 2012
+++ new/exception_lists/check_rtime	Wed Aug  8 20:59:25 2012
@@ -47,7 +47,7 @@
 
 # Individual files that we don't examine
 SKIP		^boot/grub/bin/grub$
-SKIP		^usr/apache/libexec/mod_ipp.so$	# Apache loadable module
+SKIP		^usr/apache2/2.2/libexec/mod_ipp.so$	# Apache loadable module
 # USIII specific extns. cause ldd noise on USII bld. m/c
 SKIP		^usr/lib/fps/sun4u/UltraSPARC.*/fptest$
 SKIP		^usr/MACH(lib)/lddstub$		# lddstub has no dependencies
--- old/exception_lists/interface_check	Wed Aug  8 20:59:27 2012
+++ new/exception_lists/interface_check	Wed Aug  8 20:59:27 2012
@@ -43,7 +43,7 @@
 # Plugins are not required to have versioned file names, and are not required
 # to be internally versioned.
 #
-PLUGIN		^usr/apache/libexec
+PLUGIN		^usr/apache2/2.2/libexec
 PLUGIN		^usr/lib/devfsadm
 PLUGIN		^usr/lib/efcode/.*\.so$
 PLUGIN		^usr/lib/elfedit
--- old/usr/src/cmd/logadm/glob.c	Wed Aug  8 20:59:28 2012
+++ new/usr/src/cmd/logadm/glob.c	Wed Aug  8 20:59:27 2012
@@ -30,7 +30,7 @@
  * 	*.c
  * 	/var/log/syslog.?
  * 	log[0-9]*file
- * 	/var/apache/logs/x*{access,error}_log
+ * 	/var/apache2/2.2/logs/x*{access,error}_log
  *
  * this is basically the same syntax that csh supports for globs and
  * is provided by the routine glob_glob() which takes a filename and
@@ -62,8 +62,6 @@
  * braces, and don't support the more powerful reglobs required by logadm.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <libintl.h>
 #include <stdlib.h>
--- old/usr/src/cmd/logadm/main.c	Wed Aug  8 20:59:29 2012
+++ new/usr/src/cmd/logadm/main.c	Wed Aug  8 20:59:28 2012
@@ -651,10 +651,10 @@
 			 * it is part of a specific entry for the log
 			 * file name.  this handles the case where the
 			 * logname is "apache", it supplies a log file
-			 * name like "/var/apache/logs/[a-z]*_log",
-			 * which expands to multiple file names.  if one
-			 * of the file names is "/var/apache/logs/access_log"
-			 * the the -P will be attached to a line with that
+			 * name like "/var/apache2/2.2/logs/[a-z]*_log",
+			 * which expands to multiple file names.  if one of
+			 * the file names is "/var/apache2/2.2/logs/access_log"
+			 * then the -P will be attached to a line with that
 			 * logname in the conf file.
 			 */
 			if (opts_count(opts, "P")) {
--- old/usr/src/cmd/logadm/tester	Wed Aug  8 20:59:30 2012
+++ new/usr/src/cmd/logadm/tester	Wed Aug  8 20:59:29 2012
@@ -288,13 +288,13 @@
 # The entry below is used by turnacct(1M)
 #
 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
-apache -C 24 -a '/usr/apache/bin/apachectl graceful' -p 1m -t '/var/apache/old-logs/$basename.%Y-%m' '/var/apache/logs/*{access,error}_log'
+apache -C 24 -a '/usr/apache2/2.2/bin/apachectl graceful' -p 1m -t '/var/apache2/2.2/old-logs/$basename.%Y-%m' '/var/apache2/2.2/logs/*{access,error}_log'
 /var/log/syslog -C 8 -P 'Thu Nov  1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
-/var/apache/logs/access_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/error_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/suexec_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/mod_jserv.log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/jserv.log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/access_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/error_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/suexec_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/mod_jserv.log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/jserv.log -P 'Thu Nov  1 08:27:56 2001'
 EOF
 }
 
@@ -822,13 +822,13 @@
 /var/cron/log -s 512k -t /var/cron/olog
 /var/lp/logs/lpsched -C 2 -N -t '$file.$N'
 /var/adm/pacct -C 0 -a '/usr/lib/acct/accton pacct' -g adm -m 664 -o adm -p never
-apache -C 24 -a '/usr/apache/bin/apachectl graceful' -p 1m -t '/var/apache/old-logs/$basename.%Y-%m' '/var/apache/logs/*{access,error}_log'
+apache -C 24 -a '/usr/apache2/2.2/bin/apachectl graceful' -p 1m -t '/var/apache2/2.2/old-logs/$basename.%Y-%m' '/var/apache2/2.2/logs/*{access,error}_log'
 /var/log/syslog -C 8 -P 'Thu Nov  1 09:16:38 2001' -a 'kill -HUP `cat /var/run/syslog.pid`'
-/var/apache/logs/access_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/error_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/suexec_log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/mod_jserv.log -P 'Thu Nov  1 08:27:56 2001'
-/var/apache/logs/jserv.log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/access_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/error_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/suexec_log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/mod_jserv.log -P 'Thu Nov  1 08:27:56 2001'
+/var/apache2/2.2/logs/jserv.log -P 'Thu Nov  1 08:27:56 2001'
 EOF
 
 	set_file('checktest', <<'EOF');
--- old/usr/src/cmd/lp/cmd/lpsched/print-svc	Wed Aug  8 20:59:31 2012
+++ new/usr/src/cmd/lp/cmd/lpsched/print-svc	Wed Aug  8 20:59:30 2012
@@ -120,7 +120,7 @@
 	FMRI=$2
 	IPP_FMRI="svc:/application/print/ipp-listener:default"
 	RFC1179_FMRI="svc:/application/print/rfc1179:default"
-	IPP_CONF=/etc/apache/httpd-standalone-ipp.conf
+	IPP_CONF=/etc/apache2/2.2/httpd-standalone-ipp.conf
 	ip="any"
 
 	policy=`get_policy $FMRI`
--- old/usr/src/lib/print/libipp-listener/common/ipp-listener.c	Wed Aug  8 20:59:32 2012
+++ new/usr/src/lib/print/libipp-listener/common/ipp-listener.c	Wed Aug  8 20:59:31 2012
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -27,8 +28,6 @@
 
 /* $Id: ipp-listener.c 146 2006-03-24 00:26:54Z njacobs $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -151,7 +150,7 @@
 };
 
 static int
-ipp_operation_name_to_index(char *name)
+ipp_operation_name_to_index(const char *name)
 {
 	int i;
 
@@ -233,7 +232,7 @@
 }
 
 static char
-type_to_boolean(char *type)
+type_to_boolean(const char *type)
 {
 	char result = PAPI_FALSE;
 
@@ -276,7 +275,7 @@
 }
 
 papi_status_t
-ipp_configure_operation(papi_attribute_t ***list, char *operation, char *type)
+ipp_configure_operation(papi_attribute_t ***list, const char *operation, const char *type)
 {
 	papi_status_t result = PAPI_OPERATION_NOT_SUPPORTED;
 	char boolean = PAPI_FALSE;
--- old/usr/src/lib/print/libipp-listener/common/ipp-listener.h	Wed Aug  8 20:59:33 2012
+++ new/usr/src/lib/print/libipp-listener/common/ipp-listener.h	Wed Aug  8 20:59:32 2012
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -30,8 +31,6 @@
 
 /* $Id: ipp-listener.h 146 2006-03-24 00:26:54Z njacobs $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #ifdef	__cplusplus
 extern "C" {
 #endif
@@ -40,7 +39,8 @@
 
 /* exported functions */
 extern papi_status_t ipp_configure_operation(papi_attribute_t ***list,
-						char *operation, char *type);
+						const char *operation,
+						const char *type);
 extern papi_status_t ipp_process_request(papi_attribute_t **request,
 					papi_attribute_t ***response,
 					ipp_reader_t iread, void *fd);
--- old/usr/src/lib/print/libpapi-common/common/attribute.c	Wed Aug  8 20:59:34 2012
+++ new/usr/src/lib/print/libpapi-common/common/attribute.c	Wed Aug  8 20:59:33 2012
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -27,8 +28,6 @@
 
 /* $Id: attribute.c 157 2006-04-26 15:07:55Z ktou $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*LINTLIBRARY*/
 
 #include <stdio.h>
@@ -203,7 +202,7 @@
 }
 
 static papi_attribute_t *
-papiAttributeAlloc(char *name, papi_attribute_value_type_t type)
+papiAttributeAlloc(const char *name, papi_attribute_value_type_t type)
 {
 	papi_attribute_t *result = NULL;
 
@@ -238,7 +237,7 @@
 
 papi_status_t
 papiAttributeListAddValue(papi_attribute_t ***list, int flgs,
-		char *name, papi_attribute_value_type_t type,
+		const char *name, papi_attribute_value_type_t type,
 		papi_attribute_value_t *value)
 {
 	papi_status_t result;
@@ -318,7 +317,7 @@
 
 papi_status_t
 papiAttributeListAddBoolean(papi_attribute_t ***list, int flags,
-			char *name, char boolean)
+			const char *name, char boolean)
 {
 	papi_attribute_value_t v;
 
@@ -402,7 +401,7 @@
 }
 
 papi_attribute_t *
-papiAttributeListFind(papi_attribute_t **list, char *name)
+papiAttributeListFind(papi_attribute_t **list, const char *name)
 {
 	int i;
 	if ((list == NULL) || (name == NULL))
--- old/usr/src/lib/print/libpapi-common/common/papi.h	Wed Aug  8 20:59:35 2012
+++ new/usr/src/lib/print/libpapi-common/common/papi.h	Wed Aug  8 20:59:34 2012
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -30,8 +31,6 @@
 
 /* $Id: papi.h 161 2006-05-03 04:32:59Z njacobs $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/types.h>
 #include <time.h>
 #include <stdio.h>
@@ -256,7 +255,7 @@
 
 /*	Attribute related	 */
 extern papi_status_t papiAttributeListAddValue(papi_attribute_t ***attrs,
-					int flags, char *name,
+					int flags, const char *name,
 					papi_attribute_value_type_t type,
 					papi_attribute_value_t *value);
 extern papi_status_t papiAttributeListAddString(papi_attribute_t ***attrs,
@@ -264,7 +263,7 @@
 extern papi_status_t papiAttributeListAddInteger(papi_attribute_t ***attrs,
 					int flags, char *name, int integer);
 extern papi_status_t papiAttributeListAddBoolean(papi_attribute_t ***attrs,
-					int flags, char *name, char boolean);
+					int flags, const char *name, char boolean);
 extern papi_status_t papiAttributeListAddRange(papi_attribute_t ***attrs,
 					int flags, char *name,
 					int lower, int upper);
@@ -311,7 +310,7 @@
 					void **iterator, char *name,
 					papi_metadata_t *vptr);
 extern papi_attribute_t *papiAttributeListFind(papi_attribute_t **list,
-					char *name);
+					const char *name);
 extern papi_attribute_t *papiAttributeListGetNext(papi_attribute_t **list,
 					void **iterator);
 extern void papiAttributeListFree(papi_attribute_t **attributes);
--- old/usr/src/lib/print/mod_ipp/Makefile	Wed Aug  8 20:59:36 2012
+++ new/usr/src/lib/print/mod_ipp/Makefile	Wed Aug  8 20:59:35 2012
@@ -19,22 +19,23 @@
 # CDDL HEADER END
 #
 #
+# Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
-LIBRARY =		mod_ipp.a
+LIBRARY =	mod_ipp.a
 VERS =
-OBJECTS = mod_ipp.o
+OBJECTS =	mod_ipp.o
 
 include ../../Makefile.lib
 include ../../Makefile.rootfs
 
-APACHEMODDIR =	$(ROOT)/usr/apache/libexec
-APACHECONFDIR =	$(ROOT)/etc/apache
+APACHEMODDIR =	$(ROOT)/usr/apache2/2.2/libexec
+APACHECONFDIR =	$(ROOT)/etc/apache2/2.2
 LISTENERDIR =	$(ROOT)/var/lp/ipp-listener
 
-ROOTDIRS =	$(ROOT)/usr/apache $(APACHEMODDIR) $(APACHECONFDIR) \
+ROOTDIRS =	$(ROOT)/usr/apache2/2.2 $(APACHEMODDIR) $(APACHECONFDIR) \
 		$(ROOT)/var/lp $(LISTENERDIR)
 
 $(ROOT)/var/lp:=	DIRMODE = 775
@@ -44,11 +45,14 @@
 
 SRCS = $(OBJECTS:%.o = %.c)
 
-
-CFLAGS +=	$(CCVERBOSE)
+APR_INC.cmd = 	apr-1-config --includes
+APU_INC.cmd = 	apu-1-config --includes
+CFLAGS +=	$(CCVERBOSE) -erroff=E_IMPLICIT_DECL_FUNC_RETURN_INT
 CPPFLAGS +=	-I../libipp-listener/common
 CPPFLAGS +=	-I../libipp-core/common
-CPPFLAGS +=	-I/usr/apache/include
+CPPFLAGS +=	-I/usr/apache2/2.2/include
+CPPFLAGS +=	$(APR_INC.cmd:sh)
+CPPFLAGS +=	$(APU_INC.cmd:sh)
 CPPFLAGS +=	-DEAPI
 ZDEFS =		$(ZNODEFS)
 
--- old/usr/src/lib/print/mod_ipp/mod_ipp.c	Wed Aug  8 20:59:37 2012
+++ new/usr/src/lib/print/mod_ipp/mod_ipp.c	Wed Aug  8 20:59:36 2012
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2012 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
@@ -27,8 +28,6 @@
 
 /* $Id: mod_ipp.c 149 2006-04-25 16:55:01Z njacobs $ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 /*
  * Internet Printing Protocol (IPP) module for Apache.
  */
@@ -51,7 +50,7 @@
 #include "papi.h"
 #ifndef APACHE_RELEASE	/* appears to only exist in Apache 1.X */
 #define	APACHE2
-#include "apr_compat.h"
+#define ap_table_get apr_table_get
 #endif
 
 #include <papi.h>
@@ -194,7 +193,7 @@
 	va_end(args);
 
 #ifdef APACHE2
-	ap_log_rerror(file, line, level, NULL, r, message);
+	ap_log_rerror(file, line, level, APR_SUCCESS, r, message);
 #else
 	ap_log_rerror(file, line, level, r, message);
 #endif
@@ -288,6 +287,7 @@
 					config->default_svc);
 	}
 
+#ifndef APACHE2
 	/*
 	 * For Trusted Solaris, pass the fd number of the socket connection
 	 * to the backend so the it can be forwarded to the backend print
@@ -296,6 +296,7 @@
 	 */
 	(void) papiAttributeListAddInteger(&request, PAPI_ATTR_EXCL,
 			"peer-socket", ap_bfileno(r->connection->client, B_RD));
+#endif
 
 	/* process the request */
 	status = ipp_process_request(request, &response, read_data, r);
@@ -399,7 +400,7 @@
 
 /*ARGSUSED0*/
 static const char *
-ipp_operation(cmd_parms *cmd, void *cfg, char *op, char *toggle)
+ipp_operation(cmd_parms *cmd, void *cfg, const char *op, const char *toggle)
 {
 	IPPListenerConfig *config = (IPPListenerConfig *)cfg;
 	papi_status_t status;
--- old/usr/src/man/man1m/logadm.1m	Wed Aug  8 20:59:38 2012
+++ new/usr/src/man/man1m/logadm.1m	Wed Aug  8 20:59:37 2012
@@ -827,9 +827,9 @@
 .in +2
 .nf
  % logadm -w apache -p 1m -C 24\e
-     -t '/var/apache/old-logs/$basename.%Y-%m'\e
-     -a '/usr/apache/bin/apachectl graceful'\e
-     '/var/apache/logs/*{access,error}_log'
+     -t '/var/apache2/2.2/old-logs/$basename.%Y-%m'\e
+     -a '/usr/apache2/2.2/bin/apachectl graceful'\e
+     '/var/apache2/2.2/logs/*{access,error}_log'
 .fi
 .in -2
 .sp
@@ -867,7 +867,7 @@
 .sp
 .in +2
 .nf
-logadm -w apache /var/apache/logs/*_log
+logadm -w apache /var/apache2/2.2/logs/*_log
 .fi
 .in -2
 .sp
--- old/usr/src/man/man4/mod_ipp.4	Wed Aug  8 20:59:39 2012
+++ new/usr/src/man/man4/mod_ipp.4	Wed Aug  8 20:59:38 2012
@@ -11,7 +11,7 @@
 .SH SYNOPSIS
 .LP
 .nf
-\fB/usr/apache/libexec/mod_ipp.so\fR
+\fB/usr/apache2/2.2/libexec/mod_ipp.so\fR
 .fi
 
 .SH DESCRIPTION
@@ -252,7 +252,7 @@
 .in +2
 .nf
 ServerType standalone
-ServerRoot "/usr/apache"
+ServerRoot "/usr/apache2/2.2"
 PidFile /var/run/httpd-standalone-ipp.pid
 ErrorLog /var/lp/logs/ipp-errors
 
@@ -391,6 +391,6 @@
 .LP
 The \fBhttpd\fR(8) man page and other Apache man pages are provided with the
 programming modules. To view the Apache manual pages with the man command, add
-\fB/usr/apache/man\fR to the \fBMANPATH\fR environment variable. See
+\fB/usr/apache2/2.2/man\fR to the \fBMANPATH\fR environment variable. See
 \fBman\fR(1) for  more information. Running \fBcatman\fR(1M) on the Apache
 manual pages is not supported.
--- old/usr/src/pkg/manifests/print-lp-ipp-ipp-listener.mf	Wed Aug  8 20:59:40 2012
+++ new/usr/src/pkg/manifests/print-lp-ipp-ipp-listener.mf	Wed Aug  8 20:59:39 2012
@@ -31,7 +31,8 @@
     value=org.opensolaris.category.2008:System/Printing
 set name=variant.arch value=$(ARCH)
 dir path=etc group=sys
-dir path=etc/apache
+dir path=etc/apache2
+dir path=etc/apache2/2.2
 dir path=lib
 dir path=lib/svc
 dir path=lib/svc/manifest group=sys
@@ -38,16 +39,17 @@
 dir path=lib/svc/manifest/application group=sys
 dir path=lib/svc/manifest/application/print group=sys
 dir path=usr group=sys
-dir path=usr/apache
-dir path=usr/apache/libexec
+dir path=usr/apache2
+dir path=usr/apache2/2.2
+dir path=usr/apache2/2.2/libexec
 dir path=var group=sys
 dir path=var/lp group=lp mode=0775 owner=lp
 dir path=var/lp/ipp-listener
-file path=etc/apache/httpd-standalone-ipp.conf \
+file path=etc/apache2/2.2/httpd-standalone-ipp.conf \
     original_name=SUNWippl:etc/apache/httpd-standalone-ipp.conf preserve=true
 file path=lib/svc/manifest/application/print/ipp-listener.xml group=sys \
     mode=0444
-file path=usr/apache/libexec/mod_ipp.so mode=0555
+file path=usr/apache2/2.2/libexec/mod_ipp.so mode=0555
 file path=var/lp/ipp-listener/index.html mode=0444
 legacy pkg=SUNWipplr \
     desc="Internet Printing Protocol(IPP) Apache configuration for service module" \
