httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject svn commit: r807930 - in /httpd/httpd/trunk: ./ build/ docs/manual/ docs/manual/mod/ include/ modules/arch/unix/ modules/dav/fs/ modules/dav/lock/ modules/examples/ modules/filters/ modules/generators/ modules/mappers/ modules/proxy/ os/ os/os2/ server...
Date Wed, 26 Aug 2009 08:56:15 GMT
Author: bjh
Date: Wed Aug 26 08:56:13 2009
New Revision: 807930

URL: http://svn.apache.org/viewvc?rev=807930&view=rev
Log:
Bring back OS/2 support.
Reverses r758929 with a little bit of conflict resolution.

Added:
    httpd/httpd/trunk/os/os2/   (props changed)
      - copied from r758928, httpd/httpd/trunk/os/os2/
    httpd/httpd/trunk/os/os2/Makefile.in
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/Makefile.in
    httpd/httpd/trunk/os/os2/config.m4
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/config.m4
    httpd/httpd/trunk/os/os2/core.mk
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/core.mk
    httpd/httpd/trunk/os/os2/core_header.def
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/core_header.def
    httpd/httpd/trunk/os/os2/os.h
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/os.h
    httpd/httpd/trunk/os/os2/util_os2.c
      - copied unchanged from r758928, httpd/httpd/trunk/os/os2/util_os2.c
Modified:
    httpd/httpd/trunk/LAYOUT
    httpd/httpd/trunk/Makefile.in
    httpd/httpd/trunk/build/instdso.sh
    httpd/httpd/trunk/configure.in
    httpd/httpd/trunk/docs/manual/logs.xml
    httpd/httpd/trunk/docs/manual/mod/core.xml
    httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml
    httpd/httpd/trunk/include/httpd.h
    httpd/httpd/trunk/modules/arch/unix/mod_unixd.c
    httpd/httpd/trunk/modules/dav/fs/config6.m4
    httpd/httpd/trunk/modules/dav/lock/config6.m4
    httpd/httpd/trunk/modules/examples/mod_example_ipc.c
    httpd/httpd/trunk/modules/filters/mod_include.c
    httpd/httpd/trunk/modules/generators/mod_cgi.c
    httpd/httpd/trunk/modules/generators/mod_cgid.c
    httpd/httpd/trunk/modules/generators/mod_status.c
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c
    httpd/httpd/trunk/modules/mappers/mod_userdir.c
    httpd/httpd/trunk/modules/proxy/config.m4
    httpd/httpd/trunk/os/config.m4
    httpd/httpd/trunk/server/Makefile.in
    httpd/httpd/trunk/server/core.c
    httpd/httpd/trunk/server/gen_test_char.c
    httpd/httpd/trunk/server/mpm_common.c
    httpd/httpd/trunk/server/protocol.c
    httpd/httpd/trunk/server/request.c
    httpd/httpd/trunk/server/util.c
    httpd/httpd/trunk/server/util_script.c
    httpd/httpd/trunk/support/apxs.in
    httpd/httpd/trunk/support/fcgistarter.c
    httpd/httpd/trunk/support/rotatelogs.c

Modified: httpd/httpd/trunk/LAYOUT
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/LAYOUT?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/LAYOUT (original)
+++ httpd/httpd/trunk/LAYOUT Wed Aug 26 08:56:13 2009
@@ -143,6 +143,8 @@
 
   netware/ ................ 
 
+  os2/ .................... 
+
   unix/ ................... 
 
   win32/ .................. 

Modified: httpd/httpd/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/Makefile.in?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/Makefile.in (original)
+++ httpd/httpd/trunk/Makefile.in Wed Aug 26 08:56:13 2009
@@ -231,3 +231,5 @@
 
 x-local-distclean:
 	@rm -rf autom4te.cache
+
+include $(top_srcdir)/os/os2/core.mk

