httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apple.com>
Subject [PATCH] Rhapsody port
Date Mon, 22 Jun 1998 05:58:23 GMT
  The following patches are system-specific patches which are needed to build Apache 1.3.0
on Rhapsody. Of note:

 - The change to httpd_main.c is a hack; I dodn't know what the correct fix is.
   The problem is that you are using a gcc-ism which isn't in our version of gcc.
   Probably should be #if defined(__GNUC__) && TheRightVersion. I don't know what
   version that would be.

 - Use of __private_extern__. This is #defined to nothing for other than Rhapsody
   of OpenStep systems. This tells the dynamic linker that a symbol is locally
   scoped to the current library or executable (private, not exported) and is needed
   in cases where a dylib you are using contains symbols which conflict with your
   code (eg. regex routines in the System framework). This fix allows us to build
   with the LD_PREBIND environment variable set, which tells the linker to "prebind"
   symbols in your binary at compile time. Assuming the dylib doesn't change
   underneath you, this is a big launch-time optimization. (dyld does so the right
   thing and ignores prebinding if your dylib changes, but you loose the
   optimization, of course.) The only dylib currently used by Apache is the System
   framework (contains BSD libs).

 - I didn't have time to implement DSO support. Maybe later.

 - I haven't enabled HAVE_MMAP, although I probably can at this point. mmap() was
   added in DR2, but I haven't gotten around to testing it with Apache. Looks like
   there have been changes in Apache wrt how one enables mmap()...

	-Fred
	 Rhapsody Core Operating Systems Group
	 wsanchez@apple.com, 408.974-5174
	 2 Infinite Loop 302-4K, Cupertino, CA 95014


Index: CoreOS/Services/apache/apache/src/Configure
diff -u CoreOS/Services/apache/apache/src/Configure:1.1.1.4 CoreOS/Services/apache/apache/src/Configure:1.14
--- CoreOS/Services/apache/apache/src/Configure:1.1.1.4	Tue Jun 16 08:35:26 1998
+++ CoreOS/Services/apache/apache/src/Configure	Sun Jun 21 19:28:35 1998
@@ -489,6 +489,11 @@
 	RANLIB="sleep 5; /bin/ranlib"
 	# ranlib on most NeXTs sets the time wrong. 5 secs wait does much good
 	;;
+    *-apple-rhapsody*)
+	OS='Rhapsody'
+	CFLAGS="$CFLAGS -DRHAPSODY"
+	DEF_WANTHSREGEX=yes
+	;;
     *-dec-osf*)
 	OS='DEC OSF/1'
 	CFLAGS="$CFLAGS -DOSF1"
Index: CoreOS/Services/apache/apache/src/helpers/GuessOS
diff -u CoreOS/Services/apache/apache/src/helpers/GuessOS:1.1.1.3 CoreOS/Services/apache/apache/src/helpers/GuessOS:1.5
--- CoreOS/Services/apache/apache/src/helpers/GuessOS:1.1.1.3	Tue Jun 16 08:35:35 1998
+++ CoreOS/Services/apache/apache/src/helpers/GuessOS	Tue Jun 16 11:10:40 1998
@@ -225,6 +225,13 @@
 	echo "${MACHINE}-tandem-sysv4"; exit 0;
 	;;

+    Rhapsody:*:*:*)
+	case "${MACHINE}" in
+	    Power*) MACHINE=powerpc ;;
+	esac
+	echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0
+	;;
+
     "RISC iX":*)
 	echo "arm-whatever-riscix"; exit 0;
 	;;
Index: CoreOS/Services/apache/apache/src/include/conf.h
diff -u CoreOS/Services/apache/apache/src/include/conf.h:1.1.1.1 CoreOS/Services/apache/apache/src/include/conf.h:1.3
--- CoreOS/Services/apache/apache/src/include/conf.h:1.1.1.1	Tue Jun 16 08:35:37 1998
+++ CoreOS/Services/apache/apache/src/include/conf.h	Sun Jun 21 19:28:37 1998
@@ -362,6 +362,65 @@
 #define NO_USE_SIGACTION
 #define HAVE_SYSLOG 1

+#elif defined(RHAPSODY)
+#define HAVE_GMTOFF
+/*
+ * #define HAVE_MMAP
+ * #undef  MAP_ANON // Currently not implemented by mmap() as of DR2
+ */
+#define HAVE_RESOURCE
+#define HAVE_SYS_RESOURCE_H
+#define HAVE_SYS_SELECT_H
+#define HAVE_SNPRINTF
+#define JMP_BUF jmp_buf
+#define USE_LONGJMP
+#define NO_USE_SIGACTION
+#ifndef HTTPD_ROOT
+#define HTTPD_ROOT              "/Local/Library/WebServer"
+#endif
+#ifndef DOCUMENT_LOCATION
+#define DOCUMENT_LOCATION       HTTPD_ROOT "/Documents"
+#endif
+#ifndef DEFAULT_XFERLOG
+#define DEFAULT_XFERLOG         "Logs/Access"
+#endif
+#ifndef DEFAULT_ERRORLOG
+#define DEFAULT_ERRORLOG        "Logs/Errors"
+#endif
+#ifndef DEFAULT_PIDLOG
+#define DEFAULT_PIDLOG          "Logs/Process"
+#endif
+#ifndef DEFAULT_SCOREBOARD
+#define DEFAULT_SCOREBOARD      "Logs/Status"
+#endif
+#ifndef DEFAULT_LOCKFILE
+#define DEFAULT_LOCKFILE        "Logs/Lock"
+#endif
+#ifndef SERVER_CONFIG_FILE
+#define SERVER_CONFIG_FILE      "Configuration/Server"
+#endif
+#ifndef RESOURCE_CONFIG_FILE
+#define RESOURCE_CONFIG_FILE    "Configuration/Resources"
+#endif
+#ifndef TYPES_CONFIG_FILE
+#define TYPES_CONFIG_FILE       "Configuration/MIME"
+#endif
+#ifndef ACCESS_CONFIG_FILE
+#define ACCESS_CONFIG_FILE      "Configuration/Access"
+#endif
+#ifndef DEFAULT_USER_DIR
+#define DEFAULT_USER_DIR        "Library/Web Documents"
+#endif
+#ifndef DEFAULT_USER
+#define DEFAULT_USER            "nobody"
+#endif
+#ifndef DEFAULT_GROUP
+#define DEFAULT_GROUP           "nogroup"
+#endif
+#ifndef DEFAULT_PATH
+#define DEFAULT_PATH            "/bin:/usr/bin:/usr/local/bin"
+#endif
+
 #elif defined(LINUX)
 #define HAVE_DLFCN_H 1

