httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randy Terbush" <ra...@covalent.net>
Subject RE: [PATCH] Mac OS X Stuff v. 2.0
Date Sun, 02 May 1999 23:43:35 GMT
My 2 cents on this debate:

Vendor layouts are exactly that; "Vendor Layouts"

If the vendor wants to put everyting in /temp, then so be it.

I would think that anyone who administers these systems for a living
probably wants to put things under /usr/local and IMO
/usr/local/apache. As a group, I think we need to continue to
distribute using the currently defined default. For the non-unix
platforms out there, I suppose that we can live with the popular vote
for layout.

+1 to Fred's patch

> -----Original Message-----
> From: new-httpd-owner@apache.org
> [mailto:new-httpd-owner@apache.org]On
> Behalf Of Wilfredo Sanchez
> Sent: Sunday, May 02, 1999 4:49 PM
> To: Apache Developers
> Subject: [PATCH] Mac OS X Stuff v. 2.0
>
>
>   Same as before, minus the -DAPACI bad idea and the controversial
> default layout change.  I'm not done with that argument,
> but I think
> this here patch should be pretty uncontroversial.
>
> 	-Fred
>
>
> Index: config.layout
> ===================================================================
> RCS file: /CVSRoot/CoreOS/Services/apache/apache/config.layout,v
> retrieving revision 1.4
> retrieving revision 1.4.2.2
> diff -u -d -b -w -r1.4 -r1.4.2.2
> --- config.layout       1999/03/31 20:06:46     1.4
> +++ config.layout       1999/04/29 00:37:04     1.4.2.2
> @@ -62,17 +62,17 @@
>  </Layout>
>
>  #   Apple's Mac OS X Server Layout
> -<Layout Rhapsody>
> +<Layout Mac OS X Server>
>      prefix:        /Local/Library/WebServer
> -    exec_prefix:   /usr
> +    exec_prefix:   /usr/local
>      bindir:        $exec_prefix/bin
>      sbindir:       $exec_prefix/sbin
> -    libexecdir:    /System/Library/Apache/Modules
> +    libexecdir:    /Local/Library/Apache/Modules
>      mandir:        $exec_prefix/share/man
>      sysconfdir:    $prefix/Configuration
>      datadir:       $prefix
> -    includedir:
> /System/Library/Frameworks/Apache.framework/Versions/1.3/Headers
> -    localstatedir: /private/var
> +    includedir:
> /Local/Library/Frameworks/Apache.framework/Versions/1.3/Headers
> +    localstatedir: /var
>      runtimedir:    $prefix/Logs
>      logfiledir:    $prefix/Logs
>      proxycachedir: $prefix/ProxyCache
> Index: src/Configure
> ===================================================================
> RCS file: /CVSRoot/CoreOS/Services/apache/apache/src/Configure,v
> retrieving revision 1.23
> retrieving revision 1.23.2.1
> diff -u -d -b -w -r1.23 -r1.23.2.1
> --- Configure   1999/03/31 20:06:48     1.23
> +++ Configure   1999/04/29 00:29:46     1.23.2.1
> @@ -485,9 +485,14 @@
>         ;;
>      *-apple-rhapsody*)
>         OS='Mac OS X Server'
> -       CFLAGS="$CFLAGS -DRHAPSODY"
> +       CFLAGS="$CFLAGS -DMAC_OS_X_SERVER"
>         DEF_WANTHSREGEX=yes
>         ;;
> +    *-apple-macos*)
> +       OS='Mac OS'
> +       CFLAGS="$CFLAGS -DMAC_OS"
> +       DEF_WANTHSREGEX=yes
> +       ;;
>      *-dec-osf*)
>         OS='DEC OSF/1'
>         CFLAGS="$CFLAGS -DOSF1"
> @@ -990,7 +995,7 @@
>             LDFLAGS_SHLIB="-shared"
>             LDFLAGS_SHLIB_EXPORT="-rdynamic"
>             ;;
> -       *-apple-rhapsody*)
> +       *-apple-rhapsody* | *-apple-macos* )
>             LD_SHLIB="cc"
>             CFLAGS_SHLIB=""
>             LDFLAGS_SHLIB='$(EXTRA_LDFLAGS) -bundle
> -undefined suppress'
> Index: src/helpers/GuessOS
> ===================================================================
> RCS file:
> /CVSRoot/CoreOS/Services/apache/apache/src/helpers/GuessOS,v
> retrieving revision 1.10
> retrieving revision 1.10.2.1
> diff -u -d -b -w -r1.10 -r1.10.2.1
> --- GuessOS     1999/03/31 20:06:48     1.10
> +++ GuessOS     1999/04/29 00:29:47     1.10.2.1
> @@ -237,9 +237,14 @@
>
>      Rhapsody:*:*:*)
>         case "${MACHINE}" in
> -           Power*) MACHINE=powerpc ;;
> +           "Power Macintosh") MACHINE=powerpc ;;
>         esac
>         echo "${MACHINE}-apple-rhapsody${RELEASE}"; exit 0
> +       ;;
> +
> +    "Mac OS":*:*:*)
> +       MACHINE=`uname -p`
> +       echo "${MACHINE}-apple-macos${RELEASE}"; exit 0
>         ;;
>
>      "RISC iX":*)
> Index: src/include/ap_config.h
> ===================================================================
> RCS file:
> /CVSRoot/CoreOS/Services/apache/apache/src/include/ap_config.h,v
> retrieving revision 1.9
> diff -u -d -b -w -r1.9 ap_config.h
> --- ap_config.h 1999/03/31 20:12:39     1.9
> +++ ap_config.h 1999/05/02 21:44:57
> @@ -388,12 +388,18 @@
>  #define NO_USE_SIGACTION
>  #define HAVE_SYSLOG 1
>
> -#elif defined(RHAPSODY) /* Mac OS X Server */
> +#elif defined(MAC_OS) || defined(MAC_OS_X_SERVER) /* Mac OS (>=
> 10.0) and Mac OS X Server (<= 5.x) */
> +#define HAVE_DYLD
> +#ifdef MAC_OS_X_SERVER
> +#define DYLD_CANT_UNLOAD
> +#endif /* MAC_OS_X_SERVER */
>  #define HAVE_GMTOFF
>  #define HAVE_MMAP
>  #define USE_MMAP_FILES
>  #define USE_MMAP_SCOREBOARD
> +#ifdef MAC_OS_X_SERVER
>  #define MAP_TMPFILE
> +#endif /* MAC_OS_X_SERVER */
>  #define HAVE_RESOURCE
>  #define HAVE_SNPRINTF
>  #define JMP_BUF jmp_buf
> @@ -401,28 +407,55 @@
>  #define USE_FLOCK_SERIALIZED_ACCEPT
>  #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
>  /*
> - * If you are using APACI, (you should be on Rhapsody) these
> - * values are set at configure time. These are here as reference;
> - * the apache that is built into Rhapsody is configured with
> - * these values.
> + * If you are using APACI, (you probably should be on Mac OS) these
> + * values are set at configure time.
>   */
> -#if 0
> +#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"
> -#define DEFAULT_USER            "nobody"
> -#define DEFAULT_GROUP           "nogroup"
> +#endif
> +#ifndef DEFAULT_USER
> +#define DEFAULT_USER            "www"
> +#endif
> +#ifndef DEFAULT_GROUP
> +#define DEFAULT_GROUP           "www"
> +#endif
> +#ifndef DEFAULT_PATH
>  #define DEFAULT_PATH            "/bin:/usr/bin:/usr/local/bin"
>  #endif
> +#endif /* APACI */
>
>  #elif defined(LINUX)
>
> @@ -927,7 +960,7 @@
>   * __private_extern__.
>   * For other systems, make that a no-op.
>   */
> -#if defined(RHAPSODY)
> +#if defined(MAC_OS) || defined(MAC_OS_X_SERVER)
>  #define ap_private_extern __private_extern__
>  #else
>  #define ap_private_extern
> Index: src/include/hsregex.h
> ===================================================================
> RCS file:
> /CVSRoot/CoreOS/Services/apache/apache/src/include/hsregex.h,v
> retrieving revision 1.6
> retrieving revision 1.6.4.1
> diff -u -d -b -w -r1.6 -r1.6.4.1
> --- hsregex.h   1999/01/12 22:47:22     1.6
> +++ hsregex.h   1999/04/29 02:28:20     1.6.4.1
> @@ -16,7 +16,7 @@
>  #endif
>  #endif
>
> -#if defined(RHAPSODY)
> +#if defined(MAC_OS) || defined(MAC_OS_X_SERVER)
>  #define ap_private_extern __private_extern__
>  #else
>  #define ap_private_extern
> Index: src/os/unix/os.c
> ===================================================================
> RCS file: /CVSRoot/CoreOS/Services/apache/apache/src/os/unix/os.c,v
> retrieving revision 1.3
> retrieving revision 1.3.6.1
> diff -u -d -b -w -r1.3 -r1.3.6.1
> --- os.c        1998/10/02 00:41:55     1.3
> +++ os.c        1999/04/29 00:29:49     1.3.6.1
> @@ -26,8 +26,15 @@
>   *  dynamic shared object (DSO) mechanism
>   */
>
> -#ifdef RHAPSODY
> +#ifdef HAVE_DYLD               /* NeXT/Apple dynamic linker */
>  #include <mach-o/dyld.h>
> +
> +/*
> + * NSUnlinkModule() is a noop in old versions of dyld.
> + * Let's install an error handler to deal with "multiply defined
> + * symbol" runtime errors.
> + */
> +#ifdef DYLD_CANT_UNLOAD
>  #include "httpd.h"
>  #include "http_log.h"
>
> @@ -49,7 +56,6 @@
>       * every time we reload a module. Workaround here is to just
>       * rebind to the new symbol, and forget about the old one.
>       * This is crummy, because it's basically a memory leak.
> -     * (See Radar 2262020 against dyld).
>       */
>
>  #ifdef DEBUG
> @@ -73,11 +79,12 @@
>      abort();
>  }
>
> -#endif /*RHAPSODY*/
> +#endif /* DYLD_CANT_UNLOAD */
> +#endif /* HAVE_DYLD */
>
>  void ap_os_dso_init(void)
>  {
> -#if defined(RHAPSODY)
> +#if defined(HAVE_DYLD) && defined(DYLD_CANT_UNLOAD)
>      NSLinkEditErrorHandlers handlers;
>
>      handlers.undefined = undefined_symbol_handler;
> @@ -95,7 +102,7 @@
>      handle = shl_load(path,
> BIND_IMMEDIATE|BIND_VERBOSE|BIND_NOSTART, 0L);
>      return (void *)handle;
>
> -#elif defined(RHAPSODY)
> +#elif defined(HAVE_DYLD)
>      NSObjectFileImage image;
>      if (NSCreateObjectFileImageFromFile(path, &image) !=
>          NSObjectFileImageSuccess)
> @@ -116,7 +123,7 @@
>  #if defined(HPUX) || defined(HPUX10)
>      shl_unload((shl_t)handle);
>
> -#elif defined(RHAPSODY)
> +#elif defined(HAVE_DYLD)
>      NSUnLinkModule(handle,FALSE);
>
>  #else
> @@ -138,7 +145,7 @@
>          status = shl_findsym((shl_t *)&handle, symname,
> TYPE_DATA,
> &symaddr);
>      return (status == -1 ? NULL : symaddr);
>
> -#elif defined(RHAPSODY)
> +#elif defined(HAVE_DYLD)
>      NSSymbol symbol;
>      char *symname2 =
> (char*)malloc(sizeof(char)*(strlen(symname)+2));
>      sprintf(symname2, "_%s", symname);
> @@ -163,7 +170,7 @@
>  {
>  #if defined(HPUX) || defined(HPUX10)
>      return strerror(errno);
> -#elif defined(RHAPSODY)
> +#elif defined(HAVE_DYLD)
>      return NULL;
>  #else
>      return dlerror();
> Index: src/os/unix/os.h
> ===================================================================
> RCS file: /CVSRoot/CoreOS/Services/apache/apache/src/os/unix/os.h,v
> retrieving revision 1.1.1.4
> retrieving revision 1.1.1.4.4.1
> diff -u -d -b -w -r1.1.1.4 -r1.1.1.4.4.1
> --- os.h        1999/01/12 21:49:16     1.1.1.4
> +++ os.h        1999/04/29 02:26:32     1.1.1.4.4.1
> @@ -60,7 +60,11 @@
>
>  #include "ap_config.h"
>
> +#ifdef MAC_OS
> +#define PLATFORM "Mac OS"
> +#else
>  #define PLATFORM "Unix"
> +#endif
>
>  /*
>   * This file in included in all Apache source code. It contains
> definitions
>
>
> --
>        Wilfredo Sanchez, wsanchez@apple.com
> Apple Computer, Inc., Core Operating Systems / BSD
>    1 Infinite Loop, 302-4K, Cupertino, CA 95014
>


Mime
View raw message