Modified: httpd/httpd/trunk/build/instdso.sh
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/build/instdso.sh?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/build/instdso.sh (original)
+++ httpd/httpd/trunk/build/instdso.sh Wed Aug 26 08:56:13 2009
@@ -53,6 +53,14 @@
 echo $CMD
 $CMD || exit $?
 
+if test "$SYS" = "OS/2"
+then
+    # on OS/2, aplibtool --install doesn't copy the .la files & we can't
+    # rename DLLs to have a .so extension or they won't load so none of the 
+    # steps below make sense.
+    exit 0
+fi
+
 if test -s "$TARGETDIR/$DSOARCHIVE_BASENAME"
 then
   DLNAME=`sed -n "/^dlname=/{s/.*='\([^']*\)'/\1/;p;}" $TARGETDIR/$DSOARCHIVE_BASENAME`

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/configure.in?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Wed Aug 26 08:56:13 2009
@@ -227,33 +227,55 @@
 dnl Add in path to PCRE includes
 APR_ADDTO(INCLUDES, $PCRE_INCLUDES)
 
-if test "x$LTFLAGS" = "x"; then
-    LTFLAGS='--silent'
-fi
-my_libtool=`$apr_config --apr-libtool`
-LIBTOOL="$my_libtool \$(LTFLAGS)"
-libtoolversion=`$my_libtool --version`
-case $libtoolversion in
-    *1.[[45]]* | *[[2-9]].[[0-9]]*)
-        SH_LIBTOOL='$(LIBTOOL)'
-        SHLTCFLAGS="-prefer-pic"
-        LTCFLAGS="-prefer-non-pic -static"
-        ;;
-    *)
-        SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)'
-        SHLTCFLAGS=""
-        LTCFLAGS=""
-        ;;
+echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}"
+
+case $host in
+  *os2*)
+      # Use a custom made libtool replacement
+      echo "using aplibtool"
+      LIBTOOL="$abs_srcdir/srclib/apr/build/aplibtool"
+      SH_LIBTOOL="$LIBTOOL --shared --export-all"
+      SH_LIBS="\$(ALL_LIBS)"
+      CORE_IMPLIB_FILE="ApacheCoreOS2.la"
+      CORE_IMPLIB="$abs_srcdir/server/$CORE_IMPLIB_FILE"
+      MK_IMPLIB="emximp"
+      other_targets="$other_targets os2core"
+      INSTALL_PROG_FLAGS="-e .exe"
+      SHLTCFLAGS=""
+      LTCFLAGS=""
+      ;;
+  *)
+      if test "x$LTFLAGS" = "x"; then
+          LTFLAGS='--silent'
+      fi
+      my_libtool=`$apr_config --apr-libtool`
+      LIBTOOL="$my_libtool \$(LTFLAGS)"
+      libtoolversion=`$my_libtool --version`
+      case $libtoolversion in
+          *1.[[45]]* | *[[2-9]].[[0-9]]*)
+              SH_LIBTOOL='$(LIBTOOL)'
+              SHLTCFLAGS="-prefer-pic"
+              LTCFLAGS="-prefer-non-pic -static"
+              ;;
+          *)
+              SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)'
+              SHLTCFLAGS=""
+              LTCFLAGS=""
+              ;;
+      esac
+      ;;
 esac
 APACHE_SUBST(SHLTCFLAGS)
 APACHE_SUBST(LTCFLAGS)
 
-echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}"
-
 case $host in
   *-apple-aux3*)
       APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
       ;;
+  *os2-emx*)
+      APR_SETVAR(APACHE_MPM, [mpmt_os2])
+      APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
+      ;;
   *-linux-*)
       case `uname -r` in
         2.[[2-9]]* ) 

Modified: httpd/httpd/trunk/docs/manual/logs.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/logs.xml?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/logs.xml (original)
+++ httpd/httpd/trunk/docs/manual/logs.xml Wed Aug 26 08:56:13 2009
@@ -73,7 +73,7 @@
 
     <p>The error log is usually written to a file (typically
     <code>error_log</code> on Unix systems and
-    <code>error.log</code> on Windows). On Unix systems it
+    <code>error.log</code> on Windows and OS/2). On Unix systems it
     is also possible to have the server send errors to
     <code>syslog</code> or <a href="#piped">pipe them to a
     program</a>.</p>