@@ -811,6 +870,15 @@
 #endif
 #ifndef CORE_EXPORT_NONSTD
 #define CORE_EXPORT_NONSTD	API_EXPORT_NONSTD
+#endif
+
+/* On OpenStep and Rhapsody, symbols that conflict with loaded dylibs
+ * (eg. System framework) need to be declared as private symbols with
+ * __private_extern__.
+ * For other systems, make that a no-op.
+ */
+#if !defined(RHAPSODY) && !defined(NEXT)
+#define __private_extern__
 #endif

 /* So that we can use inline on some critical functions, and use
Index: CoreOS/Services/apache/apache/src/main/http_main.c
diff -u CoreOS/Services/apache/apache/src/main/http_main.c:1.1.1.1 CoreOS/Services/apache/apache/src/main/http_main.c:1.2
--- CoreOS/Services/apache/apache/src/main/http_main.c:1.1.1.1	Tue Jun 16 08:35:38 1998
+++ CoreOS/Services/apache/apache/src/main/http_main.c	Sun Jun 21 19:28:38 1998
@@ -412,7 +412,11 @@
 static APACHE_TLS int volatile exit_after_unblock = 0;

 /* a clean exit from a child with proper cleanup */
+#ifdef RHAPSODY
+static void clean_child_exit(int code)
+#else
 static void __attribute__((noreturn)) clean_child_exit(int code)
+#endif
 {
     if (pchild) {
 	ap_child_exit_modules(pchild, server_conf);
@@ -1861,7 +1865,11 @@
 }

 /* a clean exit from the parent with proper cleanup */
+#ifdef RHAPSODY
+static void clean_parent_exit(int code)
+#else
 static void __attribute__((noreturn)) clean_parent_exit(int code)
+#endif
 {
     /* Clear the pool - including any registered cleanups */
     ap_destroy_pool(pconf);
Index: CoreOS/Services/apache/apache/src/regex/regcomp.c
diff -u CoreOS/Services/apache/apache/src/regex/regcomp.c:1.1.1.2 CoreOS/Services/apache/apache/src/regex/regcomp.c:1.4
--- CoreOS/Services/apache/apache/src/regex/regcomp.c:1.1.1.2	Tue Jun 16 08:35:55 1998
+++ CoreOS/Services/apache/apache/src/regex/regcomp.c	Tue Jun 16 11:10:46 1998
@@ -82,6 +82,7 @@
  = #define	REG_PEND	0040
  = #define	REG_DUMP	0200
  */
+__private_extern__
 API_EXPORT(int)			/* 0 success, otherwise REG_something */
 regcomp(preg, pattern, cflags)
 regex_t *preg;
Index: CoreOS/Services/apache/apache/src/regex/regexec.c
diff -u CoreOS/Services/apache/apache/src/regex/regexec.c:1.1.1.2 CoreOS/Services/apache/apache/src/regex/regexec.c:1.4
--- CoreOS/Services/apache/apache/src/regex/regexec.c:1.1.1.2	Tue Jun 16 08:35:59 1998
+++ CoreOS/Services/apache/apache/src/regex/regexec.c	Tue Jun 16 11:10:47 1998
@@ -111,6 +111,7 @@
  * when choosing which matcher to call.  Also, by this point the matchers
  * have been prototyped.
  */
+__private_extern__
 API_EXPORT(int)				/* 0 success, REG_NOMATCH failure */
 regexec(preg, string, nmatch, pmatch, eflags)
 const regex_t *preg;
Index: CoreOS/Services/apache/apache/src/regex/regfree.c
diff -u CoreOS/Services/apache/apache/src/regex/regfree.c:1.1.1.2 CoreOS/Services/apache/apache/src/regex/regfree.c:1.4
--- CoreOS/Services/apache/apache/src/regex/regfree.c:1.1.1.2	Tue Jun 16 08:36:00 1998
+++ CoreOS/Services/apache/apache/src/regex/regfree.c	Tue Jun 16 11:10:48 1998
@@ -10,6 +10,7 @@
  - regfree - free everything
  = API_EXPORT(void) regfree(regex_t *);
  */
+__private_extern__
 API_EXPORT(void)
 regfree(preg)
 regex_t *preg;

Mime
View raw message