Modified: httpd/httpd/trunk/docs/manual/mod/core.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/core.xml?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/core.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/core.xml Wed Aug 26 08:56:13 2009
@@ -1041,7 +1041,7 @@
 <name>ErrorLog</name>
 <description>Location where the server will log errors</description>
 <syntax> ErrorLog <var>file-path</var>|syslog[:<var>facility</var>]</syntax>
-<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows)</default>
+<default>ErrorLog logs/error_log (Unix) ErrorLog logs/error.log (Windows and OS/2)</default>
 <contextlist><context>server config</context><context>virtual host</context>
 </contextlist>
 

Modified: httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml (original)
+++ httpd/httpd/trunk/docs/manual/mod/mod_autoindex.xml Wed Aug 26 08:56:13 2009
@@ -774,8 +774,8 @@
       <dd>This returns the <code>Last-Modified</code> and <code>ETag</code>
       values for the listed directory in the HTTP header. It is only valid
       if the operating system and file system return appropriate stat()
-      results. Some Unix systems do so, as do Win32's
-      NTFS volumes. Win32 FAT volumes, for example, do not.
+      results. Some Unix systems do so, as do OS2's JFS and Win32's
+      NTFS volumes. OS2 and Win32 FAT volumes, for example, do not.
       Once this feature is enabled, the client or proxy can track
       changes to the list of files when they perform a <code>HEAD</code>
       request. Note some operating systems correctly track new and

Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Wed Aug 26 08:56:13 2009
@@ -75,7 +75,10 @@
  * file with a relative pathname will have this added.
  */
 #ifndef HTTPD_ROOT
-#if defined(WIN32)
+#ifdef OS2
+/** Set default for OS/2 file system */
+#define HTTPD_ROOT "/os2httpd"
+#elif defined(WIN32)
 /** Set default for Windows file system */
 #define HTTPD_ROOT "/apache"
 #elif defined (NETWARE)
@@ -100,7 +103,13 @@
  * directive.
  */
 #ifndef DOCUMENT_LOCATION
+#ifdef OS2
+/* Set default for OS/2 file system */
+#define DOCUMENT_LOCATION  HTTPD_ROOT "/docs"
+#else
+/* Set default for non OS/2 file system */
 #define DOCUMENT_LOCATION  HTTPD_ROOT "/htdocs"
+#endif
 #endif /* DOCUMENT_LOCATION */
 
 /** Maximum number of dynamically loaded modules */
@@ -113,7 +122,7 @@
 
 /** The name of the log files */
 #ifndef DEFAULT_ERRORLOG
-#if defined(WIN32)
+#if defined(OS2) || defined(WIN32)
 #define DEFAULT_ERRORLOG "logs/error.log"
 #else
 #define DEFAULT_ERRORLOG "logs/error_log"
@@ -122,7 +131,12 @@
 
 /** Define this to be what your per-directory security files are called */
 #ifndef DEFAULT_ACCESS_FNAME
+#ifdef OS2
+/* Set default for OS/2 file system */
+#define DEFAULT_ACCESS_FNAME "htaccess"
+#else
 #define DEFAULT_ACCESS_FNAME ".htaccess"
+#endif
 #endif /* DEFAULT_ACCESS_FNAME */
 
 /** The name of the server config file */
@@ -1589,7 +1603,7 @@
  * Test if the given path has an an absolute path.
  * @param p The pool to allocate from
  * @param dir The directory name
- * @note The converse is not necessarily true, some OS's (Win32/Netware) have
+ * @note The converse is not necessarily true, some OS's (Win32/OS2/Netware) have
  * multiple forms of absolute paths.  This only reports if the path is absolute
  * in a canonical sense.
  */

Modified: httpd/httpd/trunk/modules/arch/unix/mod_unixd.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/unix/mod_unixd.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/unix/mod_unixd.c (original)
+++ httpd/httpd/trunk/modules/arch/unix/mod_unixd.c Wed Aug 26 08:56:13 2009
@@ -107,6 +107,8 @@
         else
             name = ap_unixd_config.user_name;
 
+#if !defined(OS2)
+        /* OS/2 doesn't support groups. */
         /*
          * Set the GID before initgroups(), since on some platforms
          * setgid() is known to zap the group list.
@@ -126,6 +128,7 @@
                         "and Group %u", name, (unsigned)ap_unixd_config.group_id);
             return -1;
         }
+#endif /* !defined(OS2) */
     }
     return 0;
 }
@@ -210,7 +213,7 @@
 
     ap_unixd_config.user_name = arg;
     ap_unixd_config.user_id = ap_uname2id(arg);
-#if !defined (BIG_SECURITY_HOLE)
+#if !defined (BIG_SECURITY_HOLE) && !defined (OS2)
     if (ap_unixd_config.user_id == 0) {
         return "Error:\tApache has not been designed to serve pages while\n"
                 "\trunning as root.  There are known race conditions that\n"

Modified: httpd/httpd/trunk/modules/dav/fs/config6.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/fs/config6.m4?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/fs/config6.m4 (original)
+++ httpd/httpd/trunk/modules/dav/fs/config6.m4 Wed Aug 26 08:56:13 2009
@@ -10,6 +10,14 @@
   dav_fs_enable=$dav_enable
 fi
 
+case "$host" in
+  *os2*)
+    # OS/2 DLLs must resolve all symbols at build time
+    # and we need some from main DAV module
+    dav_fs_objects="$dav_fs_objects ../main/mod_dav.la"
+    ;;
+esac
+
 APACHE_MODULE(dav_fs, DAV provider for the filesystem, $dav_fs_objects, , $dav_fs_enable)
 
 APACHE_MODPATH_FINISH

Modified: httpd/httpd/trunk/modules/dav/lock/config6.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/dav/lock/config6.m4?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/dav/lock/config6.m4 (original)
+++ httpd/httpd/trunk/modules/dav/lock/config6.m4 Wed Aug 26 08:56:13 2009
@@ -4,6 +4,14 @@
 
 dav_lock_objects="mod_dav_lock.lo locks.lo"
 
+case "$host" in
+  *os2*)
+    # OS/2 DLLs must resolve all symbols at build time
+    # and we need some from main DAV module
+    dav_lock_objects="$dav_lock_objects ../main/mod_dav.la"
+    ;;
+esac
+
 APACHE_MODULE(dav_lock, DAV provider for generic locking, $dav_lock_objects, , no)
 
 APACHE_MODPATH_FINISH

Modified: httpd/httpd/trunk/modules/examples/mod_example_ipc.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/examples/mod_example_ipc.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/examples/mod_example_ipc.c (original)
+++ httpd/httpd/trunk/modules/examples/mod_example_ipc.c Wed Aug 26 08:56:13 2009
@@ -54,7 +54,7 @@
 #include "http_protocol.h"
 #include "ap_config.h"
 
-#if !defined(WIN32) && !defined(NETWARE)
+#if !defined(OS2) && !defined(WIN32) && !defined(NETWARE)
 #include "unixd.h"
 #define MOD_EXIPC_SET_MUTEX_PERMS /* XXX Apache should define something */
 #endif

Modified: httpd/httpd/trunk/modules/filters/mod_include.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_include.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_include.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_include.c Wed Aug 26 08:56:13 2009
@@ -3055,7 +3055,7 @@
         r->handler = "default-handler";
     }
     else
-#if defined(WIN32) || defined(NETWARE)
+#if defined(OS2) || defined(WIN32) || defined(NETWARE)
     /* These OS's don't support xbithack. This is being worked on. */
     {
         return DECLINED;

Modified: httpd/httpd/trunk/modules/generators/mod_cgi.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgi.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgi.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgi.c Wed Aug 26 08:56:13 2009
@@ -390,7 +390,12 @@
 #endif
 
 #ifdef DEBUG_CGI
+#ifdef OS2
+    /* Under OS/2 need to use device con. */
+    FILE *dbg = fopen("con", "w");
+#else
     FILE *dbg = fopen("/dev/tty", "w");
+#endif
     int i;
 #endif
 

Modified: httpd/httpd/trunk/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_cgid.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_cgid.c Wed Aug 26 08:56:13 2009
@@ -1369,7 +1369,7 @@
         return log_scripterror(r, conf, HTTP_FORBIDDEN, 0,
                                "attempt to include NPH CGI script");
 
-#if defined(WIN32)
+#if defined(OS2) || defined(WIN32)
 #error mod_cgid does not work on this platform.  If you teach it to, look
 #error at mod_cgi.c for required code in this path.
 #else

Modified: httpd/httpd/trunk/modules/generators/mod_status.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/generators/mod_status.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/generators/mod_status.c (original)
+++ httpd/httpd/trunk/modules/generators/mod_status.c Wed Aug 26 08:56:13 2009
@@ -425,8 +425,10 @@
                        count, kbcount);
 
 #ifdef HAVE_TIMES
-            ap_rprintf(r, "CPULoad: %g\n",
-                       (tu + ts + tcu + tcs) / tick / up_time * 100.);
+            /* Allow for OS/2 not having CPU stats */
+            if (ts || tu || tcu || tcs)
+                ap_rprintf(r, "CPULoad: %g\n",
+                           (tu + ts + tcu + tcs) / tick / up_time * 100.);
 #endif
 
             ap_rprintf(r, "Uptime: %ld\n", (long) (up_time));
@@ -447,11 +449,13 @@
             ap_rputs("</dt>\n", r);
 
 #ifdef HAVE_TIMES
+            /* Allow for OS/2 not having CPU stats */
             ap_rprintf(r, "<dt>CPU Usage: u%g s%g cu%g cs%g",
                        tu / tick, ts / tick, tcu / tick, tcs / tick);
 
-            ap_rprintf(r, " - %.3g%% CPU load</dt>\n",
-                       (tu + ts + tcu + tcs) / tick / up_time * 100.);
+            if (ts || tu || tcu || tcs)
+                ap_rprintf(r, " - %.3g%% CPU load</dt>\n",
+                           (tu + ts + tcu + tcs) / tick / up_time * 100.);
 #endif
 
             if (up_time > 0) {

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Wed Aug 26 08:56:13 2009
@@ -3760,11 +3760,13 @@
         break;
 
     case CONDPAT_FILE_LINK:
+#if !defined(OS2)
         if (   apr_stat(&sb, input, APR_FINFO_MIN | APR_FINFO_LINK,
                         r->pool) == APR_SUCCESS
             && sb.filetype == APR_LNK) {
             rc = 1;
         }
+#endif
         break;
 
     case CONDPAT_FILE_DIR:

Modified: httpd/httpd/trunk/modules/mappers/mod_userdir.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_userdir.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_userdir.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_userdir.c Wed Aug 26 08:56:13 2009
@@ -64,7 +64,7 @@
 #include "http_config.h"
 #include "http_request.h"
 
-#if !defined(WIN32) && !defined(NETWARE)
+#if !defined(WIN32) && !defined(OS2) && !defined(NETWARE)
 #define HAVE_UNIX_SUEXEC
 #endif
 

Modified: httpd/httpd/trunk/modules/proxy/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/config.m4?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/config.m4 (original)
+++ httpd/httpd/trunk/modules/proxy/config.m4 Wed Aug 26 08:56:13 2009
@@ -31,6 +31,21 @@
 proxy_ajp_objs="mod_proxy_ajp.lo ajp_header.lo ajp_link.lo ajp_msg.lo ajp_utils.lo"
 proxy_balancer_objs="mod_proxy_balancer.lo"
 
+case "$host" in
+  *os2*)
+    # OS/2 DLLs must resolve all symbols at build time and
+    # these sub-modules need some from the main proxy module
+    proxy_connect_objs="$proxy_connect_objs mod_proxy.la"
+    proxy_ftp_objs="$proxy_ftp_objs mod_proxy.la"
+    proxy_http_objs="$proxy_http_objs mod_proxy.la"
+    proxy_fcgi_objs="$proxy_fcgi_objs mod_proxy.la"
+    proxy_scgi_objs="$proxy_scgi_objs mod_proxy.la"
+    proxy_fdpass_objs="$proxy_fdpass_objs mod_proxy.la"
+    proxy_ajp_objs="$proxy_ajp_objs mod_proxy.la"
+    proxy_balancer_objs="$proxy_balancer_objs mod_proxy.la"
+    ;;
+esac
+
 APACHE_MODULE(proxy_connect, Apache proxy CONNECT module, $proxy_connect_objs, , $proxy_mods_enable)
 APACHE_MODULE(proxy_ftp, Apache proxy FTP module, $proxy_ftp_objs, , $proxy_mods_enable)
 APACHE_MODULE(proxy_http, Apache proxy HTTP module, $proxy_http_objs, , $proxy_mods_enable)

Modified: httpd/httpd/trunk/os/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/os/config.m4?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/os/config.m4 (original)
+++ httpd/httpd/trunk/os/config.m4 Wed Aug 26 08:56:13 2009
@@ -1,6 +1,10 @@
 AC_MSG_CHECKING(for target platform)
 
 case $host in
+*pc-os2-emx*)
+  OS="os2"
+  OS_DIR=$OS
+  ;;
 bs2000*)
   OS="unix"
   OS_DIR=$OS

Propchange: httpd/httpd/trunk/os/os2/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Aug 26 08:56:13 2009
@@ -0,0 +1,5 @@
+Makefile
+.deps
+*.lo
+*.la
+.libs

Modified: httpd/httpd/trunk/server/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/Makefile.in?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/Makefile.in (original)
+++ httpd/httpd/trunk/server/Makefile.in Wed Aug 26 08:56:13 2009
@@ -1,5 +1,6 @@
 
-CLEAN_TARGETS = gen_test_char test_char.h httpd.exp export_files \
+CLEAN_TARGETS = gen_test_char test_char.h \
+	ApacheCoreOS2.def httpd.exp export_files \
 	exports.c export_vars.h
 
 SUBDIRS = mpm
@@ -69,6 +70,12 @@
 export_vars.h: export_files
 	$(AWK) -f $(top_srcdir)/build/make_var_export.awk `cat $?` > $@
 
+# Rule to make def file for OS/2 core dll
+ApacheCoreOS2.def: exports.c export_vars.h $(top_srcdir)/os/$(OS_DIR)/core_header.def
+	cat $(top_srcdir)/os/$(OS_DIR)/core_header.def > $@
+	$(CPP) $< $(ALL_CPPFLAGS) $(ALL_INCLUDES) | grep "ap_hack_" | sed -e 's/^.*[)]\(.*\);$$/
 "\1"/' >> $@
+	$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | grep "^[a-z]" | sed -e 's/^\(.*\)$$/
 "\1"/' >> $@
+
 # Rule to make exp file for AIX DSOs
 httpd.exp: exports.c export_vars.h
 	@echo "#! ." > $@

Modified: httpd/httpd/trunk/server/core.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/core.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/core.c (original)
+++ httpd/httpd/trunk/server/core.c Wed Aug 26 08:56:13 2009
@@ -1731,8 +1731,8 @@
     return errmsg;
 }
 
-/* XXX: Bogus - need to do this differently (at least Netware suffers
- * the same problem!!!)
+/* XXX: Bogus - need to do this differently (at least OS2/Netware suffer
+ * the same problem!!!
  * We use this in <DirectoryMatch> and <FilesMatch>, to ensure that
  * people don't get bitten by wrong-cased regex matches
  */

Modified: httpd/httpd/trunk/server/gen_test_char.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/gen_test_char.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/gen_test_char.c (original)
+++ httpd/httpd/trunk/server/gen_test_char.c Wed Aug 26 08:56:13 2009
@@ -80,14 +80,14 @@
             printf("\n    ");
 
         /* escape_shell_cmd */
-#if defined(WANT_WIN32)
-        /* Win32 has many of the same vulnerable characters
+#if defined(WANT_WIN32) || defined(OS2)
+        /* Win32/OS2 have many of the same vulnerable characters
          * as Unix sh, plus the carriage return and percent char.
          * The proper escaping of these characters varies from unix
-         * since Win32 uses carets or doubled-double quotes,
+         * since Win32/OS2 use carets or doubled-double quotes,
          * and neither lf nor cr can be escaped.  We escape unix
          * specific as well, to assure that cross-compiled unix
-         * applications behave similiarly when invoked on win32.
+         * applications behave similiarly when invoked on win32/os2.
          *
          * Rem please keep in-sync with apr's list in win32/filesys.c
          */

Modified: httpd/httpd/trunk/server/mpm_common.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm_common.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm_common.c (original)
+++ httpd/httpd/trunk/server/mpm_common.c Wed Aug 26 08:56:13 2009
@@ -193,7 +193,7 @@
 #ifndef HAVE_INITGROUPS
 int initgroups(const char *name, gid_t basegid)
 {
-#if defined(_OSD_POSIX) || defined(WIN32) || defined(NETWARE)
+#if defined(_OSD_POSIX) || defined(OS2) || defined(WIN32) || defined(NETWARE)
     return 0;
 #else
     gid_t groups[NGROUPS_MAX];

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/protocol.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Wed Aug 26 08:56:13 2009
@@ -529,8 +529,8 @@
         r->uri = r->parsed_uri.path ? r->parsed_uri.path
                  : apr_pstrdup(r->pool, "/");
 
-#if defined(WIN32)
-        /* Handle path translations and plug security hole.
+#if defined(OS2) || defined(WIN32)
+        /* Handle path translations for OS/2 and plug security hole.
          * This will prevent "http://www.wherever.com/..\..\/" from
          * returning a directory for the root drive.
          */
@@ -540,7 +540,7 @@
             for (x = r->uri; (x = strchr(x, '\\')) != NULL; )
                 *x = '/';
         }
-#endif /* WIN32 */
+#endif /* OS2 || WIN32 */
     }
     else {
         r->args = NULL;

Modified: httpd/httpd/trunk/server/request.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/request.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/request.c (original)
+++ httpd/httpd/trunk/server/request.c Wed Aug 26 08:56:13 2009
@@ -822,7 +822,7 @@
 
                 /* We will never skip '0' element components, e.g. plain old
                  * <Directory >, and <Directory "/"> are classified as zero
-                 * so that Win32/Netware etc all pick them up.
+                 * so that Win32/Netware/OS2 etc all pick them up.
                  * Otherwise, skip over the mismatches.
                  */
                 if (entry_core->d_components

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Wed Aug 26 08:56:13 2009
@@ -71,7 +71,7 @@
  */
 #define TEST_CHAR(c, f)        (test_char_table[(unsigned)(c)] & (f))
 
-/* Win32/NetWare need to check for both forward and back slashes
+/* Win32/NetWare/OS2 need to check for both forward and back slashes
  * in ap_getparents() and ap_escape_url.
  */
 #ifdef CASE_BLIND_FILESYSTEM
@@ -910,11 +910,11 @@
         return status;
 
     if (finfo.filetype != APR_REG &&
-#if defined(WIN32) || defined(NETWARE)
+#if defined(WIN32) || defined(OS2) || defined(NETWARE)
         strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
 #else
         strcmp(name, "/dev/null") != 0) {
-#endif /* WIN32 */
+#endif /* WIN32 || OS2 */
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
                      "Access to file %s denied by server: not a regular file",
                      name);
@@ -1489,9 +1489,9 @@
     s = (const unsigned char *)str;
     for (; *s; ++s) {
 
-#if defined(WIN32)
+#if defined(OS2) || defined(WIN32)
         /*
-         * Newlines to Win32 CreateProcess() are ill advised.
+         * Newlines to Win32/OS2 CreateProcess() are ill advised.
          * Convert them to spaces since they are effectively white
          * space to most applications
          */

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Wed Aug 26 08:56:13 2009
@@ -37,6 +37,11 @@
 #include "apr_date.h"           /* For apr_date_parse_http() */
 #include "util_ebcdic.h"
 
+#ifdef OS2
+#define INCL_DOS
+#include <os2.h>
+#endif
+
 /*
  * Various utility functions which are common to a whole lot of
  * script-type extensions mechanisms, and might as well be gathered
@@ -117,7 +122,7 @@
     conn_rec *c = r->connection;
     const char *rem_logname;
     char *env_path;
-#if defined(WIN32)
+#if defined(WIN32) || defined(OS2)
     char *env_temp;
 #endif
     const char *host;
@@ -195,6 +200,21 @@
     }
 #endif
 
+#ifdef OS2
+    if ((env_temp = getenv("COMSPEC")) != NULL) {
+        apr_table_addn(e, "COMSPEC", env_temp);
+    }
+    if ((env_temp = getenv("ETC")) != NULL) {
+        apr_table_addn(e, "ETC", env_temp);
+    }
+    if ((env_temp = getenv("DPATH")) != NULL) {
+        apr_table_addn(e, "DPATH", env_temp);
+    }
+    if ((env_temp = getenv("PERLLIB_PREFIX")) != NULL) {
+        apr_table_addn(e, "PERLLIB_PREFIX", env_temp);
+    }
+#endif
+
     apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
     apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
     apr_table_addn(e, "SERVER_NAME",

Modified: httpd/httpd/trunk/support/apxs.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/apxs.in?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/support/apxs.in (original)
+++ httpd/httpd/trunk/support/apxs.in Wed Aug 26 08:56:13 2009
@@ -490,7 +490,7 @@
     my @cmds = ();
     my $f;
     foreach $f (@args) {
-        #  ack all potential gcc, hp/ux, win32, aix and os/x extensions
+        #  ack all potential gcc, hp/ux, win32+os2+aix and os/x extensions
         if ($f !~ m#(\.so$|\.la$|\.sl$|\.dll$|\.dylib$|)#) {
             error("file $f is not a shared object");
             exit(1);

Modified: httpd/httpd/trunk/support/fcgistarter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/fcgistarter.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/support/fcgistarter.c (original)
+++ httpd/httpd/trunk/support/fcgistarter.c Wed Aug 26 08:56:13 2009
@@ -148,7 +148,7 @@
         exit_error(rv, "apr_proc_detach");
     }
 
-#if defined(WIN32) || defined(NETWARE)
+#if defined(WIN32) || defined(OS2) || defined(NETWARE)
 
 #error "Please implement me."
 

Modified: httpd/httpd/trunk/support/rotatelogs.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=807930&r1=807929&r2=807930&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Wed Aug 26 08:56:13 2009
@@ -118,11 +118,17 @@
             "{<rotation time in seconds>|<rotation size>(B|K|M|G)} "
             "[offset minutes from UTC]\n\n",
             argv0);
+#ifdef OS2
+    fprintf(stderr,
+            "Add this:\n\nTransferLog \"|%s.exe /some/where 86400\"\n\n",
+            argv0);
+#else
     fprintf(stderr,
             "Add this:\n\nTransferLog \"|%s /some/where 86400\"\n\n",
             argv0);
     fprintf(stderr,
             "or \n\nTransferLog \"|%s /some/where 5M\"\n\n", argv0);
+#endif
     fprintf(stderr,
             "to httpd.conf. The generated name will be /some/where.nnnn "
             "where nnnn is the\nsystem time at which the log nominally "



Mime
View raw message