cvs commit: apache-1.3/src/os/os2 util_os2.c

2000-02-27 Thread bjh
bjh 00/02/26 22:07:11

  Modified:src/main util_script.c
   src/os/os2 util_os2.c
  Log:
  Squash a few subscript has type `char' warnings and a defined but not used
  warning.
  
  Revision  ChangesPath
  1.150 +5 -5  apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- util_script.c 1999/12/09 17:19:45 1.149
  +++ util_script.c 2000/02/27 06:07:10 1.150
  @@ -267,16 +267,16 @@
   #endif
   
   #ifdef OS2
  -if (env_temp = getenv(COMSPEC)) {
  +if ((env_temp = getenv(COMSPEC)) != NULL) {
   ap_table_addn(e, COMSPEC, env_temp);
   }
  -if (env_temp = getenv(ETC)) {
  +if ((env_temp = getenv(ETC)) != NULL) {
   ap_table_addn(e, ETC, env_temp);
   }
  -if (env_temp = getenv(DPATH)) {
  +if ((env_temp = getenv(DPATH)) != NULL) {
   ap_table_addn(e, DPATH, env_temp);
   }
  -if (env_temp = getenv(PERLLIB_PREFIX)) {
  +if ((env_temp = getenv(PERLLIB_PREFIX)) != NULL) {
   ap_table_addn(e, PERLLIB_PREFIX, env_temp);
   }
   #endif
  @@ -673,7 +673,7 @@
   }
   }
   
  -#if defined(OS2) || defined(WIN32)
  +#if defined(WIN32)
   static char **create_argv_cmd(pool *p, char *av0, const char *args, char 
*path)
   {
   register int x, n;
  
  
  
  1.6   +2 -2  apache-1.3/src/os/os2/util_os2.c
  
  Index: util_os2.c
  ===
  RCS file: /home/cvs/apache-1.3/src/os/os2/util_os2.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- util_os2.c1999/07/08 16:46:20 1.5
  +++ util_os2.c2000/02/27 06:07:10 1.6
  @@ -82,9 +82,9 @@
   len = sizeof(result-1);
   
 for (c=0; clen; c++) {
  -  while (isspace(message[c])  isspace(message[c+1])) /* skip 
multiple whitespace */
  +  while (ap_isspace(message[c])  ap_isspace(message[c+1])) /* skip 
multiple whitespace */
 c++;
  -  *(pos++) = isspace(message[c]) ? ' ' : message[c];
  +  *(pos++) = ap_isspace(message[c]) ? ' ' : message[c];
 }
 
 *pos = 0;
  
  
  


cvs commit: apache-1.3/src/include ap_config.h

2000-02-27 Thread bjh
bjh 00/02/26 23:55:26

  Modified:src/include ap_config.h
  Log:
  Don't use ap_slack() on OS/2. It shouldn't be necessary  seems to interfere
  with graceful restarts.
  
  Revision  ChangesPath
  1.283 +1 -0  apache-1.3/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/ap_config.h,v
  retrieving revision 1.282
  retrieving revision 1.283
  diff -u -r1.282 -r1.283
  --- ap_config.h   2000/02/23 12:44:56 1.282
  +++ ap_config.h   2000/02/27 07:55:25 1.283
  @@ -812,6 +812,7 @@
   #define NO_RELIABLE_PIPED_LOGS
   #define USE_OS2SEM_SERIALIZED_ACCEPT
   #define SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  +#define NO_SLACK
   #define FOPEN_REQUIRES_T
   
   #elif defined(__MACHTEN__)
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 sendrecv.c

2000-02-14 Thread bjh
bjh 00/02/14 06:01:42

  Modified:src/lib/apr/network_io/os2 sendrecv.c
  Log:
  OS/2: ap_send/ap_recv/ap_sendv should set len to 0, not -1, when an error
  occurrs.
  
  Revision  ChangesPath
  1.7   +6 -6  apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- sendrecv.c1999/11/03 14:03:25 1.6
  +++ sendrecv.c2000/02/14 14:01:42 1.7
  @@ -73,7 +73,7 @@
   rv = select(fds, 0, 1, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
   
   if (rv != 1) {
  -*len = -1;
  +*len = 0;
   err = sock_errno();
   
   if (rv == 0)
  @@ -91,7 +91,7 @@
   } while (err == SOCEINTR || err == SOCEWOULDBLOCK);
   
   if (err) {
  -*len = -1;
  +*len = 0;
   return os2errno(err);
   }
   
  @@ -112,7 +112,7 @@
   rv = select(fds, 1, 0, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
   
   if (rv != 1) {
  -*len = -1;
  +*len = 0;
   err = sock_errno();
   
   if (rv == 0)
  @@ -130,7 +130,7 @@
   } while (err == SOCEINTR || err == SOCEWOULDBLOCK);
   
   if (err) {
  -*len = -1;
  +*len = 0;
   return os2errno(err);
   }
   
  @@ -155,7 +155,7 @@
   rv = select(fds, 0, 1, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
   
   if (rv != 1) {
  -*len = -1;
  +*len = 0;
   err = sock_errno();
   
   if (rv == 0)
  @@ -173,7 +173,7 @@
   } while (err == SOCEINTR || err == SOCEWOULDBLOCK);
   
   if (err) {
  -*len = -1;
  +*len = 0;
   return os2errno(err);
   }
   
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_mime.c

2000-02-06 Thread bjh
bjh 00/02/05 19:53:14

  Modified:src/modules/standard mod_mime.c
  Log:
  Use ap_isgraph instead of isgraph to avoid subscript has type `char'
  warning.
  
  Revision  ChangesPath
  1.54  +1 -1  apache-1.3/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_mime.c2000/01/11 14:13:49 1.53
  +++ mod_mime.c2000/02/06 03:53:11 1.54
  @@ -345,7 +345,7 @@
   {
   int res;
   
  -res = (ap_isascii(c)  isgraph(c)
  +res = (ap_isascii(c)  ap_isgraph(c)
(strchr(tspecial, c) == NULL)) ? 1 : -1;
   return res;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/test ab_apr.c

2000-01-26 Thread bjh
bjh 00/01/25 23:01:13

  Modified:src/lib/apr/test ab_apr.c
  Log:
  timetaken is expected to be in milliseconds, not seconds.
  
  Revision  ChangesPath
  1.16  +2 -2  apache-2.0/src/lib/apr/test/ab_apr.c
  
  Index: ab_apr.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/ab_apr.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ab_apr.c  2000/01/09 05:18:19 1.15
  +++ ab_apr.c  2000/01/26 07:01:10 1.16
  @@ -245,7 +245,7 @@
   int timetaken;
   
   endtime = ap_now();
  -timetaken = (endtime - start) / AP_USEC_PER_SEC;
  +timetaken = (endtime - start) / 1000;
   
   printf(\r   
\r);
   printf(Server Software:%s\n, servername);
  @@ -320,7 +320,7 @@
   int timetaken;
   
   endtime = ap_now();
  -timetaken = (endtime - start) / AP_USEC_PER_SEC;
  +timetaken = (endtime - start) / 1000;
   
   printf(\n\ntable %s\n, tablestring);
   printf(tr %sth colspan=2 %sServer Software:/th
  
  
  


cvs commit: apache-2.0/src/main http_request.c http_vhost.c

2000-01-26 Thread bjh
bjh 00/01/25 23:07:51

  Modified:src/main http_request.c http_vhost.c
  Log:
  Quiet some warnings.
  - 1 'suggest parentheses around assignment used as truth value'
  - a few subscript has type `char'
  
  Revision  ChangesPath
  1.18  +1 -1  apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- http_request.c2000/01/19 01:15:11 1.17
  +++ http_request.c2000/01/26 07:07:49 1.18
  @@ -222,7 +222,7 @@
   char *p;
   int iCount=0;
   p = path;
  -while (p = strchr(p,'/')) {
  +while ((p = strchr(p,'/')) != NULL) {
   p++;
   iCount++;
   }
  
  
  
  1.13  +2 -2  apache-2.0/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_vhost.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- http_vhost.c  2000/01/19 01:15:12 1.12
  +++ http_vhost.c  2000/01/26 07:07:49 1.13
  @@ -672,7 +672,7 @@
   src = r-hostname;
   dst = host;
   while (*src) {
  - if (!isalnum(*src)  *src != '.'  *src != '-') {
  + if (!ap_isalnum(*src)  *src != '.'  *src != '-') {
if (*src == ':')
break;
else
  @@ -684,7 +684,7 @@
   /* check the port part */
   if (*src++ == ':') {
while (*src) {
  - if (!isdigit(*src++)) {
  + if (!ap_isdigit(*src++)) {
goto bad;
}
}
  
  
  


cvs commit: apache-2.0/src/main util.c

2000-01-26 Thread bjh
bjh 00/01/25 23:40:12

  Modified:src/main util.c
  Log:
  OS/2 doesn't have groups, don't try to mess with them.
  
  Revision  ChangesPath
  1.28  +1 -1  apache-2.0/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- util.c2000/01/19 01:15:13 1.27
  +++ util.c2000/01/26 07:40:11 1.28
  @@ -1690,7 +1690,7 @@
   #ifndef HAVE_INITGROUPS
   int initgroups(const char *name, gid_t basegid)
   {
  -#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || 
defined(TPF) || defined(__TANDEM)
  +#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || 
defined(TPF) || defined(__TANDEM) || defined(OS2)
   /* QNX, MPE and BeOS do not appear to support supplementary groups. */
   return 0;
   #else /* ndef QNX */
  
  
  


cvs commit: apache-2.0/src/modules/mpm config.m4

2000-01-26 Thread bjh
bjh 00/01/25 23:47:35

  Modified:src/modules/mpm config.m4
  Log:
  Only check for pthreads for mpms that actually need it rather than assuming
  everything except prefork needs it. Clarify threads != pthreads.
  
  Revision  ChangesPath
  1.10  +2 -2  apache-2.0/src/modules/mpm/config.m4
  
  Index: config.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/config.m4,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- config.m4 2000/01/16 20:00:51 1.9
  +++ config.m4 2000/01/26 07:47:34 1.10
  @@ -10,13 +10,13 @@
   
   apache_cv_mpm=$APACHE_MPM

  -if test $apache_cv_mpm != prefork; then
  +if test $apache_cv_mpm = mpmt_pthread -o $apache_cv_mpm = dexter; 
then
 PTHREADS_CHECK
 AC_MSG_CHECKING([for which threading library to use])
 AC_MSG_RESULT($threads_result)
   
 if test $apache_threads_working = no; then
  -AC_MSG_RESULT(The currently selected MPM requires threads which your 
system seems to lack)
  +AC_MSG_RESULT(The currently selected MPM requires pthreads which your 
system seems to lack)
   AC_MSG_CHECKING(checking for replacement)
   AC_MSG_RESULT(prefork selected)
   apache_cv_mpm=prefork
  
  
  


cvs commit: apache-2.0/src/os/os2 Makefile.in config.m4 os.h util_os2.c

2000-01-26 Thread bjh
bjh 00/01/25 23:51:46

  Modified:src/modules/mpm/spmt_os2 spmt_os2.c
   src/os   config.m4
   src/os/os2 os.h util_os2.c
  Added:   src/modules/mpm/spmt_os2 Makefile.in config.m4
   src/os/os2 Makefile.in config.m4
  Log:
  Get OS/2 working with new configure system. Yay! :)
  
  Revision  ChangesPath
  1.28  +2 -2  apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- spmt_os2.c1999/12/01 00:45:02 1.27
  +++ spmt_os2.c2000/01/26 07:51:41 1.28
  @@ -62,6 +62,7 @@
   #define INCL_DOSERRORS
   
   #include httpd.h
  +#include ap_config.h
   #include mpm_default.h
   #include http_main.h
   #include http_log.h
  @@ -76,6 +77,7 @@
   
   #include os2.h
   #include stdlib.h
  +#include sys/signal.h
   
   /* config globals */
   
  @@ -175,7 +177,6 @@
   }
   
   
  -#if defined(USE_OS2SEM_SERIALIZED_ACCEPT)
   
   static HMTX lock_sem = -1;
   
  @@ -242,7 +243,6 @@
   }
   }
   
  -#endif
   
   
   /* On some architectures it's safe to do unserialized accept()s in the single
  
  
  
  1.1  apache-2.0/src/modules/mpm/spmt_os2/Makefile.in
  
  Index: Makefile.in
  ===
  
  DEPTH = ../../..
  topsrcdir = @topsrcdir@
  srcdir= @srcdir@
  VPATH = @srcdir@
  
  LTLIBRARY_NAME= libspmt_os2.la
  LTLIBRARY_SOURCES = spmt_os2.c
  
  include $(topsrcdir)/build/ltlib.mk
  
  
  
  1.1  apache-2.0/src/modules/mpm/spmt_os2/config.m4
  
  Index: config.m4
  ===
  if test $MPM_NAME = spmt_os2 ; then
  AC_CACHE_SAVE
  APACHE_FAST_OUTPUT(modules/mpm/$MPM_NAME/Makefile)
  CFLAGS=$CFLAGS -Zmt
  LDFLAGS=$LDFLAGS -Zmt
  fi
  
  
  
  1.4   +2 -0  apache-2.0/src/os/config.m4
  
  Index: config.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/os/config.m4,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- config.m4 2000/01/11 17:28:28 1.3
  +++ config.m4 2000/01/26 07:51:43 1.4
  @@ -5,6 +5,8 @@
   case $PLATFORM in
   *beos*)
 OS=beos;;
  +*pc-os2_emx*)
  +  OS=os2;;
   *)
 OS=unix;;
   esac
  
  
  
  1.5   +3 -1  apache-2.0/src/os/os2/os.h
  
  Index: os.h
  ===
  RCS file: /home/cvs/apache-2.0/src/os/os2/os.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- os.h  2000/01/19 01:16:17 1.4
  +++ os.h  2000/01/26 07:51:45 1.5
  @@ -5,6 +5,8 @@
   #define HAVE_CANONICAL_FILENAME
   #define HAVE_DRIVE_LETTERS
   
  +#include apr_general.h
  +
   /*
* This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
  @@ -29,7 +31,7 @@
   extern int ap_os_is_path_absolute(const char *file);
   #endif
   
  -API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char 
*file);
  +char *ap_os_canonical_filename(ap_context_t *p, const char *file);
   #define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
   #define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
   /* FIXME: the following should be implemented on this platform */
  
  
  
  1.6   +5 -0  apache-2.0/src/os/os2/util_os2.c
  
  Index: util_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/os2/util_os2.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- util_os2.c1999/10/20 15:15:41 1.5
  +++ util_os2.c2000/01/26 07:51:45 1.6
  @@ -3,6 +3,11 @@
   #include os2.h
   #include httpd.h
   #include http_log.h
  +#include os.h
  +#include sys/time.h
  +#include sys/signal.h
  +#include ctype.h
  +#include string.h
   
   
   API_EXPORT(char *)ap_os_canonical_filename(ap_context_t *pPool, const char 
*szFile)
  
  
  
  1.1  apache-2.0/src/os/os2/Makefile.in
  
  Index: Makefile.in
  ===
  
  DEPTH = ../..
  topsrcdir = @topsrcdir@
  srcdir= @srcdir@
  VPATH = @srcdir@
  
  LTLIBRARY_NAME= libos.la
  LTLIBRARY_SOURCES = os.c os-inline.c util_os2.c iol_socket.c
  
  include $(topsrcdir)/build/ltlib.mk
  
  
  
  1.1  apache-2.0/src/os/os2/config.m4
  
  Index: config.m4
  ===
  if test $OS = os2 ; then
CFLAGS=$CFLAGS -DOS2 -O2
LDFLAGS=$LDFLAGS -Zexe
  fi
  
  
  


cvs commit: apache-1.3/src Configure

2000-01-14 Thread bjh
bjh 00/01/14 08:10:36

  Modified:src  Configure
  Log:
  Allow different file name extensions for the shared core and shared modules.
  Set HPUX to use .sl for the core  .so for modules.
  Set OS/2 to use .dll for both.
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.387 +8 -5  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.386
  retrieving revision 1.387
  diff -u -r1.386 -r1.387
  --- Configure 2000/01/10 23:53:08 1.386
  +++ Configure 2000/01/14 16:10:34 1.387
  @@ -1002,6 +1002,7 @@
   DEF_SHARED_CORE=no
   DEF_SHARED_CHAIN=no
   SHLIB_SUFFIX_NAME=so
  +SHMOD_SUFFIX_NAME=so
   SHLIB_SUFFIX_DEPTH=all
   SHLIB_EXPORT_FILES=no
   SHARED_CORE_EP='lib$(TARGET).ep'
  @@ -1244,7 +1245,7 @@
LDFLAGS_SHLIB=-b
LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
LDFLAGS_SHLIB_EXPORT=-Wl,-E -Wl,-B,deferred
  -#SHLIB_SUFFIX_NAME=sl
  + SHLIB_SUFFIX_NAME=sl
;;
*-hp-hpux10.*|*-hp-hpux11.*)
case $CC in
  @@ -1254,7 +1255,7 @@
LDFLAGS_SHLIB=-b
LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
LDFLAGS_SHLIB_EXPORT=-Wl,-E -Wl,-B,deferred -Wl,+s
  -#SHLIB_SUFFIX_NAME=sl
  + SHLIB_SUFFIX_NAME=sl
;;
*-ibm-aix*)
case $CC in
  @@ -1288,6 +1289,7 @@
LDFLAGS_SHLIB=`echo $LDFLAGS|sed -e s/-Zexe//` -Zdll
LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
SHLIB_SUFFIX_NAME=dll
  + SHMOD_SUFFIX_NAME=dll
SHLIB_SUFFIX_DEPTH=0
LD_SHLIB=$CC
LD_SHCORE_DEF=ApacheCoreOS2.def
  @@ -1689,7 +1691,7 @@
modlibs=$modlibs $modlibs1
fi
rm -f $tmpfile2 $tmpfile3
  - if [ x$ext != x$SHLIB_SUFFIX_NAME ]; then
  + if [ x$ext != x$SHMOD_SUFFIX_NAME ]; then
ext=o
fi
fi
  @@ -1697,11 +1699,11 @@
modname=`echo $modbase | sed 's/^.*\///' | \
sed 's/^mod_//' | sed 's/^lib//' | sed 's/$/_module/'`
fi
  - if [ x$ext != x$SHLIB_SUFFIX_NAME ]; then
  + if [ x$ext != x$SHMOD_SUFFIX_NAME ]; then
echo Module $modname $modbase.$ext $tmpfile
fi
#   optionally generate export file for some linkers 
  - if [ x$ext = x$SHLIB_SUFFIX_NAME -a x$SHLIB_EXPORT_FILES = xyes 
]; then
  + if [ x$ext = x$SHMOD_SUFFIX_NAME -a x$SHLIB_EXPORT_FILES = xyes 
]; then
echo $modname $modbase.exp
fi
   done
  @@ -1959,6 +1961,7 @@
   echo SUBDIRS=$SUBDIRS lib modules  Makefile
   echo SUBTARGET=$SUBTARGET  Makefile
   echo SHLIB_SUFFIX_NAME=$SHLIB_SUFFIX_NAME  Makefile
  +echo SHMOD_SUFFIX_NAME=$SHMOD_SUFFIX_NAME  Makefile
   echo SHLIB_SUFFIX_LIST=$SHLIB_SUFFIX_LIST  Makefile
   echo SHLIB_EXPORT_FILES=$SHLIB_EXPORT_FILES  Makefile
   echo   Makefile
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

2000-01-10 Thread bjh
bjh 00/01/09 22:21:13

  Modified:src/lib/apr/threadproc/os2 proc.c
  Log:
  OS/2: Use native API for process waits.
  
  Revision  ChangesPath
  1.13  +13 -18apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- proc.c1999/12/31 04:15:12 1.12
  +++ proc.c2000/01/10 06:21:12 1.13
  @@ -53,9 +53,11 @@
*
*/
   
  +#define INCL_DOS
  +#define INCL_DOSERRORS
  +
   #include threadproc.h
   #include fileio.h
  -
   #include apr_config.h
   #include apr_thread_proc.h
   #include apr_file_io.h
  @@ -68,7 +70,6 @@
   #include unistd.h
   #include process.h
   #include stdlib.h
  -#define INCL_DOS
   #include os2.h
   
   ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t 
*cont)
  @@ -371,8 +372,8 @@
   } else
   env_block = NULL;
   
  -status = DosExecPgm(error_object, sizeof(error_object), 
  -attr-detached ? EXEC_BACKGROUND : EXEC_ASYNC, 
  +status = DosExecPgm(error_object, sizeof(error_object),
  +attr-detached ? EXEC_BACKGROUND : EXEC_ASYNCRESULT,
   cmdline, env_block, rescodes, cmdline);
   
   (*new)-pid = rescodes.codeTerminate;
  @@ -433,7 +434,9 @@
   ap_status_t ap_wait_proc(struct proc_t *proc, 
  ap_wait_how_e wait)
   {
  -pid_t stat;
  +RESULTCODES codes;
  +ULONG rc;
  +PID pid;
   
   if (!proc)
   return APR_ENOPROC;
  @@ -441,24 +444,16 @@
   if (!proc-running)
   return APR_CHILD_DONE;
   
  -if (wait == APR_WAIT) {
  -if ((stat = waitpid(proc-pid, NULL, WUNTRACED))  0) {
  -proc-running = FALSE;
  -return APR_CHILD_DONE;
  -} else if (stat == 0) {
  -return APR_CHILD_NOTDONE;
  -}
  -return errno;
  -}
  +rc = DosWaitChild(DCWA_PROCESS, wait == APR_WAIT ? DCWW_WAIT : 
DCWW_NOWAIT, codes, pid, proc-pid);
   
  -if ((stat = waitpid(proc-pid, NULL, WUNTRACED | WNOHANG))  0) {
  -proc-running = FALSE;
  +if (rc == 0) {
  +proc-running = 0;
   return APR_CHILD_DONE;
  -} else if (stat == 0) {
  +} else if (rc == ERROR_CHILD_NOT_COMPLETE) {
   return APR_CHILD_NOTDONE;
   }
   
  -return errno;
  +return os2errno(rc);
   } 
   
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 filedup.c fileio.h open.c pipe.c

2000-01-10 Thread bjh
bjh 00/01/10 06:21:54

  Modified:src/lib/apr/file_io/os2 filedup.c fileio.h open.c pipe.c
  Log:
  OS/2: Implement delete on close  fix an allocation error in ap_open_stderr.
  
  Revision  ChangesPath
  1.5   +1 -0  apache-2.0/src/lib/apr/file_io/os2/filedup.c
  
  Index: filedup.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/filedup.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- filedup.c 1999/12/19 08:00:28 1.4
  +++ filedup.c 2000/01/10 14:21:53 1.5
  @@ -89,6 +89,7 @@
   dup_file-buffered = old_file-buffered;
   dup_file-status = old_file-status;
   dup_file-isopen = old_file-isopen;
  +dup_file-flags = old_file-flags;
   
   if (*new_file == NULL) {
   ap_register_cleanup(dup_file-cntxt, dup_file, file_cleanup,
  
  
  
  1.6   +1 -0  apache-2.0/src/lib/apr/file_io/os2/fileio.h
  
  Index: fileio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileio.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- fileio.h  1999/12/19 09:41:26 1.5
  +++ fileio.h  2000/01/10 14:21:53 1.6
  @@ -75,6 +75,7 @@
   FILESTATUS3 status;
   int validstatus;
   int eof_hit;
  +ap_int32_t flags;
   
   /* Stuff for buffered mode */
   char *buffer;
  
  
  
  1.13  +12 -4 apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- open.c1999/12/19 08:05:07 1.12
  +++ open.c2000/01/10 14:21:53 1.13
  @@ -84,6 +84,7 @@
   dafile-validstatus = FALSE;
   dafile-eof_hit = FALSE;
   dafile-buffer = NULL;
  +dafile-flags = flag;
   
   if ((flag  APR_READ)  (flag  APR_WRITE)) {
   mflags |= OPEN_ACCESS_READWRITE;
  @@ -148,7 +149,8 @@
   
   ap_status_t ap_close(ap_file_t *file)
   {
  -ULONG rc; 
  +ULONG rc;
  +ap_status_t status;
   
   if (file  file-isopen) {
   ap_flush(file);
  @@ -156,12 +158,16 @@
   
   if (rc == 0) {
   file-isopen = FALSE;
  -return APR_SUCCESS;
  +status = APR_SUCCESS;
  +
  +if (file-flags  APR_DELONCLOSE) {
  +status = os2errno(DosDelete(file-fname));
  +}
   } else {
   return os2errno(rc);
   }
   }
  -
  +
   return APR_SUCCESS;
   }
   
  @@ -199,6 +205,7 @@
   (*file)-buffered = FALSE;
   (*file)-validstatus = FALSE;
   (*file)-eof_hit = FALSE;
  +(*file)-flags = 0;
   return APR_SUCCESS;
   }
   
  @@ -216,7 +223,7 @@
   
   ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
   {
  -(*thefile) = ap_palloc(cont, sizeof(ap_file_t *));
  +(*thefile) = ap_palloc(cont, sizeof(struct file_t));
   if ((*thefile) == NULL) {
   return APR_ENOMEM;
   }
  @@ -227,6 +234,7 @@
   (*thefile)-buffered = FALSE;
   (*thefile)-validstatus = FALSE;
   (*thefile)-eof_hit = FALSE;
  +(*thefile)-flags = 0;
   
   return APR_SUCCESS;
   }
  
  
  
  1.6   +2 -0  apache-2.0/src/lib/apr/file_io/os2/pipe.c
  
  Index: pipe.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/pipe.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- pipe.c1999/10/19 15:24:19 1.5
  +++ pipe.c2000/01/10 14:21:54 1.6
  @@ -76,6 +76,7 @@
   (*in)-fname = ap_pstrdup(cont, PIPE);
   (*in)-isopen = TRUE;
   (*in)-buffered = FALSE;
  +(*in)-flags = 0;
   ap_register_cleanup(cont, *in, file_cleanup, ap_null_cleanup);
   
   (*out) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
  @@ -84,6 +85,7 @@
   (*out)-fname = ap_pstrdup(cont, PIPE);
   (*out)-isopen = TRUE;
   (*out)-buffered = FALSE;
  +(*out)-flags = 0;
   ap_register_cleanup(cont, *out, file_cleanup, ap_null_cleanup);
   
   return APR_SUCCESS;
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_dir.c mod_mime.c mod_negotiation.c

2000-01-10 Thread bjh
bjh 00/01/10 07:35:53

  Modified:src/lib/apr/file_io/os2 fileacc.c filedup.c fileio.h
filestat.c open.c readwrite.c seek.c
   src/lib/apr/file_io/unix fileacc.c filestat.c
   src/lib/apr/include apr_file_io.h
   src/main http_request.c util.c
   src/modules/standard mod_autoindex.c mod_cern_meta.c
mod_cgi.c mod_dir.c mod_mime.c mod_negotiation.c
  Log:
  Rework ap_finfo_t to split the file type out of the protection field.
  I've taken a stab at the unix implementation but tested only on OS/2.
  
  Revision  ChangesPath
  1.6   +0 -146apache-2.0/src/lib/apr/file_io/os2/fileacc.c
  
  Index: fileacc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileacc.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- fileacc.c 1999/10/18 10:14:46 1.5
  +++ fileacc.c 2000/01/10 15:35:44 1.6
  @@ -76,152 +76,6 @@
   
   
   
  -ap_status_t ap_get_filesize(ap_ssize_t *size, struct file_t *file)
  -{
  -ap_status_t rv;
  -
  -if (file != NULL) {
  -if (!file-validstatus) {
  -rv = ap_getfileinfo(file);
  -
  -if (rv)
  -return rv;
  -}
  -
  -*size = file-status.cbFile;
  -return APR_SUCCESS;
  -} else {
  -*size = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
  -ap_status_t ap_get_fileperms(ap_fileperms_t *perm, struct file_t *file)
  -{
  -ap_status_t rv;
  -  
  -if (file != NULL) {
  -if (!file-validstatus) {
  -rv = ap_getfileinfo(file);
  -
  -if (rv)
  -return rv;
  -}
  -
  -*perm = (file-status.attrFile  FILE_READONLY) ? 0555 : 0777;
  -return APR_SUCCESS;
  -} else {
  -*perm = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
  -ap_status_t ap_get_fileatime(time_t *time, struct file_t *file)
  -{
  -ap_status_t rv;
  -
  -if (file != NULL) {
  -if (!file-validstatus) {
  -rv = ap_getfileinfo(file);
  -
  -if (rv)
  -return rv;
  -}
  -
  -*time = os2date2unix( file-status.fdateLastAccess, 
file-status.ftimeLastAccess );
  -return APR_SUCCESS;
  -} else {
  -*time = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
  -ap_status_t ap_get_filectime(time_t *time, struct file_t *file)
  -{
  -ap_status_t rv;
  -
  -if (file != NULL) {
  -if (!file-validstatus) {
  -rv = ap_getfileinfo(file);
  -
  -if (rv)
  -return rv;
  -}
  -
  -*time = os2date2unix( file-status.fdateCreation, 
file-status.ftimeCreation );
  -return APR_SUCCESS;
  -}
  -else {
  -*time = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
  -ap_status_t ap_get_filemtime(time_t *time, struct file_t *file)
  -{
  -ap_status_t rv;
  -
  -if (file != NULL) {
  -if (!file-validstatus) {
  -rv = ap_getfileinfo(file);
  -
  -if (rv)
  -return rv;
  -}
  -
  -*time = os2date2unix( file-status.fdateLastWrite, 
file-status.ftimeLastWrite );
  -return APR_SUCCESS;
  -}
  -else {
  -*time = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
  -ap_status_t ap_get_filetype(ap_filetype_e *type, struct file_t *file)
  -{
  -ULONG rc, filetype, fileattr;
  -
  -if (file != NULL  file-isopen) {
  -rc = DosQueryHType( file-filedes, filetype, fileattr );
  -
  -if (rc)
  -return os2errno(rc);
  -
  -switch (filetype  0xff) {
  -case 0:
  -*type = APR_REG;
  -break;
  -
  -case 1:
  -*type = APR_CHR;
  -break;
  -
  -case 2:
  -*type = APR_PIPE;
  -break;
  -}
  -
  -return APR_SUCCESS;
  -}
  -else {
  -*type = APR_REG;
  -return APR_ENOFILE;
  -}
  -}
  -
  -
  -
   ap_status_t ap_get_filedata(void **data, char *key, struct file_t *file)
   {
   if (file != NULL) {
  
  
  
  1.6   +0 -1  apache-2.0/src/lib/apr/file_io/os2/filedup.c
  
  Index: filedup.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/filedup.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- filedup.c 2000/01/10 14:21:53 1.5
  +++ filedup.c 2000/01/10 15:35:45 1.6
  @@ -87,7 +87,6 @@
   
   dup_file-fname = ap_pstrdup(dup_file-cntxt, old_file-fname);
   dup_file-buffered = old_file-buffered;
  -dup_file

cvs commit: apache-2.0/src/lib/apr/test testproc.c

2000-01-10 Thread bjh
bjh 00/01/10 08:01:58

  Modified:src/lib/apr/test testproc.c
  Log:
  I don't think sleeping for 1000 seconds is what we want to do here. Switch
  it for a child wait which is more appropriate and tests another function.
  
  Revision  ChangesPath
  1.10  +7 -1  apache-2.0/src/lib/apr/test/testproc.c
  
  Index: testproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testproc.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- testproc.c2000/01/04 19:00:49 1.9
  +++ testproc.c2000/01/10 16:01:57 1.10
  @@ -168,7 +168,13 @@
   }
   else fprintf(stderr, Read failed.\n);
   
  -sleep(1000);
  +fprintf(stdout, Waiting for child to die...);
  +if (ap_wait_proc(newproc, APR_WAIT) != APR_CHILD_DONE) {
  +fprintf(stderr, Wait for child failed\n);
  +exit(-1);
  +}
  +fprintf(stdout, OK\n);
  +
   fprintf(stdout, Removing directory...);
   if (ap_remove_dir(proctest, context) != APR_SUCCESS) {
   fprintf(stderr, Could not remove directory.\n);
  
  
  


cvs commit: apache-2.0/src/lib/apr/time/os2 .cvsignore Makefile.in default.c

1999-12-21 Thread bjh
bjh 99/12/20 17:45:24

  Removed: src/lib/apr/time/os2 .cvsignore Makefile.in default.c
  Log:
  Remove OS/2 version of time library, the default unix code works just fine.


cvs commit: apache-2.0/src/lib/apr/time/unix time.c

1999-12-21 Thread bjh
bjh 99/12/21 07:16:39

  Modified:src/lib/apr/time/unix time.c
  Log:
  Prevent segfault on comparing an uninitialized ap_time_t object. Treat it
  as a zero value, same as a NULL ap_time_t pointer.
  
  Revision  ChangesPath
  1.14  +2 -2  apache-2.0/src/lib/apr/time/unix/time.c
  
  Index: time.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- time.c1999/12/20 16:10:16 1.13
  +++ time.c1999/12/21 15:16:36 1.14
  @@ -237,10 +237,10 @@
*/
   ap_status_t ap_timecmp(struct atime_t *a, struct atime_t *b)
   {
  -if (a == NULL) {
  +if (a == NULL || a-currtime == NULL) {
   return APR_LESS;
   }
  -else if (b == NULL) {
  +else if (b == NULL || b-currtime == NULL) {
   return APR_MORE;
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 filedup.c

1999-12-19 Thread bjh
bjh 99/12/19 00:00:32

  Modified:src/lib/apr/file_io/os2 filedup.c
  Log:
  OS/2: Let the user supply two file descriptors to ap_dupfile to make
  them equivalent.
  
  Revision  ChangesPath
  1.4   +24 -13apache-2.0/src/lib/apr/file_io/os2/filedup.c
  
  Index: filedup.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/filedup.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- filedup.c 1999/10/12 06:14:40 1.3
  +++ filedup.c 1999/12/19 08:00:28 1.4
  @@ -64,26 +64,37 @@
   ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file)
   {
   int rv;
  -struct file_t *dup_file = (struct file_t *)ap_palloc(old_file-cntxt, 
sizeof(struct file_t));
  -
  -if (new_file == NULL) {
  -return APR_ENOMEM;
  -} 
  -
  -dup_file-filedes = -1;
  +struct file_t *dup_file;
  +
  +if (*new_file == NULL) {
  +dup_file = (struct file_t *)ap_palloc(old_file-cntxt, sizeof(struct 
file_t));
  +
  +if (dup_file == NULL) {
  +return APR_ENOMEM;
  +}
  +
  +dup_file-filedes = -1;
  +dup_file-cntxt = old_file-cntxt;
  +} else {
  +  dup_file = *new_file;
  +}
  +
   rv = DosDupHandle(old_file-filedes, dup_file-filedes);
  -
  +
   if (rv) {
   return os2errno(rv);
   }
  -
  -dup_file-cntxt = old_file-cntxt;
  +
   dup_file-fname = ap_pstrdup(dup_file-cntxt, old_file-fname);
   dup_file-buffered = old_file-buffered;
   dup_file-status = old_file-status;
   dup_file-isopen = old_file-isopen;
  -*new_file = dup_file;
  -ap_register_cleanup(dup_file-cntxt, dup_file, file_cleanup,
  -ap_null_cleanup);
  +
  +if (*new_file == NULL) {
  +ap_register_cleanup(dup_file-cntxt, dup_file, file_cleanup,
  +ap_null_cleanup);
  +*new_file = dup_file;
  +}
  +
   return APR_SUCCESS;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 open.c

1999-12-19 Thread bjh
bjh 99/12/19 00:03:29

  Modified:src/lib/apr/file_io/os2 open.c
  Log:
  OS/2: Fix a couple of uninitialized fields in ap_put_os_file().
  
  Revision  ChangesPath
  1.11  +2 -0  apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- open.c1999/10/20 15:11:20 1.10
  +++ open.c1999/12/19 08:03:28 1.11
  @@ -197,6 +197,8 @@
   (*file)-filedes = *dafile;
   (*file)-isopen = TRUE;
   (*file)-buffered = FALSE;
  +(*file)-validstatus = FALSE;
  +(*file)-eof_hit = FALSE;
   return APR_SUCCESS;
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 open.c

1999-12-19 Thread bjh
bjh 99/12/19 00:05:07

  Modified:src/lib/apr/file_io/os2 open.c
  Log:
  OS/2: Implement ap_open_stderr()
  
  Revision  ChangesPath
  1.12  +19 -0 apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- open.c1999/12/19 08:03:28 1.11
  +++ open.c1999/12/19 08:05:07 1.12
  @@ -211,3 +211,22 @@
   }
   return APR_SUCCESS;
   }   
  +
  +
  +
  +ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
  +{
  +(*thefile) = ap_palloc(cont, sizeof(ap_file_t *));
  +if ((*thefile) == NULL) {
  +return APR_ENOMEM;
  +}
  +(*thefile)-cntxt = cont;
  +(*thefile)-filedes = 2;
  +(*thefile)-fname = NULL;
  +(*thefile)-isopen = TRUE;
  +(*thefile)-buffered = FALSE;
  +(*thefile)-validstatus = FALSE;
  +(*thefile)-eof_hit = FALSE;
  +
  +return APR_SUCCESS;
  +}
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 readwrite.c

1999-12-19 Thread bjh
bjh 99/12/19 00:16:03

  Modified:src/lib/apr/file_io/os2 readwrite.c
  Log:
  Fix a warning implicit declaration of function `malloc'
  
  Revision  ChangesPath
  1.10  +1 -0  apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- readwrite.c   1999/11/08 05:59:18 1.9
  +++ readwrite.c   1999/12/19 08:16:02 1.10
  @@ -59,6 +59,7 @@
   
   #define INCL_DOS
   #include os2.h
  +#include malloc.h
   
   ap_status_t ap_read(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
   {
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

1999-12-19 Thread bjh
bjh 99/12/19 00:33:53

  Modified:src/lib/apr/threadproc/os2 proc.c
  Log:
  Adapt to change where arg[0] to ap_create_process() now contains the
  program name.
  
  Revision  ChangesPath
  1.11  +2 -1  apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- proc.c1999/11/03 08:06:00 1.10
  +++ proc.c1999/12/19 08:33:52 1.11
  @@ -56,6 +56,7 @@
   #include threadproc.h
   #include fileio.h
   
  +#include apr_config.h
   #include apr_thread_proc.h
   #include apr_file_io.h
   #include apr_general.h
  @@ -314,7 +315,7 @@
   newargs[numargs++] = /c;
   
   newargs[numargs++] = newprogname = ap_pstrdup(cont, progname);
  -arg = 0;
  +arg = 1;
   
   while (args  args[arg]) {
   newargs[numargs++] = args[arg++];
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 fileio.h

1999-12-19 Thread bjh
bjh 99/12/19 01:41:26

  Modified:src/lib/apr/file_io/os2 fileio.h
  Log:
  OS/2: Include apr_config.h so HAVE_* macros are available to file I/O code.
  
  Revision  ChangesPath
  1.5   +1 -0  apache-2.0/src/lib/apr/file_io/os2/fileio.h
  
  Index: fileio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileio.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- fileio.h  1999/10/19 15:29:04 1.4
  +++ fileio.h  1999/12/19 09:41:26 1.5
  @@ -59,6 +59,7 @@
   #define INCL_DOS
   #include os2.h
   
  +#include apr_config.h
   #include apr_general.h
   #include apr_file_io.h
   #include apr_errno.h
  
  
  


cvs commit: apache-1.3/src/modules/standard mod_include.c

1999-12-11 Thread bjh
bjh 99/12/10 16:36:20

  Modified:src/modules/standard mod_include.c
  Log:
  Clean up an unused variable warning.
  
  Revision  ChangesPath
  1.120 +1 -1  apache-1.3/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_include.c,v
  retrieving revision 1.119
  retrieving revision 1.120
  diff -u -r1.119 -r1.120
  --- mod_include.c 1999/10/21 20:45:29 1.119
  +++ mod_include.c 1999/12/11 00:36:17 1.120
  @@ -786,7 +786,7 @@
   FILE *dbg = fopen(/dev/tty, w);
   #endif
   #endif
  -#ifndef WIN32
  +#if !defined(WIN32)  !defined(OS2)
   char err_string[MAX_STRING_LEN];
   #endif
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/misc/os2 misc.h Makefile.in getopt.c start.c

1999-12-08 Thread bjh
bjh 99/12/07 17:00:51

  Modified:src/lib/apr/misc/os2 misc.h
  Removed: src/lib/apr/misc/os2 Makefile.in getopt.c start.c
  Log:
  Clean out OS/2 version of APR misc library.
  
  Revision  ChangesPath
  1.4   +1 -15 apache-2.0/src/lib/apr/misc/os2/misc.h
  
  Index: misc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/misc.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- misc.h1999/11/20 22:05:14 1.3
  +++ misc.h1999/12/08 01:00:38 1.4
  @@ -53,18 +53,4 @@
*
*/
   
  -#ifndef MISC_H
  -#define MISC_H
  -
  -#include apr_general.h
  -#include apr_file_io.h
  -#include apr_errno.h
  -#include apr_getopt.h
  -
  -struct context_t {
  -struct ap_pool_t *pool;
  -void *prog_data;
  -};
  -
  -#endif  /* ! MISC_H */
  -
  +#include ../unix/misc.h
  
  
  


cvs commit: apache-1.3 configure

1999-12-07 Thread bjh
bjh 99/12/07 06:15:03

  Modified:.configure
  Log:
  Give OS/2 back a default layout, disabled by previous patch.
  
  Revision  ChangesPath
  1.112 +1 -0  apache-1.3/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-1.3/configure,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- configure 1999/12/04 00:59:52 1.111
  +++ configure 1999/12/07 14:14:59 1.112
  @@ -322,6 +322,7 @@
iflags_dso=${iflags_dso} -S \-S\
;;
   *OS/2* ) 
  +default_layout=Apache
   iflags_program=${iflags_program} -e .exe 
   iflags_core=${iflags_core} -e .exe 
   ;;
  
  
  


cvs commit: apache-2.0 configure

1999-12-07 Thread bjh
bjh 99/12/07 06:20:12

  Modified:.configure
  Log:
  Give OS/2 back a default layout, disabled by previous patch.
  
  Revision  ChangesPath
  1.7   +1 -0  apache-2.0/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-2.0/configure,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- configure 1999/12/04 01:01:03 1.6
  +++ configure 1999/12/07 14:20:10 1.7
  @@ -323,6 +323,7 @@
iflags_dso=${iflags_dso} -S \-S\
;;
   *OS/2* ) 
  + default_layout=Apache
   iflags_program=$iflags_program -e .exe 
   iflags_core=$iflags_core -e .exe 
   ;;
  
  
  


cvs commit: apache-2.0/src/ap ap_hooks.c

1999-11-28 Thread bjh
bjh 99/11/28 05:32:16

  Modified:src/ap   ap_hooks.c
  Log:
  Fix hook sorting. When walking a linked list it's a good idea to start
  at the head rather than the first element of the array. This makes
  mod_userdir actually work.
  
  Revision  ChangesPath
  1.8   +1 -1  apache-2.0/src/ap/ap_hooks.c
  
  Index: ap_hooks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/ap/ap_hooks.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ap_hooks.c1999/10/04 16:36:44 1.7
  +++ ap_hooks.c1999/11/28 13:32:15 1.8
  @@ -120,7 +120,7 @@
   
   ap_create_context(p, g_pHookPool);
   pSort=prepare(p,(TSortData *)pHooks-elts,pHooks-nelts);
  -tsort(pSort,pHooks-nelts);
  +pSort=tsort(pSort,pHooks-nelts);
   pNew=ap_make_array(g_pHookPool,pHooks-nelts,sizeof(TSortData));
   if(g_bDebugHooks)
printf(Sorting %s:,szName);
  
  
  


cvs commit: apache-1.3/src/main util_script.c

1999-11-27 Thread bjh
bjh 99/11/27 06:48:37

  Modified:src/main util_script.c
  Log:
  OS/2: Add a handful of environment variables that should be passed to CGI
  scripts by default.
  
  Revision  ChangesPath
  1.147 +16 -1 apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.146
  retrieving revision 1.147
  diff -u -r1.146 -r1.147
  --- util_script.c 1999/10/21 20:44:45 1.146
  +++ util_script.c 1999/11/27 14:48:36 1.147
  @@ -200,7 +200,7 @@
   conn_rec *c = r-connection;
   const char *rem_logname;
   char *env_path;
  -#ifdef WIN32
  +#if defined(WIN32) || defined(OS2)
   char *env_temp;
   #endif
   const char *host;
  @@ -263,6 +263,21 @@
   }
   if (env_temp = getenv(WINDIR)) {
   ap_table_addn(e, WINDIR, env_temp);
  +}
  +#endif
  +
  +#ifdef OS2
  +if (env_temp = getenv(COMSPEC)) {
  +ap_table_addn(e, COMSPEC, env_temp);
  +}
  +if (env_temp = getenv(ETC)) {
  +ap_table_addn(e, ETC, env_temp);
  +}
  +if (env_temp = getenv(DPATH)) {
  +ap_table_addn(e, DPATH, env_temp);
  +}
  +if (env_temp = getenv(PERLLIB_PREFIX)) {
  +ap_table_addn(e, PERLLIB_PREFIX, env_temp);
   }
   #endif
   
  
  
  


cvs commit: apache-1.3/src/os/os2 os.c

1999-11-27 Thread bjh
bjh 99/11/27 06:52:36

  Modified:src/os/os2 os.c
  Log:
  Add an important piece of information to the error message when a module
  fails to load, the name of the dll that caused the problem. This can be
  different from the module dll if it depends on another dll and that
  other dll can't be found.
  
  Revision  ChangesPath
  1.4   +6 -2  apache-1.3/src/os/os2/os.c
  
  Index: os.c
  ===
  RCS file: /home/cvs/apache-1.3/src/os/os2/os.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- os.c  1999/05/07 05:49:46 1.3
  +++ os.c  1999/11/27 14:52:35 1.4
  @@ -9,6 +9,7 @@
   #include stdio.h
   
   static int rc=0;
  +static char errorstr[20];
   
   void ap_os_dso_init(void)
   {
  @@ -18,7 +19,6 @@
   
   ap_os_dso_handle_t ap_os_dso_load(const char *module_name)
   {
  -char errorstr[200];
   HMODULE handle;
   
   rc = DosLoadModule(errorstr, sizeof(errorstr), module_name, handle);
  @@ -54,5 +54,9 @@
   
   const char *ap_os_dso_error(void)
   {
  -return ap_os_error_message(rc);
  +static char message[200];
  +strcpy(message, ap_os_error_message(rc));
  +strcat(message,  for module );
  +strcat(message, errorstr);
  +return message;
   }
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_so.c

1999-11-14 Thread bjh
bjh 99/11/13 22:07:41

  Modified:src/modules/standard mod_so.c
  Log:
  Make mod_so.c compile. Loading modules crashes for me though, haven't figured
  out why yet
  
  Revision  ChangesPath
  1.5   +11 -20apache-2.0/src/modules/standard/mod_so.c
  
  Index: mod_so.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_so.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_so.c  1999/10/11 22:39:53 1.4
  +++ mod_so.c  1999/11/14 06:07:40 1.5
  @@ -168,11 +168,11 @@
* This is called as a cleanup function from the core.
*/
   
  -static void unload_module(moduleinfo *modi)
  +static ap_status_t unload_module(moduleinfo *modi)
   {
   /* only unload if module information is still existing */
   if (modi-modp == NULL)
  -return;
  +return APR_SUCCESS;
   
   /* remove the module pointer from the core structure */
   ap_remove_loaded_module(modi-modp);
  @@ -183,6 +183,7 @@
   /* destroy the module information */
   modi-modp = NULL;
   modi-name = NULL;
  +return APR_SUCCESS;
   }
   
   /* 
  @@ -192,9 +193,10 @@
* or include the filename in error message.
*/
   
  -static void unload_file(void *handle)
  +static ap_status_t unload_file(void *handle)
   {
   ap_os_dso_unload((ap_os_dso_handle_t)handle);
  +return APR_SUCCESS;
   }
   
   /* 
  @@ -238,7 +240,7 @@
my_error ? my_error : (reason unknown),
NULL);
   }
  -ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL,
  +ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
loaded module %s, modname);
   
   /*
  @@ -274,7 +276,7 @@
* shared object to be unloaded.
*/
   ap_register_cleanup(cmd-pool, modi, 
  -  (void (*)(void*))unload_module, ap_null_cleanup);
  +  (ap_status_t (*)(void*))unload_module, ap_null_cleanup);
   
   /* 
* Finally we need to run the configuration process for the module
  @@ -292,7 +294,7 @@
   static const char *load_file(cmd_parms *cmd, void *dummy, char *filename)
   {
   ap_os_dso_handle_t handle;
  -char *file;
  +const char *file;
   
   file = ap_server_root_relative(cmd-pool, filename);
   
  @@ -304,7 +306,7 @@
NULL);
   }
   
  -ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, NULL,
  +ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
loaded file %s, filename);
   
   ap_register_cleanup(cmd-pool, (void *)handle, unload_file, 
ap_null_cleanup);
  @@ -338,23 +340,12 @@
   };
   
   module MODULE_VAR_EXPORT so_module = {
  -   STANDARD_MODULE_STUFF,
  -   NULL, /* initializer */
  +   STANDARD20_MODULE_STUFF,
  NULL, /* create per-dir config */
  NULL, /* merge per-dir config */
  so_sconf_create,  /* server config */
  NULL, /* merge server config */
  so_cmds,  /* command ap_table_t */
  NULL, /* handlers */
  -   NULL, /* filename translation */
  -   NULL, /* check_user_id */
  -   NULL, /* check auth */
  -   NULL, /* check access */
  -   NULL, /* type_checker */
  -   NULL, /* fixer_upper */
  -   NULL, /* logger */
  -   NULL, /* header parser */
  -   NULL, /* child_init */
  -   NULL, /* child_exit */
  -   NULL  /* post read-request */
  +   NULL  /* register hooks */
   };
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 readwrite.c

1999-11-08 Thread bjh
bjh 99/11/07 21:59:24

  Modified:src/lib/apr/file_io/os2 readwrite.c
  Log:
  Reomve a missed APR_EOF return from ap_read().
  
  Revision  ChangesPath
  1.9   +0 -1  apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- readwrite.c   1999/11/07 06:58:50 1.8
  +++ readwrite.c   1999/11/08 05:59:18 1.9
  @@ -118,7 +118,6 @@
   
   if (bytesread == 0) {
   thefile-eof_hit = TRUE;
  -return APR_EOF;
   }
   
   return APR_SUCCESS;
  
  
  


cvs commit: apache-2.0/src/main http_config.c http_core.c http_log.c

1999-11-08 Thread bjh
bjh 99/11/07 22:05:52

  Modified:src/main http_config.c http_core.c http_log.c
  Log:
  Get rid of a number of 'incompatible pointer type' warnings using
  ap_os_{get,put}_file() on platforms who's ap_os_file_t is not an int.
  
  Revision  ChangesPath
  1.17  +1 -1  apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- http_config.c 1999/11/02 15:15:06 1.16
  +++ http_config.c 1999/11/08 06:05:48 1.17
  @@ -1247,7 +1247,7 @@
   
   static server_rec *init_server_config(process_rec *process, ap_context_t *p)
   {
  -int errfile = STDERR_FILENO;
  +ap_os_file_t errfile = STDERR_FILENO;
   server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec));
   
   s-process = process;
  
  
  
  1.22  +1 -1  apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- http_core.c   1999/10/21 18:28:14 1.21
  +++ http_core.c   1999/11/08 06:05:50 1.22
  @@ -2475,7 +2475,7 @@
(core_dir_config *)ap_get_module_config(r-per_dir_config, 
core_module);
   int rangestatus, errstatus;
   ap_file_t *fd = NULL;
  -int fd_os;
  +ap_os_file_t fd_os;
   ap_status_t status;
   #ifdef USE_MMAP_FILES
   caddr_t mm;
  
  
  
  1.16  +3 -3  apache-2.0/src/main/http_log.c
  
  Index: http_log.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_log.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_log.c1999/11/05 21:01:44 1.15
  +++ http_log.c1999/11/08 06:05:50 1.16
  @@ -274,7 +274,7 @@
   {
   server_rec *virt, *q;
   int replace_stderr;
  -int errfile;
  +ap_os_file_t errfile;
   
   open_error_log(s_main, p);
   
  @@ -316,7 +316,7 @@
   }
   
   API_EXPORT(void) ap_error_log2stderr(server_rec *s) {
  -int errfile;
  +ap_os_file_t errfile;
   
   ap_get_os_file(errfile, s-error_log);
   if (   s-error_log != NULL
  @@ -331,7 +331,7 @@
   char errstr[MAX_STRING_LEN + 1];/* + 1 to have room for '\n' */
   size_t len;
   ap_file_t *logf = NULL;
  -int errfileno = STDERR_FILENO;
  +ap_os_file_t errfileno = STDERR_FILENO;
   
   if (s == NULL) {
/*
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 readwrite.c

1999-11-07 Thread bjh
bjh 99/11/06 22:58:52

  Modified:src/lib/apr/file_io/os2 readwrite.c
  Log:
  OS/2: make ap_read/ap_write thread safe when buffered.
  
  Revision  ChangesPath
  1.8   +6 -0  apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- readwrite.c   1999/11/05 21:16:16 1.7
  +++ readwrite.c   1999/11/07 06:58:50 1.8
  @@ -75,6 +75,8 @@
   ULONG blocksize;
   ULONG size = *nbytes;
   
  +DosEnterCritSec();
  +
   if (thefile-direction == 1) {
   ap_flush(thefile);
   thefile-bufpos = 0;
  @@ -102,6 +104,7 @@
   }
   
   *nbytes = rc == 0 ? pos - (char *)buf : 0;
  +DosExitCritSec();
   return os2errno(rc);
   } else {
   rc = DosRead(thefile-filedes, buf, *nbytes, bytesread);
  @@ -139,6 +142,8 @@
   int blocksize;
   int size = *nbytes;
   
  +DosEnterCritSec();
  +
   if ( thefile-direction == 0 ) {
   // Position file pointer for writing at the offset we are 
logically reading from
   ULONG offset = thefile-filePtr - thefile-dataRead + 
thefile-bufpos;
  @@ -159,6 +164,7 @@
   size -= blocksize;
   }
   
  +DosExitCritSec();
   return os2errno(rc);
   } else {
   rc = DosWrite(thefile-filedes, buf, *nbytes, byteswritten);
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

1999-11-03 Thread bjh
bjh 99/11/03 00:06:01

  Modified:src/lib/apr/threadproc/os2 proc.c
  Log:
  Some fixes for OS/2 process creation:
  - Allow NULL environment block
  - Allow .exe extension to be omitted
  
  Revision  ChangesPath
  1.10  +20 -13apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- proc.c1999/10/26 15:16:56 1.9
  +++ proc.c1999/11/03 08:06:00 1.10
  @@ -261,15 +261,19 @@
   interpreter[0] = 0;
   extension = strrchr(progname, '.');
   
  -if (extension == NULL)
  +if (extension == NULL || strchr(extension, '/') || strchr(extension, 
'\\'))
   extension = ;
   
   if (attr-cmdtype == APR_SHELLCMD || strcasecmp(extension, .cmd) == 0) 
{
   strcpy(interpreter, #! SHELL_PATH);
   extra_arg = /C;
  -} else if (stricmp(progname, .exe) != 0) {
  +} else if (stricmp(extension, .exe) != 0) {
   status = ap_open(progfile, progname, APR_READ|APR_BUFFERED, 0, 
cont);
   
  +if (status == APR_ENOENT) {
  +progname = ap_pstrcat(cont, progname, .exe, NULL);
  +}
  +
   if (status == APR_SUCCESS) {
   status = ap_fgets(interpreter, sizeof(interpreter), progfile);
   
  @@ -350,18 +354,21 @@
   }
   
   /* Create environment block from list of envariables */
  -for (env_len=1, e=0; env[e]; e++)
  -env_len += strlen(env[e]) + 1;
  -
  -env_block = ap_palloc(cont, env_len);
  -env_block_pos = env_block;
  -
  -for (e=0; env[e]; e++) {
  -strcpy(env_block_pos, env[e]);
  -env_block_pos += strlen(env_block_pos) + 1;
  -}
  +if (env) {
  +for (env_len=1, e=0; env[e]; e++)
  +env_len += strlen(env[e]) + 1;
  +
  +env_block = ap_palloc(cont, env_len);
  +env_block_pos = env_block;
  +
  +for (e=0; env[e]; e++) {
  +strcpy(env_block_pos, env[e]);
  +env_block_pos += strlen(env_block_pos) + 1;
  +}
   
  -*env_block_pos = 0; /* environment block is terminated by a double null 
*/
  +*env_block_pos = 0; /* environment block is terminated by a double 
null */
  +} else
  +env_block = NULL;
   
   status = DosExecPgm(error_object, sizeof(error_object), 
   attr-detached ? EXEC_BACKGROUND : EXEC_ASYNC, 
  
  
  


cvs commit: apache-2.0/src/main http_protocol.c

1999-11-03 Thread bjh
bjh 99/11/03 04:47:24

  Modified:src/lib/apr/file_io/os2 readwrite.c
   src/main http_protocol.c
  Log:
  OS/2: Don't return APR_EOF from ap_read(). EOF is indicated by a APR_SUCCESS
  status with nbytes set to 0.
  
  Revision  ChangesPath
  1.6   +10 -15apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- readwrite.c   1999/10/19 15:24:19 1.5
  +++ readwrite.c   1999/11/03 12:47:22 1.6
  @@ -85,8 +85,11 @@
   while (rc == 0  size  0) {
   if (thefile-bufpos = thefile-dataRead) {
   rc = DosRead(thefile-filedes, thefile-buffer, 
APR_FILE_BUFSIZE, thefile-dataRead );
  -if (thefile-dataRead == 0)
  +if (thefile-dataRead == 0) {
  +if (rc == 0)
  +thefile-eof_hit = TRUE;
   break;
  +}
   thefile-filePtr += thefile-dataRead;
   thefile-bufpos = 0;
   }
  @@ -99,15 +102,6 @@
   }
   
   *nbytes = rc == 0 ? pos - (char *)buf : 0;
  -
  -// if an error occurred report it
  -// if we read some data but hit EOF before reading 'size' bytes, 
return Ok (0)
  -// if we hit EOF with no data read, return -1
  -if (size  rc == 0  pos == (char *)buf) {
  -thefile-eof_hit = TRUE;
  -*_errno() = APR_EOF;
  -return APR_EOF;
  -}
   return os2errno(rc);
   } else {
   rc = DosRead(thefile-filedes, buf, *nbytes, bytesread);
  @@ -307,15 +301,16 @@
   ap_status_t ap_fgets(char *str, int len, ap_file_t *thefile)
   {
   ssize_t readlen;
  -ap_status_t rv;
  +ap_status_t rv = APR_SUCCESS;
   int i;
   
   for (i = 0; i  len-1; i++) {
   readlen = 1;
   rv = ap_read(thefile, str+i, readlen);
  -
  -if (rv != APR_SUCCESS) {
  -return rv;
  +
  +if (readlen != 1) {
  +rv = APR_EOF;
  +break;
   }
   
   if (str[i] == '\r')
  @@ -324,7 +319,7 @@
   break;
   }
   str[i] = 0;
  -return APR_SUCCESS; 
  +return rv;
   }
   
   
  
  
  
  1.35  +1 -1  apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- http_protocol.c   1999/11/02 14:34:32 1.34
  +++ http_protocol.c   1999/11/03 12:47:23 1.35
  @@ -2111,7 +2111,7 @@
   while (!ap_is_aborted(r-connection)) {
   rv = ap_bread(fb, buf, sizeof(buf), n);
   if (n == 0) {
  -if (rv == APR_SUCCESS || rv == APR_EOF) {/* eof */
  +if (rv == APR_SUCCESS) {/* eof */
   (void) ap_rflush(r);
   break;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 networkio.h sendrecv.c sockets.c sockopt.c

1999-11-03 Thread bjh
bjh 99/11/03 06:03:27

  Modified:src/lib/apr/network_io/os2 networkio.h sendrecv.c sockets.c
sockopt.c
  Log:
  OS/2: Rework ap_send/ap_recv to time out properly on blocking sockets.
  
  Revision  ChangesPath
  1.6   +2 -1  apache-2.0/src/lib/apr/network_io/os2/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/networkio.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- networkio.h   1999/10/29 14:21:00 1.5
  +++ networkio.h   1999/11/03 14:03:25 1.6
  @@ -68,7 +68,8 @@
   struct sockaddr_in *local_addr;
   struct sockaddr_in *remote_addr;
   int addr_len;
  -int timeout; 
  +int timeout;
  +int nonblock;
   };
   
   struct pollfd_t {
  
  
  
  1.6   +68 -78apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sendrecv.c1999/10/29 14:21:01 1.5
  +++ sendrecv.c1999/11/03 14:03:25 1.6
  @@ -65,38 +65,34 @@
   ap_status_t ap_send(struct socket_t *sock, const char *buf, ap_ssize_t *len)
   {
   ssize_t rv;
  -
  +int fds, err = 0;
  +
   do {
  -rv = send(sock-socketdes, buf, (*len), 0);
  -} while (rv == -1  sock_errno() == SOCEINTR);
  +if (!sock-nonblock || err == SOCEWOULDBLOCK) {
  +fds = sock-socketdes;
  +rv = select(fds, 0, 1, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
   
  -if (rv == -1  sock_errno() == SOCEWOULDBLOCK  sock-timeout != 0) {
  -int fds;
  -int srv;
  +if (rv != 1) {
  +*len = -1;
  +err = sock_errno();
   
  -do {
  -fds = sock-socketdes;
  -srv = select(fds, 0, 1, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
  -} while (srv == -1  sock_errno() == SOCEINTR);
  +if (rv == 0)
  +return APR_TIMEUP;
   
  -if (srv == 0) {
  -(*len) = -1;
  -return APR_TIMEUP;
  -}
  -else if (srv  0) {
  -(*len) = -1;
  -return os2errno(sock_errno());
  -}
  -else {
  -do {
  -rv = send(sock-socketdes, buf, (*len), 0);
  -} while (rv == -1  sock_errno() == SOCEINTR);
  +if (err == SOCEINTR)
  +continue;
  +
  +return os2errno(err);
  +}
   }
  -}
   
  -if (rv  0) {
  -*len = 0;
  -return os2errno(sock_errno());
  +rv = send(sock-socketdes, buf, (*len), 0);
  +err = rv  0 ? sock_errno() : 0;
  +} while (err == SOCEINTR || err == SOCEWOULDBLOCK);
  +
  +if (err) {
  +*len = -1;
  +return os2errno(err);
   }
   
   (*len) = rv;
  @@ -108,38 +104,34 @@
   ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len)
   {
   ssize_t rv;
  -
  +int fds, err = 0;
  +
   do {
  -rv = recv(sock-socketdes, buf, (*len), 0);
  -} while (rv == -1  sock_errno() == SOCEINTR);
  +if (!sock-nonblock || err == SOCEWOULDBLOCK) {
  +fds = sock-socketdes;
  +rv = select(fds, 1, 0, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
   
  -if (rv == -1  sock_errno() == SOCEWOULDBLOCK  sock-timeout != 0) {
  -int fds;
  -int srv;
  +if (rv != 1) {
  +*len = -1;
  +err = sock_errno();
   
  -do {
  -fds = sock-socketdes;
  -srv = select(fds, 1, 0, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
  -} while (srv == -1  sock_errno() == SOCEINTR);
  +if (rv == 0)
  +return APR_TIMEUP;
   
  -if (srv == 0) {
  -(*len) = -1;
  -return APR_TIMEUP;
  -}
  -else if (srv  0) {
  -(*len) = -1;
  -return os2errno(sock_errno());
  -}
  -else {
  -do {
  -rv = recv(sock-socketdes, buf, (*len), 0);
  -} while (rv == -1  sock_errno() == SOCEINTR);
  +if (err == SOCEINTR)
  +continue;
  +
  +return os2errno(err);
  +}
   }
  -}
  +
  +rv = recv(sock-socketdes, buf, (*len), 0);
  +err = rv  0 ? sock_errno() : 0;
  +} while (err == SOCEINTR || err == SOCEWOULDBLOCK);
   
  -if (rv  0) {
  -*len = 0;
  -return os2errno(sock_errno());
  +if (err) {
  +*len = -1;
  +return os2errno(err);
   }
   
   (*len

cvs commit: apache-2.0/src/modules/standard mod_auth.c mod_imap.c mod_mime.c

1999-11-02 Thread bjh
bjh 99/11/02 07:15:11

  Modified:src/include httpd.h
   src/main http_config.c util.c
   src/modules/standard mod_auth.c mod_imap.c mod_mime.c
  Log:
  De-errno ap_pcfg_openfile().
  
  Revision  ChangesPath
  1.12  +1 -1  apache-2.0/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- httpd.h   1999/10/07 18:13:11 1.11
  +++ httpd.h   1999/11/02 15:15:04 1.12
  @@ -1004,7 +1004,7 @@
   } configfile_t;
   
   /* Open a configfile_t as FILE, return open configfile_t struct pointer */
  -API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char 
*name);
  +API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **, ap_context_t *p, 
const char *name);
   
   /* Allocate a configfile_t handle with user defined functions and params */
   API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char 
*descr,
  
  
  
  1.16  +6 -4  apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_config.c 1999/10/20 12:49:54 1.15
  +++ http_config.c 1999/11/02 15:15:06 1.16
  @@ -1040,8 +1040,8 @@
   parms.server = s;
   parms.override = (RSRC_CONF | OR_ALL)  ~(OR_AUTHCFG | OR_LIMIT);
   
  -if (!(parms.config_file = ap_pcfg_openfile(p,fname))) {
  - perror(fopen);
  +if (ap_pcfg_openfile(parms.config_file, p, fname) != APR_SUCCESS) {
  +/* ZZZ  use ap_strerror() once it exists to print an error message */
fprintf(stderr, %s: could not open document config file %s\n,
ap_server_argv0, fname);
exit(1);
  @@ -1070,6 +1070,7 @@
   const struct htaccess_result *cache;
   struct htaccess_result *new;
   void *dc = NULL;
  +ap_status_t status;
   
   /* firstly, search cache */
   for (cache = r-htaccess; cache != NULL; cache = cache-next)
  @@ -1091,8 +1092,9 @@
   while (access_name[0]) {
   filename = ap_make_full_path(r-pool, d,
ap_getword_conf(r-pool, access_name));
  +status = ap_pcfg_openfile(f, r-pool, filename);
   
  -if ((f = ap_pcfg_openfile(r-pool, filename)) != NULL) {
  +if (status == APR_SUCCESS) {
   
   dc = ap_create_per_dir_config(r-pool);
   
  @@ -1110,7 +1112,7 @@
   *result = dc;
   break;
   }
  -else if (errno != ENOENT  errno != ENOTDIR) {
  +else if (status != APR_ENOENT  status != APR_ENOTDIR) {
   ap_log_rerror(APLOG_MARK, APLOG_CRIT, errno, r,
 %s pcfg_openfile: unable to check htaccess file, 
 ensure it is readable,
  
  
  
  1.16  +13 -15apache-2.0/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- util.c1999/10/20 12:49:56 1.15
  +++ util.c1999/11/02 15:15:07 1.16
  @@ -855,41 +855,40 @@
   }
   
   /* Open a configfile_t as FILE, return open configfile_t struct pointer */
  -API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char 
*name)
  +API_EXPORT(ap_status_t) ap_pcfg_openfile(configfile_t **ret_cfg, 
ap_context_t *p, const char *name)
   {
   configfile_t *new_cfg;
   ap_file_t *file;
  -int saved_errno;
   ap_status_t stat;
   ap_filetype_e type;
   
   if (name == NULL) {
   ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL,
  Internal error: pcfg_openfile() called with NULL filename);
  -return NULL;
  +return APR_EBADF;
   }
   
   if (!ap_os_is_filename_valid(name)) {
   ap_log_error(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, NULL,
   Access to config file %s denied: not a valid filename,
   name);
  - errno = EACCES;
  -return NULL;
  +return APR_EACCES;
   }
  - 
  +
   stat = ap_open(file, name, APR_READ | APR_BUFFERED, APR_OS_DEFAULT, p);
   #ifdef DEBUG
  -saved_errno = errno;
   ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL,
   Opening config file %s (%s),
   name, (stat != APR_SUCCESS) ? strerror(errno) : 
successful);
  -errno = saved_errno;
   #endif
  +if (stat != APR_SUCCESS)
  +return stat;
  +
  +stat = ap_get_filetype(type, file);
   if (stat != APR_SUCCESS)
  -return NULL;
  +return stat

cvs commit: apache-2.0/src/modules/standard mod_asis.c

1999-11-01 Thread bjh
bjh 99/10/31 20:27:09

  Modified:src/modules/standard mod_asis.c
  Log:
  Fix mod_asis handler name. This was messed up with Ryans accidental
  search/replace of -i -  ap_context_t  and the subsequent fix was
  slightly out.
  
  Revision  ChangesPath
  1.12  +1 -1  apache-2.0/src/modules/standard/mod_asis.c
  
  Index: mod_asis.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_asis.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_asis.c1999/10/31 09:26:00 1.11
  +++ mod_asis.c1999/11/01 04:27:05 1.12
  @@ -118,7 +118,7 @@
   static const handler_rec asis_handlers[] =
   {
   {ASIS_MAGIC_TYPE, asis_handler},
  -{send-asis, asis_handler},
  +{send-as-is, asis_handler},
   {NULL}
   };
   
  
  
  


cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c

1999-11-01 Thread bjh
bjh 99/11/01 02:58:56

  Modified:src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  OS/2: Bump up thread stack size. 64k just wasn't enough when doing
  sub-requests in mod_include.
  
  Revision  ChangesPath
  1.20  +1 -1  apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- spmt_os2.c1999/10/29 14:37:31 1.19
  +++ spmt_os2.c1999/11/01 10:58:55 1.20
  @@ -1179,7 +1179,7 @@
   
   ap_update_child_status(slot, SERVER_STARTING, (request_rec *) NULL);
   
  -if ((tid = _beginthread(child_main, NULL, 65536, (void *)slot)) == -1) {
  +if ((tid = _beginthread(child_main, NULL,  256*1024, (void *)slot)) == 
-1) {
ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, s, _beginthread: 
Unable to create new thread);
   
/* _beginthread didn't succeed. Fix the scoreboard or else
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 maperrorcode.c

1999-11-01 Thread bjh
bjh 99/11/01 03:11:41

  Modified:src/lib/apr/file_io/os2 maperrorcode.c
  Log:
  OS/2: Error map shouldn't be a public symbol.
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c
  
  Index: maperrorcode.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maperrorcode.c1999/10/29 14:20:59 1.3
  +++ maperrorcode.c1999/11/01 11:11:40 1.4
  @@ -62,7 +62,7 @@
   #include ../../network_io/os2/os2calls.h
   
   
  -int errormap[][2] = {
  +static int errormap[][2] = {
   { NO_ERROR,   APR_SUCCESS  },
   { ERROR_FILE_NOT_FOUND,   APR_ENOENT   },
   { ERROR_PATH_NOT_FOUND,   APR_ENOENT   },
  
  
  


cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c

1999-11-01 Thread bjh
bjh 99/11/01 03:25:05

  Modified:src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  OS/2: When shutting down, kill off child threads properly before shutting
  down parent thread.
  
  Revision  ChangesPath
  1.21  +32 -13apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- spmt_os2.c1999/11/01 10:58:55 1.20
  +++ spmt_os2.c1999/11/01 11:25:04 1.21
  @@ -1524,20 +1524,39 @@
   }
   
   if (shutdown_pending) {
  - /* Time to gracefully shut down:
  -  * Don't worry about killing child threads for now, the all die when 
the parent exits
  -  */
  + /* Time to gracefully shut down */
  +const char *pidfile = NULL;
  +int slot;
  +TID tid;
  +ULONG rc;
   
  - /* cleanup pid file on normal shutdown */
  - {
  - const char *pidfile = NULL;
  - pidfile = ap_server_root_relative (pconf, ap_pid_fname);
  - if ( pidfile != NULL  unlink(pidfile) == 0)
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0,
  - server_conf,
  - removed PID file %s (pid=%ld),
  - pidfile, (long)getpid());
  - }
  +/* Kill off running threads */
  +for (slot=0; slotmax_daemons_limit; slot++) {
  +if (ap_scoreboard_image-servers[slot].status != SERVER_DEAD) {
  +tid = ap_scoreboard_image-parent[slot].tid;
  +rc = DosKillThread(tid);
  +
  +if (rc == 0) {
  +rc = DosWaitThread(tid, DCWW_WAIT);
  +
  +if (rc) {
  +ap_log_error(APLOG_MARK, 
APLOG_NOERRNO|APLOG_WARNING, 0, server_conf,
  + error %lu waiting for thread to 
terminate, rc);
  +}
  +} else {
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, 0, 
server_conf,
  + error %lu killing thread, rc);
  +}
  +}
  +}
  +
  +/* cleanup pid file on normal shutdown */
  +pidfile = ap_server_root_relative (pconf, ap_pid_fname);
  +if ( pidfile != NULL  unlink(pidfile) == 0)
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0,
  +server_conf,
  +removed PID file %s (pid=%ld),
  +pidfile, (long)getpid());
   
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, 0, server_conf,
caught SIGTERM, shutting down);
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_include.c

1999-11-01 Thread bjh
bjh 99/11/01 03:45:30

  Modified:src/modules/standard mod_include.c
  Log:
  First hack at getting mod_include to work. Everything seems to work ok but
  error handling probably needs some work.
  
  Revision  ChangesPath
  1.7   +121 -111  apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_include.c 1999/10/22 16:01:26 1.6
  +++ mod_include.c 1999/11/01 11:45:29 1.7
  @@ -199,20 +199,19 @@
*/
   #define GET_CHAR(f,c,ret,r) \
{ \
  -   int i = getc(f); \
  -   if (i == EOF) { /* either EOF or error -- needs error handling if latter 
*/ \
  -   if (ferror(f)) { \
  +   ap_status_t status = ap_getc(c, f); \
  +   if (status != APR_SUCCESS) { /* either EOF or error -- needs error 
handling if latter */ \
  +   if (status != APR_EOF) { \
  fprintf(stderr, encountered error in GET_CHAR macro,  \
  mod_include.\n); \
  } \
  FLUSH_BUF(r); \
  -   ap_pfclose(r-pool, f); \
  +   ap_close(f); \
  return ret; \
  } \
  -   c = (char)i; \
}
   
  -static int find_string(FILE *in, const char *str, request_rec *r, int 
printing)
  +static int find_string(ap_file_t *in, const char *str, request_rec *r, int 
printing)
   {
   int x, l = strlen(str), p;
   char outbuf[OUTBUFSIZE];
  @@ -245,16 +244,15 @@
   #undef GET_CHAR
   #define GET_CHAR(f,c,r,p) \
{ \
  -   int i = getc(f); \
  -   if (i == EOF) { /* either EOF or error -- needs error handling if latter 
*/ \
  -   if (ferror(f)) { \
  +   ap_status_t status = ap_getc(c, f); \
  +   if (status != APR_SUCCESS) { /* either EOF or error -- needs error 
handling if latter */ \
  +   if (status != APR_EOF) { \
  fprintf(stderr, encountered error in GET_CHAR macro,  \
  mod_include.\n); \
  } \
  -   ap_pfclose(p, f); \
  +   ap_close(f); \
  return r; \
  } \
  -   c = (char)i; \
}
   
   /*
  @@ -357,7 +355,7 @@
* the tag value is html decoded if dodecode is non-zero
*/
   
  -static char *get_tag(ap_context_t *p, FILE *in, char *tag, int tagbuf_len, 
int dodecode)
  +static char *get_tag(ap_context_t *p, ap_file_t *in, char *tag, int 
tagbuf_len, int dodecode)
   {
   char *t = tag, *tag_val, c, term;
   
  @@ -403,7 +401,7 @@
   GET_CHAR(in, c, NULL, p);   /* space before = */
   }
   if (c != '=') {
  -ungetc(c, in);
  +ap_ungetc(c, in);
   return NULL;
   }
   
  @@ -443,7 +441,7 @@
   return ap_pstrdup(p, tag_val);
   }
   
  -static int get_directive(FILE *in, char *dest, size_t len, ap_context_t *p)
  +static int get_directive(ap_file_t *in, char *dest, size_t len, ap_context_t 
*p)
   {
   char *d = dest;
   char c;
  @@ -650,7 +648,7 @@
   return 1;
   }
   
  -static int handle_include(FILE *in, request_rec *r, const char *error, int 
noexec)
  +static int handle_include(ap_file_t *in, request_rec *r, const char *error, 
int noexec)
   {
   char tag[MAX_STRING_LEN];
   char parsed_string[MAX_STRING_LEN];
  @@ -771,26 +769,61 @@
   char *s;
   } include_cmd_arg;
   
  -static int include_cmd_child(void *arg, child_info *pinfo)
  +
  +
  +static ap_status_t build_argv_list(char ***argv, request_rec *r, 
ap_context_t *p)
   {
  -request_rec *r = ((include_cmd_arg *) arg)-r;
  -char *s = ((include_cmd_arg *) arg)-s;
  +int numwords, x, idx;
  +char *w;
  +const char *args = r-args;
  +
  +if (!args || !args[0] || strchr(args, '=')) {
  +   *argv = NULL;
  +}
  +else {
  +/* count the number of keywords */
  +for (x = 0, numwords = 1; args[x]; x++) {
  +if (args[x] == '+') {
  +++numwords;
  +}
  +}
  +if (numwords  APACHE_ARG_MAX) {
  +numwords = APACHE_ARG_MAX;   /* Truncate args to prevent 
overrun */
  +}
  +*argv = (char **) ap_palloc(p, (numwords + 1) * sizeof(char *));
  +
  +for (x = 1, idx = 0; x = numwords; x++) {
  +w = ap_getword_nulls(p, args, '+');
  +ap_unescape_url(w);
  +(*argv)[idx++] = ap_escape_shell_cmd(p, w);
  +}
  +(*argv)[idx] = NULL;
  +}
  +
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +static int include_cmd(char *s, request_rec *r)
  +{
  +include_cmd_arg arg;
  +BUFF *script_in;
  +ap_procattr_t *procattr;
  +ap_proc_t *procnew;
  +ap_status_t rc;
   ap_table_t *env = r-subprocess_env;
  -int child_pid = 0;
  -#ifdef DEBUG_INCLUDE_CMD
  -#ifdef OS2
  -/* under OS/2 /dev/tty is referenced as con */
  -FILE *dbg = fopen(con, w);
  -#else
  -FILE *dbg = fopen(/dev

cvs commit: apache-2.0/src Configuration.tmpl

1999-11-01 Thread bjh
bjh 99/11/01 03:51:53

  Modified:src  Configuration.tmpl
  Log:
  mod_cgi  mod_include now build so include them by default.
  
  Revision  ChangesPath
  1.5   +2 -2  apache-2.0/src/Configuration.tmpl
  
  Index: Configuration.tmpl
  ===
  RCS file: /home/cvs/apache-2.0/src/Configuration.tmpl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Configuration.tmpl1999/09/01 22:48:11 1.4
  +++ Configuration.tmpl1999/11/01 11:51:52 1.5
  @@ -306,10 +306,10 @@
   ## mod_dir handles requests on directories and directory index files.
   ## mod_cgi handles CGI scripts.
   
  -###AddModule modules/standard/mod_include.o
  +AddModule modules/standard/mod_include.o
   AddModule modules/standard/mod_autoindex.o
   AddModule modules/standard/mod_dir.o
  -###AddModule modules/standard/mod_cgi.o
  +AddModule modules/standard/mod_cgi.o
   
   ## The asis module implements .asis file types, which allow the embedding
   ## of HTTP headers at the beginning of the document.  mod_imap handles 
internal 
  
  
  


cvs commit: apache-2.0/src/main http_protocol.c

1999-11-01 Thread bjh
bjh 99/11/01 02:50:48

  Modified:src/main http_protocol.c
  Log:
  In ap_send_fb_length() don't treat APR_EOF as a fatal error.
  
  Revision  ChangesPath
  1.32  +1 -1  apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- http_protocol.c   1999/10/31 09:13:22 1.31
  +++ http_protocol.c   1999/11/01 10:50:47 1.32
  @@ -2095,7 +2095,7 @@
   while (!ap_is_aborted(r-connection)) {
   rv = ap_bread(fb, buf, sizeof(buf), n);
   if (n == 0) {
  -if (rv == APR_SUCCESS) {/* eof */
  +if (rv == APR_SUCCESS || rv == APR_EOF) {/* eof */
   (void) ap_rflush(r);
   break;
   }
  
  
  


cvs commit: apache-2.0/src/main util_script.c

1999-10-31 Thread bjh
bjh 99/10/31 01:26:04

  Modified:src/modules/standard mod_asis.c
   src/include util_script.h
   src/main util_script.c
  Log:
  Eliminate use of FILE *  ap_get_os_file() in mod_asis by APRizing
  ap_scan_script_header_err().
  
  Revision  ChangesPath
  1.11  +1 -8  apache-2.0/src/modules/standard/mod_asis.c
  
  Index: mod_asis.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_asis.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_asis.c1999/10/20 12:50:07 1.10
  +++ mod_asis.c1999/10/31 09:26:00 1.11
  @@ -68,8 +68,6 @@
   ap_file_t *f;
   ap_status_t status;
   const char *location;
  -FILE *thefile; /* XXX leave these alone until we convert */
  -int thefd; /* everything to use apr_file_t's. */ 
   
   r-allowed |= (1  M_GET);
   if (r-method_number != M_GET)
  @@ -87,10 +85,7 @@
return FORBIDDEN;
   }
   
  -ap_get_os_file(thefd, f); 
  -thefile = fdopen(thefd, r);
  -
  -ap_scan_script_header_err(r, thefile, NULL);
  +ap_scan_script_header_err(r, f, NULL);
   location = ap_table_get(r-headers_out, Location);
   
   if (location  location[0] == '/' 
  @@ -113,8 +108,6 @@
   
   ap_send_http_header(r);
   if (!r-header_only) {
  -ap_off_t zero = 0;
  - ap_seek(f, APR_CUR, zero);
ap_send_fd(f, r);
   }
   
  
  
  
  1.4   +1 -1  apache-2.0/src/include/util_script.h
  
  Index: util_script.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/util_script.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- util_script.h 1999/10/24 19:23:43 1.3
  +++ util_script.h 1999/10/31 09:26:03 1.4
  @@ -74,7 +74,7 @@
   API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info);
   API_EXPORT(void) ap_add_cgi_vars(request_rec *r);
   API_EXPORT(void) ap_add_common_vars(request_rec *r);
  -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f, char 
*buffer);
  +API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f, char 
*buffer);
   API_EXPORT(int) ap_scan_script_header_err_buff(request_rec *r, BUFF *f,
  char *buffer);
   API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
  
  
  
  1.17  +2 -2  apache-2.0/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util_script.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- util_script.c 1999/10/31 09:02:54 1.16
  +++ util_script.c 1999/10/31 09:26:03 1.17
  @@ -605,10 +605,10 @@
   
   static int getsfunc_FILE(char *buf, int len, void *f)
   {
  -return fgets(buf, len, (FILE *) f) != NULL;
  +return ap_fgets(buf, len, (ap_file_t *) f) == APR_SUCCESS;
   }
   
  -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f,
  +API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f,
  char *buffer)
   {
   return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f);
  
  
  


cvs commit: apache-2.0/src/lib/apr/locks/os2 locks.c

1999-10-29 Thread bjh
bjh 99/10/29 00:17:17

  Modified:src/lib/apr/locks/os2 locks.c
  Log:
  OS/2: Fix unnamed semaphores.
  
  Revision  ChangesPath
  1.5   +6 -1  apache-2.0/src/lib/apr/locks/os2/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/os2/locks.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- locks.c   1999/10/18 10:55:46 1.4
  +++ locks.c   1999/10/29 07:17:16 1.5
  @@ -81,7 +81,12 @@
   new-type = type;
   new-curr_locked = 0;
   new-fname = ap_pstrdup(cont, fname);
  -semname = ap_pstrcat(cont, /SEM32/, fname, NULL);
  +
  +if (fname == NULL)
  +semname = NULL;
  +else
  +semname = ap_pstrcat(cont, /SEM32/, fname, NULL);
  +
   rc = DosCreateMutexSem(semname, (new-hMutex), type == 
APR_CROSS_PROCESS ? DC_SEM_SHARED : 0, FALSE);
   *lock = new;
   return os2errno(rc);
  
  
  


cvs commit: apache-2.0/src Configure

1999-10-29 Thread bjh
bjh 99/10/29 06:20:11

  Modified:src  Configure
  Log:
  Prevent -Zexe switch from being passed to APR configure in LDFLAGS.
  autoconf's configure has it's own way of dealing with .exe suffixes
  which is incompatible with this switch.
  
  Revision  ChangesPath
  1.15  +3 -1  apache-2.0/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/src/Configure,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Configure 1999/10/24 04:26:45 1.14
  +++ Configure 1999/10/29 13:20:10 1.15
  @@ -1743,7 +1743,9 @@
   stripped_CFLAGS=`echo $CFLAGS  | sed -e 's/-DTARGET[^ ]*//'` # FIXME
   # configure fails with -Werror, because it writes crap C for its tests...
   stripped_TEXTRA_CFLAGS=`echo $TEXTRA_CFLAGS | sed -e 's/-Werror//'`
  -CC=$CC CFLAGS=$stripped_TEXTRA_CFLAGS $stripped_CFLAGS 
OPTIM=$TOPTIM $OPTIM ./configure $APR_FLAGS  /dev/null
  +# configure has its own way of adding an exe extension so don't use 
-Zexe (OS/2 only).
  +stripped_LDFLAGS=`echo $LDFLAGS  | sed -e 's/-Zexe//'`
  +CC=$CC CFLAGS=$stripped_TEXTRA_CFLAGS $stripped_CFLAGS 
LDFLAGS=$stripped_LDFLAGS OPTIM=$TOPTIM $OPTIM ./configure $APR_FLAGS  
/dev/null
   if [ $? -ne 0 ]; then
   echo ** FAILED to configure APR
   exit 1
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 sendrecv.c

1999-10-29 Thread bjh
bjh 99/10/29 06:36:29

  Modified:src/lib/apr/include apr_network_io.h
   src/lib/apr/network_io/os2 sendrecv.c
  Log:
  Add new APR function ap_sendv(), a writev for APR sockets.
  
  Revision  ChangesPath
  1.15  +4 -0  apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apr_network_io.h  1999/10/25 23:55:07 1.14
  +++ apr_network_io.h  1999/10/29 13:36:28 1.15
  @@ -67,6 +67,9 @@
   #ifdef HAVE_NETINET_IN_H
   #include netinet/in.h
   #endif
  +#ifdef HAVE_SYS_UIO_H
  +#include sys/uio.h
  +#endif
   
   #ifdef __cplusplus
   extern C {
  @@ -124,6 +127,7 @@
 ap_status_t (*cleanup) (void*));
   
   ap_status_t ap_send(ap_socket_t *, const char *, ap_ssize_t *);
  +ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, ap_int32_t 
nvec, ap_int32_t *nbytes);
   ap_status_t ap_recv(ap_socket_t *, char *, ap_ssize_t *);
   
   ap_status_t ap_setsocketopt(ap_socket_t *, ap_int32_t, ap_int32_t);
  
  
  
  1.3   +44 -0 apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sendrecv.c1999/10/18 11:06:38 1.2
  +++ sendrecv.c1999/10/29 13:36:29 1.3
  @@ -134,3 +134,47 @@
   return APR_SUCCESS;
   }
   
  +
  +
  +ap_status_t ap_sendv(ap_socket_t *sock, const struct iovec *vec, ap_int32_t 
nvec, ap_int32_t *nbytes)
  +{
  +ap_status_t rv;
  +struct iovec *tmpvec;
  +
  +tmpvec = alloca(sizeof(struct iovec) * nvec);
  +memcpy(tmpvec, vec, sizeof(struct iovec) * nvec);
  +
  +do {
  +rv = writev(sock-socketdes, tmpvec, nvec);
  +} while (rv == -1  sock_errno() == SOCEINTR);
  +
  +if (rv == -1  sock_errno() == SOCEWOULDBLOCK  sock-timeout != 0) {
  +int fds;
  +int srv;
  +
  +do {
  +fds = sock-socketdes;
  +srv = select(fds, 1, 0, 0, sock-timeout = 0 ? 
sock-timeout*1000 : -1);
  +} while (srv == -1  sock_errno() == SOCEINTR);
  +
  +if (srv == 0) {
  +return APR_TIMEUP;
  +}
  +else if (srv  0) {
  +return os2errno(sock_errno());
  +}
  +else {
  +do {
  +rv = writev(sock-socketdes, (struct iovec *)vec, nvec);
  +} while (rv == -1  sock_errno() == SOCEINTR);
  +}
  +}
  +
  +if (rv  0) {
  +*nbytes = 0;
  +return os2errno(sock_errno());
  +}
  +
  +*nbytes = rv;
  +return APR_SUCCESS;
  +}
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 sendrecv.c

1999-10-29 Thread bjh
bjh 99/10/29 07:00:08

  Modified:src/lib/apr/network_io/os2 sendrecv.c
  Log:
  OS/2: Return error status when something goes wrong in ap_send()/ap_recv().
  This will probably be needed on other platforms as well.
  
  Revision  ChangesPath
  1.4   +12 -0 apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sendrecv.c1999/10/29 13:36:29 1.3
  +++ sendrecv.c1999/10/29 14:00:03 1.4
  @@ -93,6 +93,12 @@
   } while (rv == -1  errno == EINTR);
   }
   }
  +
  +if (rv  0) {
  +*len = 0;
  +return errno;
  +}
  +
   (*len) = rv;
   return APR_SUCCESS;
   }
  @@ -130,6 +136,12 @@
   } while (rv == -1  errno == EINTR);
   }
   }
  +
  +if (rv  0) {
  +*len = 0;
  +return errno;
  +}
  +
   (*len) = rv;
   return APR_SUCCESS;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 os2calls.c os2calls.h Makefile.in networkio.h poll.c sendrecv.c sockets.c sockopt.c

1999-10-29 Thread bjh
bjh 99/10/29 07:21:04

  Modified:src/lib/apr/file_io/os2 maperrorcode.c
   src/lib/apr/network_io/os2 Makefile.in networkio.h poll.c
sendrecv.c sockets.c sockopt.c
  Added:   src/lib/apr/network_io/os2 os2calls.c os2calls.h
  Log:
  OS/2: Bypass EMX library's socket code and go straight to the OS/2 TCP/IP
  stack. This should be more efficient and prevents handle collisions when using
  native file API calls. This also means that file I/O calls (read()/write()
  etc) can no longer be used on sockets.
  
  Revision  ChangesPath
  1.3   +35 -1 apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c
  
  Index: maperrorcode.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- maperrorcode.c1999/10/18 10:23:21 1.2
  +++ maperrorcode.c1999/10/29 14:20:59 1.3
  @@ -59,6 +59,7 @@
   #include errno.h
   #include string.h
   #include os2.h
  +#include ../../network_io/os2/os2calls.h
   
   
   int errormap[][2] = {
  @@ -74,7 +75,40 @@
   { ERROR_FILENAME_EXCED_RANGE, APR_ENAMETOOLONG },
   { ERROR_INVALID_FUNCTION, APR_EINVAL   },
   { ERROR_INVALID_HANDLE,   APR_EBADF},
  -{ ERROR_NEGATIVE_SEEK,APR_ESPIPE   }
  +{ ERROR_NEGATIVE_SEEK,APR_ESPIPE   },
  +{ SOCEWOULDBLOCK,   EWOULDBLOCK },
  +{ SOCEINPROGRESS,   EINPROGRESS },
  +{ SOCEALREADY,  EALREADY},
  +{ SOCENOTSOCK,  ENOTSOCK},
  +{ SOCEDESTADDRREQ,  EDESTADDRREQ},
  +{ SOCEMSGSIZE,  EMSGSIZE},
  +{ SOCEPROTOTYPE,EPROTOTYPE  },
  +{ SOCENOPROTOOPT,   ENOPROTOOPT },
  +{ SOCEPROTONOSUPPORT,   EPROTONOSUPPORT },
  +{ SOCESOCKTNOSUPPORT,   ESOCKTNOSUPPORT },
  +{ SOCEOPNOTSUPP,EOPNOTSUPP  },
  +{ SOCEPFNOSUPPORT,  EPFNOSUPPORT},
  +{ SOCEAFNOSUPPORT,  EAFNOSUPPORT},
  +{ SOCEADDRINUSE,EADDRINUSE  },
  +{ SOCEADDRNOTAVAIL, EADDRNOTAVAIL   },
  +{ SOCENETDOWN,  ENETDOWN},
  +{ SOCENETUNREACH,   ENETUNREACH },
  +{ SOCENETRESET, ENETRESET   },
  +{ SOCECONNABORTED,  ECONNABORTED},
  +{ SOCECONNRESET,ECONNRESET  },
  +{ SOCENOBUFS,   ENOBUFS },
  +{ SOCEISCONN,   EISCONN },
  +{ SOCENOTCONN,  ENOTCONN},
  +{ SOCESHUTDOWN, ESHUTDOWN   },
  +{ SOCETOOMANYREFS,  ETOOMANYREFS},
  +{ SOCETIMEDOUT, ETIMEDOUT   },
  +{ SOCECONNREFUSED,  ECONNREFUSED},
  +{ SOCELOOP, ELOOP   },
  +{ SOCENAMETOOLONG,  ENAMETOOLONG},
  +{ SOCEHOSTDOWN, EHOSTDOWN   },
  +{ SOCEHOSTUNREACH,  EHOSTUNREACH},
  +{ SOCENOTEMPTY, ENOTEMPTY   },
  +{ SOCEPIPE, EPIPE   }
   };
   
   #define MAPSIZE (sizeof(errormap)/sizeof(errormap[0]))
  
  
  
  1.6   +2 -1  apache-2.0/src/lib/apr/network_io/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/10/24 05:59:13 1.5
  +++ Makefile.in   1999/10/29 14:21:00 1.6
  @@ -18,7 +18,8 @@
sendrecv.o \
sockets.o \
sockopt.o \
  - sockaddr.o
  + sockaddr.o \
  + os2calls.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $
  
  
  
  1.5   +3 -4  apache-2.0/src/lib/apr/network_io/os2/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/networkio.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- networkio.h   1999/10/24 05:59:13 1.4
  +++ networkio.h   1999/10/29 14:21:00 1.5
  @@ -58,7 +58,10 @@
   
   #include apr_network_io.h
   #include apr_general.h
  +#include os2calls.h
   
  +int os2errno( unsigned long oserror );
  +
   struct socket_t {
   ap_context_t *cntxt;
   int socketdes;
  @@ -77,10 +80,6 @@
   int num_except;
   int num_total;
   };
  -
  -/* Pointers to dynamically linked API functions */
  -extern int (*os2_select)(int *, int, int, int, long);
  -extern int (*os2_sock_errno)();
   
   /* Error codes returned from sock_errno() */
   #define SOCBASEERR  1
  
  
  
  1.7   +9 -67 apache-2.0/src/lib/apr/network_io/os2/poll.c
  
  Index

cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c

1999-10-29 Thread bjh
bjh 99/10/29 07:37:33

  Modified:src/os/os2 iol_socket.h iol_socket.c
   src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  OS/2: APRize iol_socket
  
  Revision  ChangesPath
  1.2   +3 -1  apache-2.0/src/os/os2/iol_socket.h
  
  Index: iol_socket.h
  ===
  RCS file: /home/cvs/apache-2.0/src/os/os2/iol_socket.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- iol_socket.h  1999/07/11 14:49:07 1.1
  +++ iol_socket.h  1999/10/29 14:37:27 1.2
  @@ -58,6 +58,8 @@
   #ifndef OS_UNIX_IOL_SOCKET_H
   #define OS_UNIX_IOL_SOCKET_H
   
  -ap_iol *os2_attach_socket(int fd);
  +#include apr_network_io.h
  +
  +ap_iol *os2_attach_socket(ap_socket_t *sock);
   
   #endif
  
  
  
  1.4   +34 -50apache-2.0/src/os/os2/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/os2/iol_socket.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- iol_socket.c  1999/10/21 09:03:09 1.3
  +++ iol_socket.c  1999/10/29 14:37:28 1.4
  @@ -59,6 +59,8 @@
   #include httpd.h
   #include ap_iol.h
   #include iol_socket.h
  +#include apr_network_io.h
  +#include apr_file_io.h
   
   #include errno.h
   #include sys/types.h
  @@ -68,19 +70,15 @@
   
   typedef struct {
   ap_iol iol;
  -int fd;
  -int flags;
  -int timeout;
  +ap_socket_t *sock;
   } iol_socket;
   
   static ap_status_t os2_setopt(ap_iol *viol, ap_iol_option opt,
  const void *value)
   {
  -iol_socket *iol = (iol_socket *)viol;
  -
   switch (opt) {
   case AP_IOL_TIMEOUT:
  - iol-timeout = *(const int *)value;
  +ap_setsocketopt(((iol_socket *)viol)-sock, APR_SO_TIMEOUT, *(const 
int *)value);
break;
   default:
return APR_EINVAL;
  @@ -90,42 +88,15 @@
   
   static ap_status_t os2_getopt(ap_iol *viol, ap_iol_option opt, void *value)
   {
  -iol_socket *iol = (iol_socket *)viol;
  -
   switch (opt) {
   case AP_IOL_TIMEOUT:
  - *(int *)value = iol-timeout;
  - break;
  +/* There's no APR getopt yet but nothing uses this option anyway */
   default:
return APR_EINVAL;
   }
   return APR_SUCCESS;
   }
   
  -static ap_status_t set_nonblock(int fd)
  -{
  -int fd_flags;
  -int rv;
  -
  -fd_flags = fcntl(fd, F_GETFL, 0);
  -#if defined(O_NONBLOCK)
  -fd_flags |= O_NONBLOCK;
  -rv = fcntl(fd, F_SETFL, fd_flags);
  -#elif defined(O_NDELAY)
  -fd_flags |= O_NDELAY;
  -rv = fcntl(fd, F_SETFL, fd_flags);
  -#elif defined(FNDELAY)
  -fd_flags |= O_FNDELAY;
  -rv = fcntl(fd, F_SETFL, fd_flags);
  -#else
  -#error your unix lacks non-blocking i/o, you lose
  -#endif
  -if (rv == 0) {
  -return APR_SUCCESS;
  -}
  -return errno;
  -}
  -
   /* the timeout code is a separate routine because it requires
   a stack frame... and we don't want to pay that setup cost
   on every call */
  @@ -148,6 +119,7 @@
rv = ap_select(iol-fd + 1, selread, selwrite, NULL, iol-timeout  
0 ? NULL : tv); \
} while (rv == -1  errno == EINTR); \
if (!FD_ISSET(iol-fd, fdset)) { \
  +*nbytes = 0; \
return APR_ETIMEDOUT; \
} \
do { \
  @@ -157,6 +129,7 @@
   *nbytes = rv; \
   return APR_SUCCESS; \
   } \
  +*nbytes = 0; \
return errno; \
\
   } \
  @@ -166,7 +139,7 @@
iol_socket *iol = (iol_socket *)viol; \
int rv; \
\
  -/* Present to zero until some bytes are actually written */ \
  +/* Preset to zero until some bytes are actually written */ \
   *nbytes = 0; \
if (!(iol-flags  FD_NONBLOCKING_SET)) { \
if (iol-timeout  0) { \
  @@ -189,27 +162,44 @@
do { \
rv = syscall(iol-fd, arg1, arg2); \
} while (rv == -1  errno == EINTR); \
  - if ((errno == EWOULDBLOCK || errno == EAGAIN)  iol-timeout != 0) { \
  - return os2_##name##_timeout(viol, arg1, arg2, nbytes); \
  - } \
if (rv = 0) { \
*nbytes = rv; \
   return APR_SUCCESS; \
} \
  + if ((errno == EWOULDBLOCK || errno == EAGAIN)  iol-timeout != 0) { \
  + return os2_##name##_timeout(viol, arg1, arg2, nbytes); \
  + } \
return errno; \
   }
  +
  +// method(write, (ap_iol *viol, const char *arg1, ap_size_t arg2, ap_ssize_t 
*nbytes), write, NULL, fdset)
  +ap_status_t os2_write(ap_iol *viol, const char *buf, ap_size_t size, 
ap_ssize_t *nbytes)
  +{
  +*nbytes = size;
  +return ap_send(((iol_socket *)viol)-sock, buf, nbytes);
  +}
   
  -method(write, (ap_iol *viol, const char *arg1, ap_size_t arg2, ap_ssize_t 
*nbytes), write, NULL, fdset)
  -method(writev, (ap_iol

cvs commit: apache-2.0/src/os/os2 iol_socket.c

1999-10-29 Thread bjh
bjh 99/10/29 08:06:23

  Modified:src/os/os2 iol_socket.c
  Log:
  Some cleaning up of OS/2 iol_socket.c.
  
  Revision  ChangesPath
  1.5   +2 -81 apache-2.0/src/os/os2/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/os2/iol_socket.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- iol_socket.c  1999/10/29 14:37:28 1.4
  +++ iol_socket.c  1999/10/29 15:06:22 1.5
  @@ -97,96 +97,17 @@
   return APR_SUCCESS;
   }
   
  -/* the timeout code is a separate routine because it requires
  -a stack frame... and we don't want to pay that setup cost
  -on every call */
  -
  -/* this macro expands into the four basic i/o methods */
  -
  -#define method(name, args, syscall, selread, selwrite)   \
  -static ap_status_t os2_##name##_timeout args \
  -{ \
  - iol_socket *iol = (iol_socket *)viol; \
  - fd_set fdset; \
  - struct timeval tv; \
  - int rv; \
  - \
  - FD_ZERO(fdset); \
  - FD_SET(iol-fd, fdset); \
  - tv.tv_sec = iol-timeout; \
  - tv.tv_usec = 0; \
  - do { \
  - rv = ap_select(iol-fd + 1, selread, selwrite, NULL, iol-timeout  
0 ? NULL : tv); \
  - } while (rv == -1  errno == EINTR); \
  - if (!FD_ISSET(iol-fd, fdset)) { \
  -*nbytes = 0; \
  - return APR_ETIMEDOUT; \
  - } \
  - do { \
  - rv = syscall(iol-fd, arg1, arg2); \
  - } while (rv == -1  errno == EINTR); \
  -if (rv = 0) { \
  -*nbytes = rv; \
  -return APR_SUCCESS; \
  -} \
  -*nbytes = 0; \
  - return errno; \
  - \
  -} \
  - \
  -static ap_status_t os2_##name args \
  -{ \
  - iol_socket *iol = (iol_socket *)viol; \
  - int rv; \
  - \
  -/* Preset to zero until some bytes are actually written */ \
  -*nbytes = 0; \
  - if (!(iol-flags  FD_NONBLOCKING_SET)) { \
  - if (iol-timeout  0) { \
  - rv = syscall(iol-fd, arg1, arg2); \
  -if (rv = 0) { \
  -*nbytes = rv; \
  -return APR_SUCCESS; \
  -} \
  -return errno; \
  - } \
  - /* must shift descriptor to blocking mode now */ \
  - if ((rv = set_nonblock(iol-fd)) != APR_SUCCESS) { \
  - return rv; \
  - } \
  - iol-flags |= FD_NONBLOCKING_SET; \
  - } \
  - \
  - /* try writing, ignoring EINTR, the upper layer has to handle \
  - partial read/writes anyhow, so we can return early */ \
  - do { \
  - rv = syscall(iol-fd, arg1, arg2); \
  - } while (rv == -1  errno == EINTR); \
  - if (rv = 0) { \
  - *nbytes = rv; \
  -return APR_SUCCESS; \
  - } \
  - if ((errno == EWOULDBLOCK || errno == EAGAIN)  iol-timeout != 0) { \
  - return os2_##name##_timeout(viol, arg1, arg2, nbytes); \
  - } \
  - return errno; \
  -}
  -
  -// method(write, (ap_iol *viol, const char *arg1, ap_size_t arg2, ap_ssize_t 
*nbytes), write, NULL, fdset)
   ap_status_t os2_write(ap_iol *viol, const char *buf, ap_size_t size, 
ap_ssize_t *nbytes)
   {
   *nbytes = size;
   return ap_send(((iol_socket *)viol)-sock, buf, nbytes);
   }
   
  -// method(writev, (ap_iol *viol, const struct iovec *arg1, int arg2, 
ap_ssize_t *nbytes), writev, NULL, fdset)
  -ap_status_t os2_writev(ap_iol *viol, const struct iovec *vec, int size, 
ap_ssize_t *nbytes)
  +ap_status_t os2_writev(ap_iol *viol, const struct iovec *vec, int nvec, 
ap_ssize_t *nbytes)
   {
  -*nbytes = size;
  -return ap_sendv(((iol_socket *)viol)-sock, vec, size, nbytes);
  +return ap_sendv(((iol_socket *)viol)-sock, vec, nvec, nbytes);
   }
   
  -// method(read, (ap_iol *viol, char *arg1, ap_size_t arg2, ap_ssize_t 
*nbytes), read, fdset, NULL)
   ap_status_t os2_read(ap_iol *viol, char *buf, ap_size_t size, ap_ssize_t 
*nbytes)
   {
   *nbytes = size;
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

1999-10-26 Thread bjh
bjh 99/10/26 08:07:36

  Modified:src/lib/apr/threadproc/os2 proc.c
  Log:
  OS/2: Make ap_create_process() work with scripts, allowing mod_cgi to work
  with all the CGI types it used to (REXX, Perl etc).
  
  Revision  ChangesPath
  1.8   +148 -26   apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- proc.c1999/10/19 02:02:10 1.7
  +++ proc.c1999/10/26 15:07:31 1.8
  @@ -159,16 +159,53 @@
   return APR_INPARENT;
   }
   
  +
  +
  +/* quotes in the string are doubled up.
  + * Used to escape quotes in args passed to OS/2's cmd.exe
  + */
  +static char *double_quotes(struct context_t *cntxt, char *str)
  +{
  +int num_quotes = 0;
  +int len = 0;
  +char *quote_doubled_str, *dest;
  +
  +while (str[len]) {
  +num_quotes += str[len++] == '\';
  +}
  +
  +quote_doubled_str = ap_palloc(cntxt, len + num_quotes + 1);
  +dest = quote_doubled_str;
  +
  +while (*str) {
  +if (*str == '\')
  +*(dest++) = '\';
  +*(dest++) = *(str++);
  +}
  +
  +*dest = 0;
  +return quote_doubled_str;
  +}
  +
  +
  +
   ap_status_t ap_create_process(struct proc_t **new, const char *progname,
 char *const args[], char **env,
 struct procattr_t *attr, ap_context_t *cont)
   {
  -int i;
  -ap_status_t stat;
  +int i, arg, numargs, cmdlen;
  +ap_status_t status;
   char **newargs;
   char savedir[300];
   HFILE save_in, save_out, save_err, dup;
   int criticalsection = FALSE;
  +char *extension, *newprogname, *extra_arg = NULL, *cmdline, *cmdline_pos;
  +char interpreter[1024];
  +char error_object[260];
  +ap_file_t *progfile;
  +int env_len, e;
  +char *env_block, *env_block_pos;
  +RESULTCODES rescodes;
   
   (*new) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t));
   
  @@ -178,8 +215,8 @@
   
   (*new)-cntxt = cont;
   (*new)-running = FALSE;
  -
  -/* Prevent other threads from running while these process-wide resources are 
modified */
  +
  +/* Prevent other threads from running while these process-wide resources 
are modified */
   if (attr-child_in || attr-child_out || attr-child_err || 
attr-currdir) {
   criticalsection = TRUE;
   DosEnterCritSec();
  @@ -221,29 +258,114 @@
   }
   }
   
  -if (attr-cmdtype == APR_SHELLCMD) {
  -i = 0;
  -while (args[i]) {
  -i++;
  -}
  -newargs = (char **)ap_palloc(cont, sizeof (char *) * (i + 3));
  -newargs[0] = ap_pstrdup(cont, SHELL_PATH);
  -newargs[1] = ap_pstrdup(cont, /c);
  -i = 0;
  -
  -while (args[i]) {
  -newargs[i + 2] = ap_pstrdup(cont, args[i]);
  -i++;
  +interpreter[0] = 0;
  +extension = strrchr(progname, '.');
  +
  +if (extension == NULL)
  +extension = ;
  +
  +if (attr-cmdtype == APR_SHELLCMD || strcasecmp(extension, .cmd) == 0) 
{
  +strcpy(interpreter, #! SHELL_PATH);
  +extra_arg = /C;
  +} else if (stricmp(progname, .exe) != 0) {
  +status = ap_open(progfile, progname, APR_READ|APR_BUFFERED, 0, 
cont);
  +
  +if (status == APR_SUCCESS) {
  +status = ap_fgets(interpreter, sizeof(interpreter), progfile);
  +
  +if (status == APR_SUCCESS) {
  +if (interpreter[0] == '#'  interpreter[1] == '!') {
  +if (interpreter[2] != '/'  interpreter[2] != '\\'  
interpreter[3] != ':') {
  +char buffer[300];
  +
  +if (DosSearchPath(SEARCH_ENVIRONMENT, PATH, 
interpreter+2, buffer, sizeof(buffer)) == 0) {
  +strcpy(interpreter+2, buffer);
  +} else {
  +strcat(interpreter, .exe);
  +if (DosSearchPath(SEARCH_ENVIRONMENT, PATH, 
interpreter+2, buffer, sizeof(buffer)) == 0) {
  +strcpy(interpreter+2, buffer);
  +}
  +}
  +}
  +} else {
  +interpreter[0] = 0;
  +}
  +}
   }
  +ap_close(progfile);
  +}
   
  -newargs[i + 3] = NULL;
  -(*new)-pid = spawnve(attr-detached ? P_DETACH : P_NOWAIT, 
SHELL_PATH, newargs, env);
  -} else {
  -(*new)-pid = spawnve(attr-detached ? P_DETACH : P_NOWAIT, 
progname, args, env);
  +i = 0;
  +
  +while (args  args[i]) {
  +i++;
   }
  -
  -stat = (*new)-pid  0 ? errno : APR_SUCCESS

cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

1999-10-26 Thread bjh
bjh 99/10/26 08:16:56

  Modified:src/lib/apr/threadproc/os2 proc.c
  Log:
  OS/2: Put support for detached processes back into ap_create_process(),
  removed by previous change.
  
  Revision  ChangesPath
  1.9   +4 -1  apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- proc.c1999/10/26 15:07:31 1.8
  +++ proc.c1999/10/26 15:16:56 1.9
  @@ -363,7 +363,10 @@
   
   *env_block_pos = 0; /* environment block is terminated by a double null 
*/
   
  -status = DosExecPgm(error_object, sizeof(error_object), EXEC_ASYNC, 
cmdline, env_block, rescodes, cmdline);
  +status = DosExecPgm(error_object, sizeof(error_object), 
  +attr-detached ? EXEC_BACKGROUND : EXEC_ASYNC, 
  +cmdline, env_block, rescodes, cmdline);
  +
   (*new)-pid = rescodes.codeTerminate;
   
   if (attr-currdir != NULL) {
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_cgi.c

1999-10-25 Thread bjh
bjh 99/10/25 05:45:39

  Modified:src/modules/standard mod_cgi.c
  Log:
  Make args to CGIs work.
  
  Revision  ChangesPath
  1.15  +6 -6  apache-2.0/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_cgi.c 1999/10/20 18:28:04 1.14
  +++ mod_cgi.c 1999/10/25 12:45:39 1.15
  @@ -373,7 +373,7 @@
   ap_unblock_alarms();
   return (rc);
   }
  -static ap_status_t build_argv_list(char *argv[], request_rec *r, 
ap_context_t *p) 
  +static ap_status_t build_argv_list(char ***argv, request_rec *r, 
ap_context_t *p)
   {
   int numwords, x, idx;
   char *w;
  @@ -392,14 +392,14 @@
   if (numwords  APACHE_ARG_MAX) {
   numwords = APACHE_ARG_MAX;   /* Truncate args to prevent 
overrun */
   }
  -argv = (char **) ap_palloc(p, (numwords + 1) * sizeof(char *));
  +*argv = (char **) ap_palloc(p, (numwords + 1) * sizeof(char *));
   
   for (x = 1, idx = 0; x = numwords; x++) {
   w = ap_getword_nulls(p, args, '+');
   ap_unescape_url(w);
  -argv[idx++] = ap_escape_shell_cmd(p, w);
  +(*argv)[idx++] = ap_escape_shell_cmd(p, w);
   }
  -argv[idx] = NULL;
  +(*argv)[idx] = NULL;
   }
   
   return APR_SUCCESS;
  @@ -444,7 +444,7 @@
   int retval, nph, dbpos = 0;
   char *argv0, *dbuf = NULL;
   char *command;
  -char *argv = NULL;
  +char **argv = NULL;
   
   BUFF *script_out = NULL, *script_in = NULL, *script_err = NULL;
   char argsbuffer[HUGE_STRING_LEN];
  @@ -527,7 +527,7 @@
   return HTTP_INTERNAL_SERVER_ERROR;
   }
   /* run the script in its own process */
  -else if (run_cgi_child(script_out, script_in, script_err, command, 
argv, r, p) != APR_SUCCESS) {
  +else if (run_cgi_child(script_out, script_in, script_err, command, 
argv, r, p) != APR_SUCCESS) {
   ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
 couldn't spawn child process: %s, r-filename);
   return HTTP_INTERNAL_SERVER_ERROR;
  
  
  


cvs commit: apache-2.0/src/lib/apr/test Makefile.in

1999-10-24 Thread bjh
bjh 99/10/23 21:22:23

  Modified:src/lib/apr .cvsignore Makefile.in
   src/lib/apr/test Makefile.in
  Log:
  Make a single APR library file.
  
  Revision  ChangesPath
  1.3   +1 -1  apache-2.0/src/lib/apr/.cvsignore
  
  Index: .cvsignore
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore1999/09/11 03:17:42 1.2
  +++ .cvsignore1999/10/24 04:22:21 1.3
  @@ -2,5 +2,5 @@
   config.cache
   config.log
   config.status
  -libs
   configure
  +objs
  
  
  
  1.12  +7 -5  apache-2.0/src/lib/apr/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/Makefile.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.in   1999/10/10 20:34:52 1.11
  +++ Makefile.in   1999/10/24 04:22:22 1.12
  @@ -39,12 +39,14 @@
   # building the entire package.
   #
   all: Makefile $(MODULES) subdirs
  - @rm -Rf libs
  - @mkdir libs
  - @for i in $(SUBDIRS); do cp $$i/*.a libs ; done;
  + @rm -Rf objs
  + @mkdir objs
  + @rm -f @[EMAIL PROTECTED]
  + @for i in $(SUBDIRS); do cp $$i/*.o objs ; done;
  + @$(AR) cr @[EMAIL PROTECTED] objs/*.o
   
   clean: subdirs_clean
  - $(RM) -f *.o *.a *.so
  + $(RM) -f *.o *.a *.so objs/*.o
   
   depend: subdirs_depend
   
  @@ -52,7 +54,7 @@
-$(RM) -f *.o *.a *.so
-$(RM) -f config.cache config.status config.log
-$(RM) -f Makefile
  - -$(RM) -Rf libs
  + -$(RM) -Rf objs
   
   subdirs:
@for i in $(SUBDIRS); do \
  
  
  
  1.8   +2 -2  apache-2.0/src/lib/apr/test/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/Makefile.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.in   1999/10/20 20:24:06 1.7
  +++ Makefile.in   1999/10/24 04:22:22 1.8
  @@ -8,7 +8,7 @@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ @OPTIM@ 
  -LIBS=-L../libs -lnetwork -lthreadproc -lfile -lmisc -lapr -ltime -llock 
-lsig -lmmap @LIBS@ 
  +LIBS=-L.. -lapr @LIBS@ 
   [EMAIL PROTECTED]@ $(LIBS)
   INCDIR=../include
   INCDIR1=../../inc
  @@ -24,7 +24,7 @@
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
  - [EMAIL PROTECTED]@
  + [EMAIL PROTECTED]@
   
   OBJS= testfile.o \
testproc.o \
  
  
  


cvs commit: apache-2.0/src/lib/apr/mmap/unix mmap.c

1999-10-24 Thread bjh
bjh 99/10/23 21:30:20

  Modified:src/lib/apr/mmap/unix mmap.c
  Log:
  Don't try to compile mmap functions if the platform doesn't have mmap.
  
  Revision  ChangesPath
  1.3   +4 -0  apache-2.0/src/lib/apr/mmap/unix/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/unix/mmap.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mmap.c1999/10/21 21:13:34 1.2
  +++ mmap.c1999/10/24 04:30:19 1.3
  @@ -53,6 +53,8 @@
*
*/
   
  +#if HAVE_MMAP
  +
   #include mmap_h.h
   #include fileio.h
   #include apr_mmap.h
  @@ -175,3 +177,5 @@
   }
   return rv;
   }
  +
  +#endif
  
  
  


cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c

1999-10-24 Thread bjh
bjh 99/10/24 06:08:31

  Modified:src/lib/apr/include apr_network_io.h
   src/lib/apr/network_io/beos sockets.c
   src/lib/apr/network_io/os2 sockets.c
   src/lib/apr/network_io/unix sockets.c
   src/lib/apr/network_io/win32 sockets.c
   src/lib/apr/test server.c
   src/modules/mpm/dexter dexter.c
   src/modules/mpm/mpmt_beos mpmt_beos.c
   src/modules/mpm/mpmt_pthread mpmt_pthread.c
   src/modules/mpm/prefork prefork.c
   src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Add a context parameter to ap_accept() for the connection socket to be
  allocated from. This is needed because the lifetime of a connection is
  ususally much shorter than that of the listen socket. Only tested on
  OS/2.
  
  Revision  ChangesPath
  1.13  +1 -1  apache-2.0/src/lib/apr/include/apr_network_io.h
  
  Index: apr_network_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_network_io.h  1999/10/24 05:59:13 1.12
  +++ apr_network_io.h  1999/10/24 13:08:24 1.13
  @@ -114,7 +114,7 @@
   
   ap_status_t ap_bind(ap_socket_t *);
   ap_status_t ap_listen(ap_socket_t *, ap_int32_t);
  -ap_status_t ap_accept(ap_socket_t **, const ap_socket_t *);
  +ap_status_t ap_accept(ap_socket_t **, const ap_socket_t *, ap_context_t *);
   ap_status_t ap_connect(ap_socket_t *, char *);
   
   ap_status_t ap_get_remote_hostname(char **, ap_socket_t *);
  
  
  
  1.10  +3 -2  apache-2.0/src/lib/apr/network_io/beos/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockets.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- sockets.c 1999/10/24 12:27:33 1.9
  +++ sockets.c 1999/10/24 13:08:24 1.10
  @@ -140,11 +140,12 @@
   return APR_SUCCESS; 
   } 
   
  -ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock) 
  +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock, 
struct context_t *connection_context) 
   { 
  - (*new) = (struct socket_t *)ap_palloc(sock-cntxt,
  + (*new) = (struct socket_t *)ap_palloc(connection_context,
sizeof(ap_socket_t)); 
   
  +(*new)-cntxt = connection_context;
   (*new)-cntxt = sock-cntxt;
   (*new)-local_addr = (struct sockaddr_in *)ap_palloc((*new)-cntxt, 
sizeof(struct sockaddr_in));
  
  
  
  1.6   +3 -3  apache-2.0/src/lib/apr/network_io/os2/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sockets.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sockets.c 1999/10/24 05:59:14 1.5
  +++ sockets.c 1999/10/24 13:08:25 1.6
  @@ -147,12 +147,12 @@
   return APR_SUCCESS;
   }
   
  -ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock)
  +ap_status_t ap_accept(struct socket_t **new, const struct socket_t *sock, 
struct context_t *connection_context)
   {
  -(*new) = (struct socket_t *)ap_palloc(sock-cntxt, 
  +(*new) = (struct socket_t *)ap_palloc(connection_context, 
   sizeof(struct socket_t));
   
  -(*new)-cntxt = sock-cntxt;
  +(*new)-cntxt = connection_context;
   (*new)-remote_addr = (struct sockaddr_in *)ap_palloc((*new)-cntxt,
 sizeof(struct sockaddr_in));
   (*new)-local_addr = sock-local_addr;
  
  
  
  1.20  +7 -6  apache-2.0/src/lib/apr/network_io/unix/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- sockets.c 1999/10/24 05:59:15 1.19
  +++ sockets.c 1999/10/24 13:08:25 1.20
  @@ -187,19 +187,20 @@
   }
   
   /* ***APRDOC
  - * ap_status_t ap_accept(ap_socket_t **, ap_socket_t *)
  + * ap_status_t ap_accept(ap_socket_t **, ap_socket_t *, ap_context_t 
*connection_context)
*Accept a new connection request
  - * arg 1) The socket we are listening on 
  - * arg 2) A copy of the socket that is connected to the socket that
  + * arg 1) A copy of the socket that is connected to the socket that
*made the connection request.  This is the socket which should
*be used for all future communication.
  + * arg 2) The socket we are listening on.
  + * arg 3) The context for the new socket.
*/
  -ap_status_t ap_accept(struct socket_t **new

cvs commit: apache-2.0/src/lib/apr/file_io/os2 fileacc.c

1999-10-18 Thread bjh
bjh 99/10/18 03:14:46

  Modified:src/lib/apr/file_io/os2 fileacc.c
  Log:
  OS/2: Add ap_{get,set}_filedata() functions.
  
  Revision  ChangesPath
  1.5   +27 -0 apache-2.0/src/lib/apr/file_io/os2/fileacc.c
  
  Index: fileacc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileacc.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- fileacc.c 1999/10/11 14:18:56 1.4
  +++ fileacc.c 1999/10/18 10:14:46 1.5
  @@ -220,3 +220,30 @@
   }
   }
   
  +
  +
  +ap_status_t ap_get_filedata(void **data, char *key, struct file_t *file)
  +{
  +if (file != NULL) {
  +return ap_get_userdata(data, key, file-cntxt);
  +}
  +else {
  +data = NULL;
  +return APR_ENOFILE;
  +}
  +}
  +
  +
  +
  +ap_status_t ap_set_filedata(struct file_t *file, void *data, char *key,
  +ap_status_t (*cleanup) (void *))
  +{
  +if (file != NULL) {
  +return ap_set_userdata(data, key, cleanup, file-cntxt);
  +}
  +else {
  +data = NULL;
  +return APR_ENOFILE;
  +}
  +}
  +
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 fileio.h maperrorcode.c open.c readwrite.c

1999-10-18 Thread bjh
bjh 99/10/18 03:23:22

  Modified:src/lib/apr/file_io/os2 fileio.h maperrorcode.c open.c
readwrite.c
  Log:
  OS/2: Assorted file I/O cleanups  fixes.
  - Implement ap_eof()
  - Fix flags passed to DosOpen when reading an existing file
  - Invalidate file status info after a write
  - add (mostly based on the unix versions) ap_make_iov(), ap_writev(),
ap_putc(), ap_ungetc(), ap_getc(), ap_puts(), ap_flush(), ap_fgets(),
ap_fprintf()
  
  Revision  ChangesPath
  1.3   +3 -2  apache-2.0/src/lib/apr/file_io/os2/fileio.h
  
  Index: fileio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileio.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- fileio.h  1999/10/13 09:38:08 1.2
  +++ fileio.h  1999/10/18 10:23:20 1.3
  @@ -71,6 +71,7 @@
   int buffered;
   FILESTATUS3 status;
   int validstatus;
  +int eof_hit;
   };
   
   struct dir_t {
  @@ -82,11 +83,11 @@
   };
   
   struct iovec_t {
  -struct iovec *iovec;
  +ap_context_t *cntxt;
  +struct iovec *theiov;
   };
   
   ap_status_t file_cleanup(void *);
  -mode_t get_fileperms(ap_fileperms_t);
   long os2date2unix( FDATE os2date, FTIME os2time );
   int os2errno( ULONG oserror );
   
  
  
  
  1.2   +3 -2  apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c
  
  Index: maperrorcode.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/maperrorcode.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- maperrorcode.c1999/08/17 15:59:36 1.1
  +++ maperrorcode.c1999/10/18 10:23:21 1.2
  @@ -53,12 +53,13 @@
*
*/
   
  +#define INCL_DOSERRORS
  +#include fileio.h
   #include apr_file_io.h
   #include errno.h
   #include string.h
  -
  -#define INCL_DOSERRORS
   #include os2.h
  +
   
   int errormap[][2] = {
   { NO_ERROR,   APR_SUCCESS  },
  
  
  
  1.7   +13 -1 apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- open.c1999/10/14 14:36:30 1.6
  +++ open.c1999/10/18 10:23:21 1.7
  @@ -82,6 +82,7 @@
   dafile-cntxt = cntxt;
   dafile-isopen = FALSE;
   dafile-validstatus = FALSE;
  +dafile-eof_hit = FALSE;
   
   if ((flag  APR_READ)  (flag  APR_WRITE)) {
   mflags |= OPEN_ACCESS_READWRITE;
  @@ -111,9 +112,11 @@
   
   if (flag  APR_TRUNCATE) {
   oflags |= OPEN_ACTION_REPLACE_IF_EXISTS;
  +} else {
  +oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
   }
   
  -rv = DosOpen(fname, (HFILE *)(dafile-filedes), action, 0, 0, oflags, 
mflags, NULL);
  +rv = DosOpen(fname, (dafile-filedes), action, 0, 0, oflags, mflags, 
NULL);
   
   if (rv == 0  (flag  APR_APPEND)) {
   ULONG newptr;
  @@ -185,3 +188,12 @@
   return APR_SUCCESS;
   }
   
  +
  +
  +ap_status_t ap_eof(ap_file_t *fptr)
  +{
  +if (!fptr-isopen || fptr-eof_hit == 1) {
  +return APR_EOF;
  +}
  +return APR_SUCCESS;
  +}   
  
  
  
  1.3   +163 -0apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- readwrite.c   1999/08/28 08:05:44 1.2
  +++ readwrite.c   1999/10/18 10:23:21 1.3
  @@ -77,6 +77,11 @@
   return os2errno(rc);
   }
   
  +if (bytesread == 0) {
  +thefile-eof_hit = TRUE;
  +return APR_EOF;
  +}
  +
   *nbytes = bytesread;
   return APR_SUCCESS;
   }
  @@ -101,5 +106,163 @@
   }
   
   *nbytes = byteswritten;
  +thefile-validstatus = FALSE;
   return APR_SUCCESS;
   }
  +
  +
  +
  +#ifdef HAVE_WRITEV
  +
  +ap_status_t ap_make_iov(struct iovec_t **new, struct iovec *iova, 
ap_context_t *cntxt)
  +{
  +(*new) = ap_palloc(cntxt, sizeof(struct iovec_t));
  +if ((*new) == NULL) {
  +return APR_ENOMEM;
  +}
  +(*new)-cntxt = cntxt;
  +(*new)-theiov = iova;
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +ap_status_t ap_writev(struct file_t *thefile, const struct iovec_t *vec, 
ap_ssize_t *iocnt)
  +{
  +int bytes;
  +if ((bytes = writev(thefile-filedes, vec-theiov, *iocnt))  0) {
  +*iocnt = bytes;
  +return errno;
  +}
  +else {
  +*iocnt = bytes;
  +thefile-validstatus = FALSE;
  +return APR_SUCCESS;
  +}
  +}
  +#endif
  +
  +
  +
  +ap_status_t ap_putc(char ch, ap_file_t

cvs commit: apache-2.0/src/lib/apr/test testsig.c

1999-10-18 Thread bjh
bjh 99/10/18 03:32:16

  Modified:src/lib/apr/test testsig.c
  Log:
  Improve/fix signal test program.
  
  Revision  ChangesPath
  1.6   +30 -6 apache-2.0/src/lib/apr/test/testsig.c
  
  Index: testsig.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testsig.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- testsig.c 1999/10/11 17:52:01 1.5
  +++ testsig.c 1999/10/18 10:32:15 1.6
  @@ -69,7 +69,7 @@
   
   void hup_handler(int sig)
   {
  -fprintf(stdout, I got the signal\n);
  +fprintf(stdout, I got the signal, );
   time_to_die++;
   }
   
  @@ -85,22 +85,35 @@
   ap_create_context(context, NULL);
   
   if (argc  1) {
  -
   ap_setup_signal(APR_SIGHUP, hup_handler, context);
  +fprintf(stdout, Child started, waiting for signal\n);
   
   while(time_to_die == 0) {
   sleep(1);
   }
  +
  +fprintf(stdout, Child exiting.\n);
   return(1);
   }
   
   fprintf(stdout, Creating new signal...);
  +fflush(stdout);
   if (ap_create_signal(APR_SIGHUP, context) != APR_SUCCESS) {
  -fprintf(stderr, Could not create attr\n);
  +fprintf(stderr, Could not create signal\n);
  +exit(-1);
  +}
  +fprintf(stdout, OK\n);
  +
  +fprintf(stdout, Setting parent to ignore SIGHUP...);
  +fflush(stdout);
  +if (ap_setup_signal(APR_SIGHUP, SIG_IGN, context)) {
  +fprintf(stderr, Could not set signal\n);
   exit(-1);
   }
   fprintf(stdout, OK\n);
   
  +fprintf(stdout, Creating child process...);
  +fflush(stdout);
   if (ap_createprocattr_init(attr, context) != APR_SUCCESS) {
   fprintf(stderr, Could not create attr\n);
   exit(-1);;
  @@ -115,13 +128,24 @@
   fprintf(stderr, Could not create the new process\n);
   exit(-1);
   }
  +fprintf(stdout, OK\n);
   
  +sleep(1); /* Give child time to get going */
   fprintf(stdout, Sending the signal...);
   fflush(stdout);
  -ap_send_signal(APR_SIGHUP, context);
  -
  -ap_wait_proc(newproc, APR_WAIT);
  +if (ap_send_signal(APR_SIGHUP, context) != APR_SUCCESS) {
  +fprintf(stderr, Could not send signal\n );
  +exit(-1);
  +} 
  +fprintf(stdout, OK\n);
   
  +fprintf(stdout, Waiting for child...\n);
  +if (ap_wait_proc(newproc, APR_WAIT) != APR_CHILD_DONE) {
  +fprintf(stderr, Error waiting for child\n );
  +exit(-1);
  +}
  +fprintf(stdout, Waiting for child...OK\n);
  +
   return(1);
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/locks/os2 locks.c

1999-10-18 Thread bjh
bjh 99/10/18 03:55:46

  Modified:src/lib/apr/locks/os2 locks.c
  Log:
  OS/2: Add parameter scope parameter to ap_create_lock(), ignored for now.
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/src/lib/apr/locks/os2/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/os2/locks.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- locks.c   1999/10/08 18:53:27 1.3
  +++ locks.c   1999/10/18 10:55:46 1.4
  @@ -70,7 +70,7 @@
   
   
   
  -ap_status_t ap_create_lock(struct lock_t **lock, ap_locktype_e type, char 
*fname, ap_context_t *cont)
  +ap_status_t ap_create_lock(struct lock_t **lock, ap_locktype_e type, 
ap_lockscope_e scope, char *fname, ap_context_t *cont)
   {
   struct lock_t *new;
   ULONG rc;
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 sendrecv.c

1999-10-18 Thread bjh
bjh 99/10/18 04:06:39

  Modified:src/lib/apr/network_io/os2 sendrecv.c
  Log:
  OS/2: Change timeout style in ap_send()/ap_receive() and change to use native
  thread safe select() instead of the EMX library's select().
  
  Revision  ChangesPath
  1.2   +23 -22apache-2.0/src/lib/apr/network_io/os2/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sendrecv.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sendrecv.c1999/08/17 15:59:43 1.1
  +++ sendrecv.c1999/10/18 11:06:38 1.2
  @@ -59,9 +59,10 @@
   #include apr_errno.h
   #include apr_general.h
   #include apr_network_io.h
  +#include apr_lib.h
   #include sys/time.h
   
  -ap_status_t ap_send(struct socket_t *sock, const char *buf, ap_ssize_t *len, 
time_t sec)
  +ap_status_t ap_send(struct socket_t *sock, const char *buf, ap_ssize_t *len)
   {
   ssize_t rv;
   
  @@ -69,21 +70,20 @@
   rv = write(sock-socketdes, buf, (*len));
   } while (rv == -1  errno == EINTR);
   
  -if (rv == -1  errno == EAGAIN  sec  0) {
  -struct timeval tv;
  -fd_set fdset;
  +if (rv == -1  errno == EAGAIN  sock-timeout  0) {
  +int fds;
   int srv;
   
   do {
  -FD_ZERO(fdset);
  -FD_SET(sock-socketdes, fdset);
  -tv.tv_sec  = sec;
  -tv.tv_usec = 0;
  -
  -srv = select(FD_SETSIZE, NULL, fdset, NULL, tv);
  +fds = sock-socketdes;
  +srv = os2_select(fds, 0, 1, 0, sock-timeout);
   } while (srv == -1  errno == EINTR);
   
  -if (srv  1) {
  +if (srv == 0) {
  +(*len) = -1;
  +return APR_TIMEUP;
  +}
  +else if (srv  0) {
   (*len) = -1;
   return errno;
   }
  @@ -96,8 +96,10 @@
   (*len) = rv;
   return APR_SUCCESS;
   }
  +
   
  -ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len, 
time_t sec)
  +
  +ap_status_t ap_recv(struct socket_t *sock, char *buf, ap_ssize_t *len)
   {
   ssize_t rv;
   
  @@ -105,21 +107,20 @@
   rv = read(sock-socketdes, buf, (*len));
   } while (rv == -1  errno == EINTR);
   
  -if (rv == -1  errno == EAGAIN  sec  0) {
  -struct timeval tv;
  -fd_set fdset;
  +if (rv == -1  errno == EAGAIN  sock-timeout  0) {
  +int fds;
   int srv;
   
   do {
  -FD_ZERO(fdset);
  -FD_SET(sock-socketdes, fdset);
  -tv.tv_sec  = sec;
  -tv.tv_usec = 0;
  -
  -srv = select(FD_SETSIZE, fdset, NULL, NULL, tv);
  +fds = sock-socketdes;
  +srv = os2_select(fds, 1, 0, 0, sock-timeout);
   } while (srv == -1  errno == EINTR);
   
  -if (srv  1) {
  +if (srv == 0) {
  +(*len) = -1;
  +return APR_TIMEUP;
  +}
  +else if (srv  0) {
   (*len) = -1;
   return errno;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 sockets.c

1999-10-18 Thread bjh
bjh 99/10/18 04:14:21

  Modified:src/lib/apr/network_io/os2 sockets.c
  Log:
  OS/2: Update sockets.c
  - add ap_getport(), ap_setipaddr(), ap_getipaddr(), ap_get_socketdata(),
ap_set_socketdata(), ap_get_os_sock(), ap_put_os_sock()
  - Change ap_connect() to match unix version
  
  Revision  ChangesPath
  1.4   +108 -13   apache-2.0/src/lib/apr/network_io/os2/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/sockets.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sockets.c 1999/10/08 21:27:55 1.3
  +++ sockets.c 1999/10/18 11:14:21 1.4
  @@ -56,12 +56,14 @@
   #include networkio.h
   #include apr_network_io.h
   #include apr_general.h
  +#include apr_portable.h
   #include apr_lib.h
   #include errno.h
   #include string.h
   #include sys/socket.h
   #include netinet/tcp.h
   #include netinet/in.h
  +#include arpa/inet.h
   #include netdb.h
   
   ap_status_t socket_cleanup(void *sock)
  @@ -100,6 +102,7 @@
   if ((*new)-socketdes  0) {
   return errno;
   }
  +(*new)-timeout = -1;
   ap_register_cleanup((*new)-cntxt, (void *)(*new), 
   socket_cleanup, NULL);
   return APR_SUCCESS;
  @@ -127,6 +130,47 @@
   return APR_SUCCESS;
   }
   
  +
  +
  +ap_status_t ap_getport(ap_uint32_t *port, struct socket_t *sock)
  +{
  +*port = ntohs(sock-addr-sin_port);
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +ap_status_t ap_setipaddr(struct socket_t *sock, const char *addr)
  +{
  +ULONG ipaddr;
  +
  +if (!strcmp(addr, APR_ANYADDR)) {
  +sock-addr-sin_addr.s_addr = htonl(INADDR_ANY);
  +return APR_SUCCESS;
  +}
  +
  +ipaddr = inet_addr(addr);
  +
  +if (ipaddr == (ULONG)-1) {
  +return errno;
  +}
  +
  +*(ULONG *)sock-addr-sin_addr = ipaddr;
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +ap_status_t ap_getipaddr(char *addr, ap_ssize_t len,
  +  const struct socket_t *sock)
  +{
  +char *temp = inet_ntoa(sock-addr-sin_addr);
  +ap_cpystrn(addr,temp,len-1);
  +return APR_SUCCESS;
  +}
  +
  +
  +
   ap_status_t ap_bind(struct socket_t *sock)
   {
   sock-addr-sin_addr.s_addr = INADDR_ANY;
  @@ -170,23 +214,23 @@
   {
   struct hostent *hp;
   
  -hp = gethostbyname(hostname);
  +if (hostname != NULL) {
  +hp = gethostbyname(hostname);
   
  -if ((sock-socketdes  0) || (!sock-addr)) {
  -return APR_ENOTSOCK;
  -}
  -if (!hp)  {
  -if (h_errno == TRY_AGAIN) {
  -return EAGAIN;
  +if ((sock-socketdes  0) || (!sock-addr)) {
  +return APR_ENOTSOCK;
   }
  -return h_errno;
  -}
  +if (!hp)  {
  +if (h_errno == TRY_AGAIN) {
  +return EAGAIN;
  +}
  +return h_errno;
  +}
   
  -memcpy((char *)sock-addr-sin_addr, hp-h_addr_list[0], hp-h_length);
  +memcpy((char *)sock-addr-sin_addr, hp-h_addr_list[0], 
hp-h_length);
   
  -sock-addr-sin_family = AF_INET;
  -   
  -sock-addr_len = sizeof(*sock-addr);
  +sock-addr_len = sizeof(*sock-addr);
  +}
   
   if ((connect(sock-socketdes, (const struct sockaddr *)sock-addr, 
sock-addr_len)  0) 
   (errno != EINPROGRESS)) {
  @@ -195,5 +239,56 @@
   else {
   return APR_SUCCESS;
   }
  +}
  +
  +
  +
  +ap_status_t ap_get_socketdata(void **data, char *key, struct socket_t 
*socket)
  +{
  +if (socket != NULL) {
  +return ap_get_userdata(data, key, socket-cntxt);
  +}
  +else {
  +data = NULL;
  +return APR_ENOSOCKET;
  +}
  +}
  +
  +
  +
  +ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key,
  +  ap_status_t (*cleanup) (void *))
  +{
  +if (socket != NULL) {
  +return ap_set_userdata(data, key, cleanup, socket-cntxt);
  +}
  +else {
  +data = NULL;
  +return APR_ENOSOCKET;
  +}
  +}
  +
  +ap_status_t ap_get_os_sock(ap_os_sock_t *thesock, struct socket_t *sock)
  +{
  +if (sock == NULL) {
  +return APR_ENOSOCKET;
  +}
  +*thesock = sock-socketdes;
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +ap_status_t ap_put_os_sock(struct socket_t **sock, ap_os_sock_t *thesock, 
ap_context_t *cont)
  +{
  +if (cont == NULL) {
  +return APR_ENOCONT;
  +}
  +if ((*sock) == NULL) {
  +(*sock) = (struct socket_t *)ap_palloc(cont, sizeof(struct 
socket_t));
  +(*sock)-cntxt = cont;
  +}
  +(*sock)-socketdes = *thesock;
  +return APR_SUCCESS;
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/os2 networkio.h poll.c

1999-10-18 Thread bjh
bjh 99/10/18 04:36:04

  Modified:src/lib/apr/network_io/os2 networkio.h poll.c
  Log:
  OS/2: Rework ap_poll() to use native thread safe select instead of the EMX C
  library select which isn't thread safe.
  
  Revision  ChangesPath
  1.3   +24 -5 apache-2.0/src/lib/apr/network_io/os2/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/networkio.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- networkio.h   1999/10/08 21:27:52 1.2
  +++ networkio.h   1999/10/18 11:36:03 1.3
  @@ -64,17 +64,36 @@
   int socketdes;
   struct sockaddr_in *addr;
   int addr_len;
  +int timeout; 
   };
   
   struct pollfd_t {
   ap_context_t *cntxt;
  -struct socket_t *sock;
  -ap_int16_t events;
  -ap_int16_t revents;
  -int curpos;
  +int *socket_list;
  +int *r_socket_list;
  +int num_read;
  +int num_write;
  +int num_except;
  +int num_total;
   };
   
  -ap_int16_t get_event(ap_int16_t);
  +/* Pointers to dynamically linked API functions */
  +extern int (*os2_select)(int *, int, int, int, long);
  +extern int (*os2_sock_errno)();
  +
  +/* Error codes returned from sock_errno() */
  +#define SOCBASEERR  1
  +#define SOCEPERM(SOCBASEERR+1) /* Not owner */
  +#define SOCESRCH(SOCBASEERR+3) /* No such 
process */
  +#define SOCEINTR(SOCBASEERR+4) /* Interrupted 
system call */
  +#define SOCENXIO(SOCBASEERR+6) /* No such device 
or address */
  +#define SOCEBADF(SOCBASEERR+9) /* Bad file 
number */
  +#define SOCEACCES   (SOCBASEERR+13)/* Permission 
denied */
  +#define SOCEFAULT   (SOCBASEERR+14)/* Bad address */
  +#define SOCEINVAL   (SOCBASEERR+22)/* Invalid 
argument */
  +#define SOCEMFILE   (SOCBASEERR+24)/* Too many open 
files */
  +#define SOCEPIPE(SOCBASEERR+32)/* Broken pipe */
  +#define SOCEOS2ERR  (SOCBASEERR+100)/* OS/2 Error */
   
   #endif  /* ! NETWORK_IO_H */
   
  
  
  
  1.5   +170 -54   apache-2.0/src/lib/apr/network_io/os2/poll.c
  
  Index: poll.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/poll.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- poll.c1999/10/10 20:34:56 1.4
  +++ poll.c1999/10/18 11:36:04 1.5
  @@ -57,40 +57,79 @@
   #include networkio.h
   #include apr_network_io.h
   #include apr_general.h
  +#include apr_portable.h
   #include apr_lib.h
   #include sys/time.h
  +#include stdlib.h
  +#define INCL_DOS
  +#include os2.h
   
  -/*  OS/2 doesn't have a poll function, implement using select */
  +/*  OS/2 doesn't have a poll function, implement using OS/2 style select */

  +static int os2_select_init( int *s, int noreads, int nowrites, int 
noexcepts, long timeout );
  +static int os2_sock_errno_init();
  +
  +int (*os2_select)(int *, int, int, int, long) = os2_select_init;
  +int (*os2_sock_errno)() = os2_sock_errno_init;
  +static HMODULE hSO32DLL;
  +
   ap_status_t ap_setup_poll(struct pollfd_t **new, ap_int32_t num, 
ap_context_t *cont)
   {
  -(*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * 
num);
  +*new = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t));
   
  -if ((*new) == NULL) {
  +if (*new == NULL) {
   return APR_ENOMEM;
   }
   
  +(*new)-socket_list = ap_palloc(cont, sizeof(int) * num);
  +
  +if ((*new)-socket_list == NULL) {
  +return APR_ENOMEM;
  +}
  +
  +(*new)-r_socket_list = ap_palloc(cont, sizeof(int) * num);
  +
  +if ((*new)-r_socket_list == NULL) {
  +return APR_ENOMEM;
  +}
  +
   (*new)-cntxt = cont;
  -(*new)-curpos = 0;
  +(*new)-num_total = 0;
  +(*new)-num_read = 0;
  +(*new)-num_write = 0;
  +(*new)-num_except = 0;
  +
   return APR_SUCCESS;
   }
   
   
   
   ap_status_t ap_add_poll_socket(struct pollfd_t *aprset, 
  -struct socket_t *sock, ap_int16_t event)
  +struct socket_t *sock, ap_int16_t events)
   {
  -int i = 0;
  +int i;
   
  -while (i  aprset-curpos  aprset[i].sock-socketdes != 
sock-socketdes) {
  -i++;
  +if (events  APR_POLLIN) {
  +for (i=aprset-num_total; iaprset-num_read; i--)
  +aprset-socket_list[i] = aprset-socket_list[i-1];
  +aprset-socket_list[i] = sock-socketdes;
  +aprset-num_read++;
  +aprset-num_total++;
   }
  -if (i = aprset-curpos

cvs commit: apache-2.0/src/lib/apr/time/os2 Makefile.in

1999-10-18 Thread bjh
bjh 99/10/18 05:06:55

  Modified:src/lib/apr/file_io/os2 Makefile.in
   src/lib/apr/locks/os2 Makefile.in
   src/lib/apr/misc/os2 Makefile.in
   src/lib/apr/network_io/os2 Makefile.in
   src/lib/apr/threadproc/os2 Makefile.in
   src/lib/apr/time/os2 Makefile.in
  Log:
  OS/2: Update dependencies
  
  Revision  ChangesPath
  1.5   +3 -3  apache-2.0/src/lib/apr/file_io/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/10/13 09:38:07 1.4
  +++ Makefile.in   1999/10/18 12:06:51 1.5
  @@ -70,9 +70,9 @@
   filestat.o: filestat.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
  -maperrorcode.o: maperrorcode.c $(INCDIR1)/apr_file_io.h \
  - $(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
  - $(INCDIR1)/apr_errno.h
  +maperrorcode.o: maperrorcode.c fileio.h $(INCDIR1)/apr_general.h \
  + $(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  + $(INCDIR1)/apr_file_io.h
   open.o: open.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  
  
  
  1.4   +2 -3  apache-2.0/src/lib/apr/locks/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/os2/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/08/28 08:57:11 1.3
  +++ Makefile.in   1999/10/18 12:06:52 1.4
  @@ -54,6 +54,5 @@
   # DO NOT REMOVE
   locks.o: locks.c $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_lib.h $(INCDIR1)/apr_file_io.h \
  - $(INCDIR1)/hsregex.h locks.h $(INCDIR1)/apr_lock.h \
  - $(INCDIR2)/fileio.h
  + $(INCDIR1)/apr_lib.h $(INCDIR1)/apr_file_io.h locks.h \
  + $(INCDIR1)/apr_lock.h $(INCDIR2)/fileio.h
  
  
  
  1.6   +4 -0  apache-2.0/src/lib/apr/misc/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/10/13 09:31:35 1.5
  +++ Makefile.in   1999/10/18 12:06:52 1.6
  @@ -51,6 +51,10 @@
 rm Makefile.new
   
   # DO NOT REMOVE
  +default.o: default.c ../unix/getopt.c ../unix/misc.h \
  + $(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
  + $(INCDIR1)/apr_errno.h $(INCDIR1)/apr_file_io.h ../unix/start.c \
  + $(INCDIR)/apr_pools.h $(INCDIR1)/apr_lib.h
   getopt.o: getopt.c misc.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR1)/apr_file_io.h
  
  
  
  1.4   +15 -9 apache-2.0/src/lib/apr/network_io/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/08/28 08:57:13 1.3
  +++ Makefile.in   1999/10/18 12:06:53 1.4
  @@ -55,16 +55,22 @@
   # DO NOT REMOVE
   poll.o: poll.c networkio.h $(INCDIR1)/apr_network_io.h \
$(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
  - $(INCDIR1)/apr_errno.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_errno.h $(INCDIR1)/apr_portable.h \
  + $(INCDIR1)/apr_thread_proc.h $(INCDIR1)/apr_file_io.h \
  + $(INCDIR1)/apr_win.h $(INCDIR1)/apr_lock.h \
  + $(INCDIR1)/apr_time.h $(INCDIR1)/apr_lib.h
   sendrecv.o: sendrecv.c networkio.h $(INCDIR1)/apr_network_io.h \
$(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
  - $(INCDIR1)/apr_errno.h
  -sockets.o: sockets.c networkio.h $(INCDIR1)/apr_network_io.h \
  - $(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
$(INCDIR1)/apr_errno.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/hsregex.h
  -sockopt.o: sockopt.c networkio.h $(INCDIR1)/apr_network_io.h \
  + $(INCDIR1)/apr_file_io.h
  +sockets.o: sockets.c networkio.h $(INCDIR1)/apr_network_io.h \
$(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
  - $(INCDIR1)/apr_errno.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_errno.h $(INCDIR1)/apr_portable.h \
  + $(INCDIR1)/apr_thread_proc.h $(INCDIR1)/apr_file_io.h \
  + $(INCDIR1)/apr_win.h $(INCDIR1)/apr_lock.h \
  + $(INCDIR1)/apr_time.h $(INCDIR1)/apr_lib.h
  +sockopt.o: sockopt.c ../unix/sockopt.c ../unix/networkio.h \
  + $(INCDIR1)/apr_network_io.h

cvs commit: apache-2.0/src/lib/apr/file_io/os2 open.c

1999-10-18 Thread bjh
bjh 99/10/18 07:55:20

  Modified:src/lib/apr/file_io/os2 open.c
  Log:
  OS/2: Fix flags to DosOpen() so that mutually exclusive flags aren't used
  at the same time.
  
  Revision  ChangesPath
  1.8   +1 -1  apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- open.c1999/10/18 10:23:21 1.7
  +++ open.c1999/10/18 14:55:19 1.8
  @@ -112,7 +112,7 @@
   
   if (flag  APR_TRUNCATE) {
   oflags |= OPEN_ACTION_REPLACE_IF_EXISTS;
  -} else {
  +} else if ((oflags  0xF) == 0) {
   oflags |= OPEN_ACTION_OPEN_IF_EXISTS;
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 thread.c

1999-10-14 Thread bjh
bjh 99/10/13 19:53:16

  Modified:src/lib/apr/threadproc/os2 thread.c
  Log:
  OS/2: Fix a warning and parameter order to ap_create_threadattr()
  
  Revision  ChangesPath
  1.5   +2 -1  apache-2.0/src/lib/apr/threadproc/os2/thread.c
  
  Index: thread.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/thread.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- thread.c  1999/10/11 17:52:13 1.4
  +++ thread.c  1999/10/14 02:53:16 1.5
  @@ -58,6 +58,7 @@
   #include apr_general.h
   #include apr_lib.h
   #include fileio.h
  +#include stdlib.h
   #define INCL_DOS
   #include os2.h
   
  @@ -124,7 +125,7 @@
   }
   
   if (attr == NULL) {
  -stat = ap_create_threadattr(thread-cntxt, thread-attr);
  +stat = ap_create_threadattr(thread-attr, thread-cntxt);
   
   if (stat != APR_SUCCESS) {
   return stat;
  
  
  


cvs commit: apache-2.0/src/lib/apr/test Makefile.in

1999-10-14 Thread bjh
bjh 99/10/13 20:00:35

  Modified:src/lib/apr configure.in
   src/lib/apr/test Makefile.in
  Log:
  Make use of -lcrypt conditional on actually having libcrypt.a
  
  Revision  ChangesPath
  1.20  +1 -0  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- configure.in  1999/10/13 15:29:14 1.19
  +++ configure.in  1999/10/14 03:00:33 1.20
  @@ -103,6 +103,7 @@
   AC_CHECK_LIB(dl, dlopen)
   AC_CHECK_LIB(pthread, pthread_mutex_init)
   AC_CHECK_LIB(socket,socket)
  +AC_CHECK_LIB(crypt,crypt)
   AC_CHECK_LIB(ufc,crypt)
   
   if test .$SYS_SW = .AIX; then
  
  
  
  1.6   +1 -1  apache-2.0/src/lib/apr/test/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/10/04 16:37:21 1.5
  +++ Makefile.in   1999/10/14 03:00:34 1.6
  @@ -8,7 +8,7 @@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ @OPTIM@ 
  -LIBS=-L../libs -lnetwork -lthreadproc -lfile -lmisc -lapr -ltime -llock 
-lsig -lcrypt @LIBS@ 
  +LIBS=-L../libs -lnetwork -lthreadproc -lfile -lmisc -lapr -ltime -llock 
-lsig @LIBS@ 
   [EMAIL PROTECTED]@ $(LIBS)
   INCDIR=../include
   INCDIR1=../../inc
  
  
  


cvs commit: apache-2.0/src/lib/apr/misc/unix start.c

1999-10-13 Thread bjh
bjh 99/10/13 02:31:37

  Modified:src/lib/apr/misc/os2 start.c Makefile.in
   src/lib/apr/misc/unix start.c
  Log:
  OS/2: Use the (slightly tweaked) unix start.c instead of our own.
  
  Revision  ChangesPath
  1.7   +1 -87 apache-2.0/src/lib/apr/misc/os2/start.c
  
  Index: start.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/start.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- start.c   1999/10/04 16:37:00 1.6
  +++ start.c   1999/10/13 09:31:34 1.7
  @@ -53,90 +53,4 @@
*
*/
   
  -#include apr_general.h
  -#include apr_errno.h
  -#include apr_pools.h
  -#include misc.h
  -#include errno.h
  -#include string.h
  -
  -ap_status_t ap_create_context(ap_context_t **newcont, struct context_t 
*cont, void *data)
  -{
  -struct context_t *new;
  -ap_pool_t *pool;
  -
  -if (cont) {
  -pool = ap_make_sub_pool(cont-pool);
  -}
  -else {
  -pool = ap_init_alloc();;
  -}
  -
  -if (pool == NULL) {
  -return APR_ENOPOOL;
  -}   
  -
  -if (cont) { 
  -new = (struct context_t *)ap_palloc(cont, sizeof(struct context_t));
  -}
  -else {
  -new = (struct context_t *)malloc(sizeof(struct context_t));
  -}
  -
  -new-pool = pool;
  -if (data == NULL  cont) {
  -new-prog_data = cont-prog_data;
  -}
  -else {
  -new-prog_data = data;
  -}
  - 
  -*newcont = new;
  -return APR_SUCCESS;
  -}
  -
  -ap_status_t ap_destroy_context(struct context_t *cont)
  -{
  -ap_destroy_pool(cont);
  -return APR_SUCCESS;
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_set_userdata(ap_context_t *, void *)
  - *Set the data associated with the current context.
  - * arg 1) The current context.
  - * arg 2) The user data associated with the context.
  - */
  -ap_status_t ap_set_userdata(struct context_t *cont, void *data)
  -{
  -if (cont) {
  -cont-prog_data = data;
  -return APR_SUCCESS;
  -}
  -return APR_ENOCONT;
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_get_userdata(void **, ap_context_t *)
  - *Return the data associated with the current context.
  - * arg 1) The current context.
  - * arg 2) The user data associated with the context.
  - */
  -ap_status_t ap_get_userdata(void **data, struct context_t *cont)
  -{
  -if (cont) {
  -(*data) = cont-prog_data;
  -return APR_SUCCESS;
  -}
  -return APR_ENOCONT;
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_initialize()
  - *Setup any APR internal data structures.  This MUST be the first
  - *function called for any APR program.
  - */
  -ap_status_t ap_initialize(void)
  -{
  -return APR_SUCCESS;
  -}
  +#include ../unix/start.c
  
  
  
  1.5   +5 -2  apache-2.0/src/lib/apr/misc/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/08/29 12:28:54 1.4
  +++ Makefile.in   1999/10/13 09:31:35 1.5
  @@ -51,7 +51,10 @@
 rm Makefile.new
   
   # DO NOT REMOVE
  -start.o: start.c $(INCDIR1)/apr_general.h \
  +getopt.o: getopt.c misc.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  + $(INCDIR1)/apr_file_io.h
  +start.o: start.c ../unix/start.c $(INCDIR1)/apr_general.h \
  + $(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR)/apr_pools.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/hsregex.h misc.h
  + $(INCDIR1)/apr_file_io.h ../unix/misc.h
  
  
  
  1.11  +2 -0  apache-2.0/src/lib/apr/misc/unix/start.c
  
  Index: start.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/start.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- start.c   1999/10/08 20:04:03 1.10
  +++ start.c   1999/10/13 09:31:36 1.11
  @@ -57,7 +57,9 @@
   #include apr_errno.h
   #include apr_pools.h
   #include misc.h
  +#ifdef HAVE_PTHREAD_H
   #include pthread.h
  +#endif
   #include signal.h
   #include errno.h
   #include string.h
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 Makefile.in fileio.h filestat.c

1999-10-13 Thread bjh
bjh 99/10/13 02:38:09

  Modified:src/lib/apr/file_io/os2 Makefile.in fileio.h filestat.c
  Log:
  OS/2: Some cleaning up for file_io.
  
  Revision  ChangesPath
  1.4   +10 -15apache-2.0/src/lib/apr/file_io/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/08/28 08:57:10 1.3
  +++ Makefile.in   1999/10/13 09:38:07 1.4
  @@ -60,36 +60,31 @@
   # DO NOT REMOVE
   dir.o: dir.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   fileacc.o: fileacc.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   filedup.o: filedup.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   filestat.o: filestat.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   maperrorcode.o: maperrorcode.c $(INCDIR1)/apr_file_io.h \
$(INCDIR1)/apr_general.h $(INCDIR1)/apr_config.h \
$(INCDIR1)/apr_errno.h
   open.o: open.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
$(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_portable.h $(INCDIR1)/apr_thread_proc.h \
  + $(INCDIR1)/apr_win.h $(INCDIR1)/apr_network_io.h \
  + $(INCDIR1)/apr_lock.h $(INCDIR1)/apr_time.h
   pipe.o: pipe.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   readwrite.o: readwrite.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
   seek.o: seek.c fileio.h $(INCDIR1)/apr_general.h \
$(INCDIR1)/apr_config.h $(INCDIR1)/apr_errno.h \
  - $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h \
  - $(INCDIR1)/hsregex.h
  + $(INCDIR1)/apr_file_io.h $(INCDIR1)/apr_lib.h
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/file_io/os2/fileio.h
  
  Index: fileio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileio.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fileio.h  1999/08/17 15:59:36 1.1
  +++ fileio.h  1999/10/13 09:38:08 1.2
  @@ -65,7 +65,7 @@
   
   struct file_t {
   ap_context_t *cntxt;
  -ULONG filedes;
  +HFILE filedes;
   char * fname;
   int isopen;
   int buffered;
  
  
  
  1.2   +0 -12 apache-2.0/src/lib/apr/file_io/os2/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/filestat.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- filestat.c1999/08/17 15:59:36 1.1
  +++ filestat.c1999/10/13 09:38:08 1.2
  @@ -62,18 +62,6 @@
   #include os2.h
   
   
  -typedef struct {
  -  USHORT sec2:5;
  -  USHORT min:6;
  -  USHORT hour:5;
  -} DOSTIME;
  -
  -typedef struct {
  -  USHORT day:5;
  -  USHORT month:4;
  -  USHORT year:7;
  -} DOSDATE;
  -
   long os2date2unix( FDATE os2date, FTIME os2time )
   {
 struct tm tmpdate;
  
  
  


cvs commit: apache-site/contributors index.html

1999-10-11 Thread bjh
bjh 99/10/10 21:20:39

  Modified:contributors index.html
  Log:
  Add in my details.
  
  Revision  ChangesPath
  1.77  +12 -1 apache-site/contributors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/contributors/index.html,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- index.html1999/10/10 23:45:40 1.76
  +++ index.html1999/10/11 04:20:33 1.77
  @@ -58,7 +58,8 @@
TDSTRONGA HREF=#hartillRob Hartill/A/STRONG
TDgeneral trouble maker, comments to offend all.
   TR VALIGN=TOP
  - TDSTRONGBrian Havard/STRONG
  + TDSTRONGA HREF=#bjhBrian Havard/A/STRONG
  + TDOS/2 porting.
   TR VALIGN=TOP
TDSTRONGA HREF=#bhydeBen Hyde/A/STRONG
   TR VALIGN=TOP
  @@ -318,6 +319,16 @@
   STRONGOccupation:/STRONG Post-doc PERL guruBR
   STRONGLocation:/STRONG Los Alamos, New Mexico, Good Old US of ABR
   STRONGComments:/STRONG write it in PERLBR
  +
  +P
  +
  +STRONGName:/STRONG   A NAME=bjhBrian Havard/ABR
  +STRONGEmail:/STRONG  A HREF=mailto:[EMAIL 
PROTECTED][EMAIL PROTECTED]/ABR
  +STRONGURL:/STRONGA 
HREF=http://silk.apana.org.au;http://silk.apana.org.au/ABR
  +STRONGOccupation:/STRONG Software EngineerBR
  +STRONGOS Expertise:/STRONG   OS/2BR
  +STRONGLocation:/STRONG   Melbourne, AustraliaBR
  +STRONGContributions:/STRONG  Maintenance of A 
HREF=http://silk.apana.org.au/apache/;OS/2 port/ABR
   
   P
   
  
  
  


cvs commit: apache-2.0/src/lib/apr acconfig.h

1999-10-11 Thread bjh
bjh 99/10/11 07:13:20

  Modified:src/lib/apr acconfig.h
  Log:
  Map strcasecmp to stricmp if stricmp is available but strcasecmp isn't.
  
  Revision  ChangesPath
  1.6   +4 -0  apache-2.0/src/lib/apr/acconfig.h
  
  Index: acconfig.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/acconfig.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- acconfig.h1999/10/08 20:03:32 1.5
  +++ acconfig.h1999/10/11 14:13:19 1.6
  @@ -100,4 +100,8 @@
   #define LOCALTIME_R(x, y) memcpy(y, localtime(x), sizeof(y))
   #endif
   
  +#if !defined(HAVE_STRCASECMP)  defined(HAVE_STRICMP)
  +#define strcasecmp(s1,s2) stricmp(s1,s2)
  +#endif
  +
   #endif /* APR_CONFIG_H */
  
  
  


cvs commit: apache-2.0/src/lib/apr configure.in

1999-10-11 Thread bjh
bjh 99/10/11 07:15:28

  Modified:src/lib/apr configure.in
  Log:
  OS/2: Compile with multi-threaded switch so we get things like thread safe
  errno etc.
  
  Revision  ChangesPath
  1.18  +1 -1  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- configure.in  1999/10/10 17:25:29 1.17
  +++ configure.in  1999/10/11 14:15:27 1.18
  @@ -87,7 +87,7 @@
   
   case $OS in
  *-os2*)
  -   CFLAGS=$CFLAGS -DOS2
  +   CFLAGS=$CFLAGS -DOS2 -Zmt
  OSDIR=os2
  LIBPREFIX=
  ;;
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 fileacc.c

1999-10-11 Thread bjh
bjh 99/10/11 07:18:57

  Modified:src/lib/apr/file_io/os2 fileacc.c
  Log:
  OS/2: implement ap_get_filetype()
  
  Revision  ChangesPath
  1.4   +34 -0 apache-2.0/src/lib/apr/file_io/os2/fileacc.c
  
  Index: fileacc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/fileacc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- fileacc.c 1999/10/06 23:03:42 1.3
  +++ fileacc.c 1999/10/11 14:18:56 1.4
  @@ -186,3 +186,37 @@
   }
   }
   
  +
  +
  +ap_status_t ap_get_filetype(ap_filetype_e *type, struct file_t *file)
  +{
  +ULONG rc, filetype, fileattr;
  +
  +if (file != NULL  file-isopen) {
  +rc = DosQueryHType( file-filedes, filetype, fileattr );
  +
  +if (rc)
  +return os2errno(rc);
  +
  +switch (filetype  0xff) {
  +case 0:
  +*type = APR_REG;
  +break;
  +
  +case 1:
  +*type = APR_CHR;
  +break;
  +
  +case 2:
  +*type = APR_PIPE;
  +break;
  +}
  +
  +return APR_SUCCESS;
  +}
  +else {
  +*type = APR_REG;
  +return APR_ENOFILE;
  +}
  +}
  +
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c threadproc.h

1999-10-11 Thread bjh
bjh 99/10/11 07:44:26

  Modified:src/lib/apr/threadproc/os2 proc.c threadproc.h
  Log:
  OS/2: Implement detached processes  fix some parameter ordering.
  
  Revision  ChangesPath
  1.4   +16 -8 apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- proc.c1999/10/04 16:37:37 1.3
  +++ proc.c1999/10/11 14:44:24 1.4
  @@ -65,6 +65,7 @@
   #include sys/wait.h
   #include unistd.h
   #include process.h
  +#include stdlib.h
   #define INCL_DOS
   #include os2.h
   
  @@ -85,6 +86,7 @@
   (*new)-child_err = NULL;
   (*new)-currdir = NULL; 
   (*new)-cmdtype = APR_PROGRAM;
  +(*new)-detached = FALSE;
   return APR_SUCCESS;
   }
   
  @@ -93,20 +95,20 @@
   {
   ap_status_t stat;
   if (in) {
  -if ((stat = ap_create_pipe(attr-cntxt, attr-child_in, 
  -attr-parent_in)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(attr-child_in, attr-parent_in,
  +   attr-cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
   if (out) {
  -if ((stat = ap_create_pipe(attr-cntxt, attr-parent_out, 
  -attr-child_out)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(attr-parent_out, attr-child_out,
  +   attr-cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
   if (err) {
  -if ((stat = ap_create_pipe(attr-cntxt, attr-parent_err, 
  -attr-child_err)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(attr-parent_err, attr-child_err,
  +   attr-cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
  @@ -130,6 +132,12 @@
   return APR_SUCCESS;
   }
   
  +ap_status_t ap_setprocattr_detach(struct procattr_t *attr, ap_int32_t 
detach) 
  +{
  +attr-detached = detach;
  +return APR_SUCCESS;
  +}
  +
   ap_status_t ap_fork(struct proc_t **proc, ap_context_t *cont)
   {
   int pid;
  @@ -229,9 +237,9 @@
   }
   
   newargs[i + 3] = NULL;
  -(*new)-pid = spawnve(P_NOWAIT, SHELL_PATH, newargs, env);
  +(*new)-pid = spawnve(attr-detached ? P_DETACH : P_NOWAIT, 
SHELL_PATH, newargs, env);
   } else {
  -(*new)-pid = spawnve(P_NOWAIT, progname, args, env);
  +(*new)-pid = spawnve(attr-detached ? P_DETACH : P_NOWAIT, 
progname, args, env);
   }
   
   stat = (*new)-pid  0 ? errno : APR_SUCCESS;
  
  
  
  1.2   +1 -0  apache-2.0/src/lib/apr/threadproc/os2/threadproc.h
  
  Index: threadproc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/threadproc.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- threadproc.h  1999/08/17 15:59:50 1.1
  +++ threadproc.h  1999/10/11 14:44:25 1.2
  @@ -93,6 +93,7 @@
   ap_file_t *child_err;
   char *currdir;
   ap_int32_t cmdtype;
  +ap_int32_t detached;
   };
   
   struct proc_t {
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/os2 open.c

1999-10-11 Thread bjh
bjh 99/10/11 07:51:23

  Modified:src/lib/apr/file_io/os2 open.c
  Log:
  OS/2: Implement ap_get_os_file()/ap_put_os_file() and fix ap_open() parameter
  order.
  
  Revision  ChangesPath
  1.4   +27 -1 apache-2.0/src/lib/apr/file_io/os2/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/open.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- open.c1999/10/06 23:03:44 1.3
  +++ open.c1999/10/11 14:51:22 1.4
  @@ -56,6 +56,7 @@
   #include fileio.h
   #include apr_file_io.h
   #include apr_lib.h
  +#include apr_portable.h
   #include string.h
   
   #define INCL_DOS
  @@ -69,7 +70,7 @@
   
   
   
  -ap_status_t ap_open(struct file_t **new, ap_context_t *cntxt, char *fname, 
ap_int32_t flag,  ap_fileperms_t perm)
  +ap_status_t ap_open(struct file_t **new, ap_context_t *cntxt, const char 
*fname, ap_int32_t flag,  ap_fileperms_t perm)
   {
   int oflags = 0;
   int mflags = OPEN_FLAGS_FAIL_ON_ERROR|OPEN_SHARE_DENYNONE;
  @@ -158,4 +159,29 @@
   ULONG rc = DosDelete(path);
   return os2errno(rc);
   }
  +
  +
  +
  +ap_status_t ap_get_os_file(ap_os_file_t *thefile, struct file_t *file)
  +{
  +if (file == NULL) {
  +return APR_ENOFILE;
  +}
  +
  +*thefile = file-filedes;
  +return APR_SUCCESS;
  +}
  +
  +
  +
  +ap_status_t ap_put_os_file(struct file_t **file, ap_os_file_t *thefile, 
ap_context_t *cont)
  +{
  +ap_os_file_t *dafile = thefile;
  +if ((*file) == NULL) {
  +(*file) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
  +(*file)-cntxt = cont;
  +}
  +(*file)-filedes = *dafile;
  +return APR_SUCCESS;
  +}
   
  
  
  


cvs commit: apache-1.3/src/main util.c

1999-09-18 Thread bjh
bjh 99/09/18 03:57:08

  Modified:src/main util.c
  Log:
  Configuration files are text files so open them in text mode.
  
  Some OS/2 (and probably DOS  Windows) text editors like to put Ctrl-Z EOF
  markers at the end of the files they edit. Opening the config files in text
  mode prevents the Ctrl-Z from causing 'Invalid command' errors when starting.
  
  PR: 4632
  
  Revision  ChangesPath
  1.172 +1 -1  apache-1.3/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.171
  retrieving revision 1.172
  diff -u -r1.171 -r1.172
  --- util.c1999/08/14 08:35:50 1.171
  +++ util.c1999/09/18 10:57:07 1.172
  @@ -807,7 +807,7 @@
   return NULL;
   }
   
  -file = ap_pfopen(p, name, r);
  +file = ap_pfopen(p, name, rt);
   #ifdef DEBUG
   saved_errno = errno;
   ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, NULL,
  
  
  


cvs commit: apache-2.0/src/lib/apr/misc/os2 start.c

1999-08-30 Thread bjh
bjh 99/08/30 07:39:51

  Modified:src/lib/apr/misc/os2 start.c
  Log:
  APR OS/2 startup module:
  - fix parameter to ap_destroy_pool
  - add ap_set_userdata(), ap_get_userdata() and ap_initialize() functions.
  
  Revision  ChangesPath
  1.3   +40 -1 apache-2.0/src/lib/apr/misc/os2/start.c
  
  Index: start.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/start.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- start.c   1999/08/27 16:25:51 1.2
  +++ start.c   1999/08/30 14:39:51 1.3
  @@ -97,7 +97,46 @@
   
   ap_status_t ap_destroy_context(struct context_t *cont)
   {
  -ap_destroy_pool(cont-pool);
  +ap_destroy_pool(cont);
   return APR_SUCCESS;
   }
   
  +/* ***APRDOC
  + * ap_status_t ap_set_userdata(ap_context_t *, void *)
  + *Set the data associated with the current context.
  + * arg 1) The current context.
  + * arg 2) The user data associated with the context.
  + */
  +ap_status_t ap_set_userdata(struct context_t *cont, void *data)
  +{
  +if (cont) {
  +cont-prog_data = data;
  +return APR_SUCCESS;
  +}
  +return APR_ENOCONT;
  +}
  +
  +/* ***APRDOC
  + * ap_status_t ap_get_userdata(ap_context_t *, void **)
  + *Return the data associated with the current context.
  + * arg 1) The current context.
  + * arg 2) The user data associated with the context.
  + */
  +ap_status_t ap_get_userdata(struct context_t *cont, void **data)
  +{
  +if (cont) {
  +(*data) = cont-prog_data;
  +return APR_SUCCESS;
  +}
  +return APR_ENOCONT;
  +}
  +
  +/* ***APRDOC
  + * ap_status_t ap_initialize()
  + *Setup any APR internal data structures.  This MUST be the first
  + *function called for any APR program.
  + */
  +ap_status_t ap_initialize(void)
  +{
  +return APR_SUCCESS;
  +}
  
  
  


cvs commit: apache-2.0/src/lib/apr/include apr_portable.h

1999-08-30 Thread bjh
bjh 99/08/30 07:42:32

  Modified:src/lib/apr/include apr_portable.h
  Log:
  APR OS/2 - add ap_os_* type defines for OS/2.
  
  Revision  ChangesPath
  1.2   +13 -0 apache-2.0/src/lib/apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_portable.h1999/08/17 15:59:37 1.1
  +++ apr_portable.h1999/08/30 14:42:32 1.2
  @@ -95,6 +95,19 @@
   typedef PROCESS_INFORMATION   ap_os_proc_t;
   typedef DWORD ap_os_threadkey_t; 
   typedef SYSTEMTIMEap_os_time_t;
  +
  +#elif defined(OS2)
  +#define INCL_DOS
  +#include os2.h
  +typedef HFILE ap_os_file_t;
  +typedef HDIR  ap_os_dir_t;
  +typedef int   ap_os_sock_t;
  +typedef HMTX  ap_os_lock_t;
  +typedef TID   ap_os_thread_t;
  +typedef PID   ap_os_proc_t;
  +typedef PULONGap_os_threadkey_t; 
  +typedef struct timevalap_os_time_t;
  +
   #else
   /* Any other OS should go above this one.  This is the lowest common
* denominator typedefs for  all UNIX-like systems.  :)
  
  
  


cvs commit: apache-2.0/src/lib/apr configure.in

1999-08-30 Thread bjh
bjh 99/08/30 07:44:47

  Modified:src/lib/apr configure.in
  Log:
  APR configure.in tweaks to allow test programs to build on OS/2.
  
  Revision  ChangesPath
  1.5   +4 -0  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- configure.in  1999/08/28 08:05:43 1.4
  +++ configure.in  1999/08/30 14:44:46 1.5
  @@ -79,7 +79,9 @@
   
   case $OS in
  *-os2*)
  +   CFLAGS=$CFLAGS -DOS2
  OSDIR=os2
  +   LIBPREFIX=
  ;;
  *beos*)
  OSDIR=beos
  @@ -91,6 +93,8 @@
   
   AC_CHECK_LIB(dl, dlopen)
   AC_CHECK_LIB(pthread, pthread_mutex_init)
  +AC_CHECK_LIB(socket,socket)
  +AC_CHECK_LIB(ufc,crypt)
   
   if (test $SYS_SW = AIX); then
   CFLAGS=$CFLAGS -U__STR__
  
  
  


cvs commit: apache-2.0/src/modules/mpm/spmt_os2 spmt_os2.c

1999-08-30 Thread bjh
bjh 99/08/30 07:47:21

  Modified:src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Update OS/2 MPM for latest hooks.
  
  Revision  ChangesPath
  1.10  +0 -3  apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- spmt_os2.c1999/08/13 06:58:02 1.9
  +++ spmt_os2.c1999/08/30 14:47:21 1.10
  @@ -1793,14 +1793,11 @@
   
   module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
   STANDARD20_MODULE_STUFF,
  -NULL,/* child_init */
   NULL,/* create per-directory config structure */
   NULL,/* merge per-directory config structures */
   NULL,/* create per-server config structure */
   NULL,/* merge per-server config structures */
   spmt_os2_cmds,   /* command table */
   NULL,/* handlers */
  -NULL,/* check auth */
  -NULL,/* check access */
   spmt_os2_hooks,  /* register_hooks */
   };
  
  
  


cvs commit: apache-2.0/src/lib/apr/time/os2 .cvsignore

1999-08-29 Thread bjh
bjh 99/08/29 05:19:06

  Added:   src/lib/apr/file_io/os2 .cvsignore
   src/lib/apr/locks/os2 .cvsignore
   src/lib/apr/misc/os2 .cvsignore
   src/lib/apr/network_io/os2 .cvsignore
   src/lib/apr/threadproc/os2 .cvsignore
   src/lib/apr/time/os2 .cvsignore
  Log:
  Ignore generated makefiles in APR OS/2 directories.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/lib/apr/file_io/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/src/lib/apr/locks/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/src/lib/apr/misc/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/src/lib/apr/network_io/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/src/lib/apr/threadproc/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/src/lib/apr/time/os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  


cvs commit: apache-2.0/src/lib/apr/misc/os2 getopt.c Makefile.in

1999-08-29 Thread bjh
bjh 99/08/29 05:28:55

  Modified:src/lib/apr/misc/os2 Makefile.in
  Added:   src/lib/apr/misc/os2 getopt.c
  Log:
  Add getopt module to APR OS/2. Same as unix for now.
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/src/lib/apr/misc/os2/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/os2/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/08/28 08:57:12 1.3
  +++ Makefile.in   1999/08/29 12:28:54 1.4
  @@ -15,7 +15,7 @@
   
   LIB=misc.a
   
  -OBJS=start.o \
  +OBJS=start.o getopt.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $
  
  
  
  1.1  apache-2.0/src/lib/apr/misc/os2/getopt.c
  
  Index: getopt.c
  ===
  /*
   * Copyright (c) 1987, 1993, 1994
   *  The Regents of the University of California.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
   *notice, this list of conditions and the following disclaimer.
   * 2. Redistributions in binary form must reproduce the above copyright
   *notice, this list of conditions and the following disclaimer in the
   *documentation and/or other materials provided with the distribution.
   * 3. All advertising materials mentioning features or use of this software
   *must display the following acknowledgement:
   *  This product includes software developed by the University of
   *  California, Berkeley and its contributors.
   * 4. Neither the name of the University nor the names of its contributors
   *may be used to endorse or promote products derived from this software
   *without specific prior written permission.
   *
   * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   */
  
  #include stdio.h
  #include stdlib.h
  #include string.h
  #include misc.h
  
  int opterr = 1,  /* if error message should be printed */
  optind = 1,  /* index into parent argv vector */
  optopt,  /* character checked for validity */
  optreset;/* reset getopt */
  char *optarg;/* argument associated with option */
  
  #define EMSG
  
  /* ***APRDOC
   * ap_status_t ap_getopt(ap_context_t *, ap_int32_t, char *const *, 
   *   const char *, ap_int32_t)
   *Parse the command line options passed to the program.
   * arg 1) The context to operate on.
   * arg 2) The number of arguments passed to ap_getopt to parse
   * arg 3) The array of command line options to parse
   * arg 4) A string of characters that are acceptable options to the program.
   *characters followed by : are required to have an option 
   *associated 
   * arg 5) The next option found.  There are four potential values for 
   *this variable on exit. They are:
   *APR_EOF--  No more options to parse
   *APR_BADCH  --  Found a bad option character
   *APR_BADARG --  Missing parameter for the found option
   *Other  --  The next option found.
   * NOTE:  Arguments 2 and 3 are most commonly argc and argv from 
   *main(argc, argv)
   */
  ap_status_t ap_getopt(struct context_t *cont, ap_int32_t nargc, 
char *const *nargv, const char *ostr, ap_int32_t *rv)
  {
  char *p;
  static char *place = EMSG;   /* option letter processing */
  char *oli;   /* option letter list index */
  
  if (optreset || !*place) {   /* update scanning pointer */
  optreset = 0;
  if (optind = nargc || *(place = nargv[optind]) != '-') {
  place = EMSG;
  *rv = optopt;
  return (APR_EOF);
  }
  if (place[1]  *++place == '-') {/* found

cvs commit: apache-2.0/src/lib/apr/threadproc/os2 proc.c

1999-08-28 Thread bjh
bjh 99/08/28 01:05:46

  Modified:src/lib/apr Makefile.in config.guess config.sub configure.in
   src/lib/apr/file_io/os2 readwrite.c
   src/lib/apr/network_io/os2 poll.c
   src/lib/apr/threadproc/os2 proc.c
  Log:
  Fix build of APR on OS/2
  
  Revision  ChangesPath
  1.5   +1 -1  apache-2.0/src/lib/apr/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/08/27 16:25:33 1.4
  +++ Makefile.in   1999/08/28 08:05:42 1.5
  @@ -41,7 +41,7 @@
   all: Makefile $(MODULES) subdirs
rm -Rf libs
mkdir libs
  - @for i in $(SUBDIRS); do cp $$i/lib*.a libs ; done;
  + @for i in $(SUBDIRS); do cp $$i/*.a libs ; done;
@echo APR built.
   
   clean: subdirs_clean
  
  
  
  1.2   +3 -0  apache-2.0/src/lib/apr/config.guess
  
  Index: config.guess
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/config.guess,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.guess  1999/08/17 15:59:35 1.1
  +++ config.guess  1999/08/28 08:05:43 1.2
  @@ -938,6 +938,9 @@
   *:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
exit 0 ;;
  +*:OS/2:*:*)
  + echo i386-pc-os2_emx
  + exit 0;;
   esac
   
   #echo '(No uname command or uname output not recognized.)' 12
  
  
  
  1.2   +2 -0  apache-2.0/src/lib/apr/config.sub
  
  Index: config.sub
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/config.sub,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.sub1999/08/17 15:59:35 1.1
  +++ config.sub1999/08/28 08:05:43 1.2
  @@ -891,6 +891,8 @@
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
  + -os2_emx)
  + ;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
  
  
  
  1.4   +3 -0  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- configure.in  1999/08/19 13:31:09 1.3
  +++ configure.in  1999/08/28 08:05:43 1.4
  @@ -78,6 +78,9 @@
   AC_CHECK_LIB(pthread, pthread_mutex_init, AC_DEFINE(USE_PTHREAD_SERIALIZE))
   
   case $OS in
  +   *-os2*)
  +   OSDIR=os2
  +   ;;
  *beos*)
  OSDIR=beos
  ;;
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- readwrite.c   1999/08/17 15:59:36 1.1
  +++ readwrite.c   1999/08/28 08:05:44 1.2
  @@ -60,7 +60,7 @@
   #define INCL_DOS
   #include os2.h
   
  -ap_status_t ap_read(const struct file_t *thefile, void *buf, ap_ssize_t 
*nbytes)
  +ap_status_t ap_read(struct file_t *thefile, void *buf, ap_ssize_t *nbytes)
   {
   ULONG rc;
   ULONG bytesread;
  
  
  
  1.2   +1 -0  apache-2.0/src/lib/apr/network_io/os2/poll.c
  
  Index: poll.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/os2/poll.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- poll.c1999/08/17 15:59:43 1.1
  +++ poll.c1999/08/28 08:05:45 1.2
  @@ -58,6 +58,7 @@
   #include apr_network_io.h
   #include apr_general.h
   #include apr_lib.h
  +#include sys/time.h
   
   /*  OS/2 doesn't have a poll function, implement using select */

  
  
  
  1.2   +1 -0  apache-2.0/src/lib/apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/os2/proc.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- proc.c1999/08/17 15:59:50 1.1
  +++ proc.c1999/08/28 08:05:45 1.2
  @@ -64,6 +64,7 @@
   #include string.h
   #include sys/wait.h
   #include unistd.h
  +#include process.h
   #define INCL_DOS
   #include os2.h
   
  
  
  


cvs commit: apache-1.3 STATUS

1999-08-20 Thread bjh
bjh 99/08/20 02:39:27

  Modified:.STATUS
  Log:
  OS/2 binaries uploaded.
  
  Revision  ChangesPath
  1.751 +2 -2  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.750
  retrieving revision 1.751
  diff -u -r1.750 -r1.751
  --- STATUS1999/08/19 09:07:29 1.750
  +++ STATUS1999/08/20 09:39:22 1.751
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/08/19 09:07:29 $]
  +  Last modified at [$Date: 1999/08/20 09:39:22 $]
   
   Release:
   
  @@ -487,7 +487,7 @@
mips-sgi-irix6.2  no  Lars Eilebrecht
mips-sgi-irix6.4  no  Lars Eilebrecht
mips-sni-svr4 no  Martin Kraemer
  - OS/2  no  Brian Havard
  + OS/2  yes Brian Havard
powerpc-apple-rhapsody5.3 no  Wilfredo Sanchez
rs6000-ibm-aix3.2.5   no  Sameer Parekh
rs6000-ibm-aix4.1 no  Lars Eilebrecht
  
  
  


cvs commit: apache-1.3 configure

1999-08-13 Thread bjh
bjh 99/08/13 08:05:49

  Modified:.configure
  Log:
  Translate module names to dll names for OS/2 so that they are no more
  than 8 characters long and have an extension of dll instead of so.
  
  Revision  ChangesPath
  1.101 +9 -0  apache-1.3/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-1.3/configure,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- configure 1999/08/13 06:36:16 1.100
  +++ configure 1999/08/13 15:05:48 1.101
  @@ -1423,6 +1423,15 @@
   done
   IFS=$OIFS
   
  +# translate module names to dll names for OS/2 so that they are no more
  +# than 8 characters long and have an extension of dll instead of so
  +case $PLATFORM in
  +*OS/2* ) 
  +echo $SEO s%/mod_\\(.\\{1,8\\}\\).*\\.so%/\\1\\.dll% $sedsubst
  +echo $SEO s%/\\(lib.*\\)\\.so$%/\\1.dll% $sedsubst
  +;;
  +esac
  +
   #   split sedsubst into chunks of 50 commands
   #   to workaround limits in braindead seds
   files=`$AWK $sedsubst '
  
  
  


cvs commit: apache-1.3/src ApacheCoreOS2.def

1999-08-10 Thread bjh
bjh 99/08/10 09:12:27

  Modified:src  ApacheCoreOS2.def
  Log:
  Add another missing export for OS/2 core dll.
  
  Revision  ChangesPath
  1.4   +1 -0  apache-1.3/src/ApacheCoreOS2.def
  
  Index: ApacheCoreOS2.def
  ===
  RCS file: /home/cvs/apache-1.3/src/ApacheCoreOS2.def,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ApacheCoreOS2.def 1999/08/09 01:54:32 1.3
  +++ ApacheCoreOS2.def 1999/08/10 16:12:20 1.4
  @@ -352,3 +352,4 @@
ap_puudecode  @346
ap_puuencode  @347
ap_sha1_base64  @348
  + ap_field_noparam  @349
  
  
  


cvs commit: apache-1.3/src/modules/standard Makefile.OS2

1999-08-10 Thread bjh
bjh 99/08/10 09:16:45

  Modified:src/modules/standard Makefile.OS2
  Log:
  Add rule to make OS/2 module for mod_vhost_alias
  
  Revision  ChangesPath
  1.3   +3 -1  apache-1.3/src/modules/standard/Makefile.OS2
  
  Index: Makefile.OS2
  ===
  RCS file: /home/cvs/apache-1.3/src/modules/standard/Makefile.OS2,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.OS2  1999/05/30 09:12:32 1.2
  +++ Makefile.OS2  1999/08/10 16:16:45 1.3
  @@ -1,7 +1,7 @@
   # Extra rules for making DLLs for OS/2
   
   define mkdll
  -$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(:%.c=%.o) $(LIBS_SHLIB) $(:%.o=%.def) 
 \
  +$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(:%.c=%.o) $(LIBS_SHLIB) $(LIBS1) 
$(:%.o=%.def)  \
   emxbind -b -q -s -h0 -d$(:%.o=%.def) $*  \
   rm $*
   endef
  @@ -111,3 +111,5 @@
   usertrac.dll: mod_usertrack.o mod_usertrack.def
$(mkdll)
   
  +vhost_al.dll: mod_vhost_alias.o mod_vhost_alias.def
  + $(mkdll)
  
  
  


cvs commit: apache-1.3/src ApacheCoreOS2.def

1999-08-09 Thread bjh
bjh 99/08/08 18:54:33

  Modified:src  ApacheCoreOS2.def
  Log:
  Add a few core dll exports.
  
  Revision  ChangesPath
  1.3   +3 -0  apache-1.3/src/ApacheCoreOS2.def
  
  Index: ApacheCoreOS2.def
  ===
  RCS file: /home/cvs/apache-1.3/src/ApacheCoreOS2.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ApacheCoreOS2.def 1999/05/25 15:23:55 1.2
  +++ ApacheCoreOS2.def 1999/08/09 01:54:32 1.3
  @@ -349,3 +349,6 @@
ap_dummy_mutex  @343
ap_signal  @344
ap_regerror  @345
  + ap_puudecode  @346
  + ap_puuencode  @347
  + ap_sha1_base64  @348
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/spmt_os2 spmt_os2.c

1999-08-04 Thread bjh
bjh 99/08/03 16:39:12

  Modified:mpm/src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Update OS/2 mpm with new hooks.
  
  Revision  ChangesPath
  1.7   +8 -12 apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- spmt_os2.c1999/07/27 12:05:05 1.6
  +++ spmt_os2.c1999/08/03 23:39:11 1.7
  @@ -1603,15 +1603,9 @@
   return 0;
   }
   
  -static void spmt_os2_hooks(void)
  -{
  -INIT_SIGLIST();
  -/* TODO: set one_process properly */ one_process = 0;
  -}
  -
   static void spmt_os2_pre_config(pool *pconf, pool *plog, pool *ptemp)
   {
  -one_process = getenv(ONE_PROCESS);
  +one_process = !!getenv(ONE_PROCESS);
   
   is_graceful = 0;
   ap_listen_pre_config();
  @@ -1626,6 +1620,13 @@
   ap_cpystrn(ap_coredump_dir, ap_server_root, sizeof(ap_coredump_dir));
   }
   
  +static void spmt_os2_hooks(void)
  +{
  +ap_hook_pre_config(spmt_os2_pre_config,NULL,NULL,HOOK_MIDDLE);
  +INIT_SIGLIST();
  +/* TODO: set one_process properly */ one_process = 0;
  +}
  +
   static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
   {
   const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  @@ -1792,9 +1793,6 @@
   
   module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
   STANDARD20_MODULE_STUFF,
  -spmt_os2_pre_config, /* pre_config */
  -NULL,/* post_config */
  -NULL,/* open_logs */
   NULL,/* child_init */
   NULL,/* create per-directory config structure */
   NULL,/* merge per-directory config structures */
  @@ -1804,7 +1802,5 @@
   NULL,/* handlers */
   NULL,/* check auth */
   NULL,/* check access */
  -NULL,/* type_checker */
  -NULL,/* pre-run fixups */
   spmt_os2_hooks,  /* register_hooks */
   };
  
  
  


cvs commit: apache-2.0/mpm/src/modules/mpm/spmt_os2 spmt_os2.c

1999-07-19 Thread bjh
bjh 99/07/19 00:32:23

  Modified:mpm/src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Releasing a semaphore you don't own isn't a fatal error.
  Also update with latest hook.
  
  Revision  ChangesPath
  1.5   +2 -2  apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- spmt_os2.c1999/07/16 05:30:35 1.4
  +++ spmt_os2.c1999/07/19 07:32:20 1.5
  @@ -72,6 +72,7 @@
   #include iol_socket.h
   
   #define INCL_DOS
  +#define INCL_DOSERRORS
   #include os2.h
   #include stdlib.h
   
  @@ -1759,7 +1760,7 @@
   {
   ULONG rc;
   rc = DosReleaseMutexSem(mtx-mutex_handle);
  -ap_assert(rc == 0);
  +ap_assert(rc == 0 || rc == ERROR_NOT_OWNER);
   }
   
   API_EXPORT(void) ap_thread_mutex_destroy(ap_thread_mutex *mtx)
  @@ -1806,6 +1807,5 @@
   NULL,/* check access */
   NULL,/* type_checker */
   NULL,/* pre-run fixups */
  -NULL,/* logger */
   NULL /* register hooks */
   };
  
  
  


cvs commit: apache-1.3/src/main util.c util_script.c

1999-07-19 Thread bjh
bjh 99/07/19 02:48:28

  Modified:src/include httpd.h
   src/main util.c util_script.c
  Log:
  OS/2: Fix spawning of CGI scripts to use appropriate type of command line
  escapes for OS/2's cmd.exe.
  
  Revision  ChangesPath
  1.285 +1 -0  apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===
  RCS file: /home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.284
  retrieving revision 1.285
  diff -u -r1.284 -r1.285
  --- httpd.h   1999/06/30 08:12:48 1.284
  +++ httpd.h   1999/07/19 09:48:24 1.285
  @@ -992,6 +992,7 @@
   API_EXPORT(char *) ap_uuencode(pool *p, char *string); 
   #ifdef OS2
   void os2pathname(char *path);
  +char *ap_double_quotes(pool *p, char *str);
   #endif
   
   API_EXPORT(int)ap_regexec(const regex_t *preg, const char *string,
  
  
  
  1.166 +26 -0 apache-1.3/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- util.c1999/06/17 22:58:16 1.165
  +++ util.c1999/07/19 09:48:26 1.166
  @@ -2140,6 +2140,32 @@
   
   strcpy(path, newpath);
   };
  +
  +/* quotes in the string are doubled up.
  + * Used to escape quotes in args passed to OS/2's cmd.exe
  + */
  +char *ap_double_quotes(pool *p, char *str)
  +{
  +int num_quotes = 0;
  +int len = 0;
  +char *quote_doubled_str, *dest;
  +
  +while (str[len]) {
  +num_quotes += str[len++] == '\';
  +}
  +
  +quote_doubled_str = ap_palloc(p, len + num_quotes + 1);
  +dest = quote_doubled_str;
  +
  +while (*str) {
  +if (*str == '\')
  +*(dest++) = '\';
  +*(dest++) = *(str++);
  +}
  +
  +*dest = 0;
  +return quote_doubled_str;
  +}
   #endif
   
   
  
  
  
  1.143 +112 -35   apache-1.3/src/main/util_script.c
  
  Index: util_script.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/util_script.c,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- util_script.c 1999/06/28 22:38:26 1.142
  +++ util_script.c 1999/07/19 09:48:27 1.143
  @@ -67,6 +67,11 @@
   #include util_script.h
   #include util_date.h   /* For parseHTTPdate() */
   
  +#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
  @@ -750,54 +755,126 @@
   #ifdef OS2
   {
/* Additions by Alec Kloss, to allow exec'ing of scripts under OS/2 */
  - int is_script;
  + int is_script = 0;
char interpreter[2048]; /* hope it's enough for the interpreter path */
  + char error_object[260];
FILE *program;
  -
  +char *cmdline = r-filename, *cmdline_pos;
  +int cmdlen;
  + char *args = , *args_end;
  + ULONG rc;
  +RESULTCODES rescodes;
  +int env_len, e;
  +char *env_block, *env_block_pos;
  +
  + if (r-args  r-args[0]  !strchr(r-args, '='))
  + args = r-args;
  + 
program = fopen(r-filename, rt);
  + 
if (!program) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, r, fopen(%s) failed,
 r-filename);
return (pid);
}
  + 
fgets(interpreter, sizeof(interpreter), program);
fclose(program);
  + 
if (!strncmp(interpreter, #!, 2)) {
is_script = 1;
  - interpreter[strlen(interpreter) - 1] = '\0';
  - }
  - else {
  - is_script = 0;
  - }
  -
  - if ((!r-args) || (!r-args[0]) || strchr(r-args, '=')) {
  - /* More additions by Alec Kloss for OS/2 */
  - if (is_script) {
  - /* here's the stuff to run the interpreter */
  - pid = spawnle(P_NOWAIT, interpreter + 2, interpreter + 2, 
r-filename, NULL, env);
  - }
  - else if (strstr(strupr(r-filename), .CMD)  0) {
  - /* Special case to allow use of REXX commands as scripts. */
  - os2pathname(r-filename);
  - pid = spawnle(P_NOWAIT, SHELL_PATH, SHELL_PATH, /C, 
r-filename, NULL, env);
  - }
  - else {
  - pid = spawnle(P_NOWAIT, r-filename, argv0, NULL, env);
  - }
  - }
  - else {
  - if (strstr(strupr(r-filename), .CMD)  0) {
  - /* Special case to allow use of REXX commands as scripts. */
  - os2pathname(r-filename);
  - pid = spawnve(P_NOWAIT, SHELL_PATH, create_argv_cmd(r-pool, 
argv0, r-args,
  -   r-filename), env);
  - }
  - else

cvs commit: apache-2.0/mpm/src/modules/mpm/spmt_os2 scoreboard.h spmt_os2.c

1999-07-13 Thread bjh
bjh 99/07/13 02:32:45

  Modified:mpm/src/modules/mpm/spmt_os2 scoreboard.h spmt_os2.c
  Log:
  More cleanup on OS/2 spmt mpm including shutdown/restart processing and
  moving variables to appropriate scope.
  
  Revision  ChangesPath
  1.2   +3 -1  apache-2.0/mpm/src/modules/mpm/spmt_os2/scoreboard.h
  
  Index: scoreboard.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/spmt_os2/scoreboard.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scoreboard.h  1999/07/11 14:49:06 1.1
  +++ scoreboard.h  1999/07/13 09:31:59 1.2
  @@ -153,6 +153,7 @@
   char request[64];/* We just want an idea... */
   server_rec *vhostrec;/* What virtual host is being accessed? */
   /* SEE ABOVE FOR SAFE USAGE! */
  +int thread_retval;
   } short_score;
   
   typedef struct {
  @@ -162,12 +163,13 @@
   
   /* stuff which the parent generally writes and the children rarely read */
   typedef struct {
  -pid_t pid;
  +pid_t tid;
   #ifdef OPTIMIZE_TIMEOUTS
   time_t last_rtime;   /* time(0) of the last change */
   vtime_t last_vtime;  /* the last vtime the parent has seen */
   #endif
   ap_generation_t generation;  /* generation of this child */
  +int deferred_die;
   } parent_score;
   
   typedef struct {
  
  
  
  1.3   +94 -125   apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- spmt_os2.c1999/07/12 08:35:39 1.2
  +++ spmt_os2.c1999/07/13 09:31:59 1.3
  @@ -55,28 +55,6 @@
*
*/
   
  -/*
  - * httpd.c: simple http daemon for answering WWW file requests
  - *
  - * 
  - * 03-21-93  Rob McCool wrote original code (up to NCSA HTTPd 1.3)
  - * 
  - * 03-06-95  blong
  - *  changed server number for child-alone processes to 0 and changed name
  - *   of processes
  - *
  - * 03-10-95  blong
  - *  Added numerous speed hacks proposed by Robert S. Thau ([EMAIL 
PROTECTED]) 
  - *  including set group before fork, and call gettime before to fork
  - *  to set up libraries.
  - *
  - * 04-14-95  rst / rh
  - *  Brandon's code snarfed from NCSA 1.4, but tinkered to work with the
  - *  Apache server, and also to have child processes do accept() directly.
  - *
  - * April-July '95 rst
  - *  Extensive rework for Apache.
  - */
   
   
   #define CORE_PRIVATE
  @@ -100,7 +78,6 @@
   
   static int ap_max_requests_per_child=0;
   static char *ap_pid_fname=NULL;
  -static char *ap_server_argv0=NULL;
   static int ap_daemons_to_start=0;
   static int ap_daemons_min_free=0;
   static int ap_daemons_max_free=0;
  @@ -120,7 +97,6 @@
   /* *Non*-shared http_main globals... */
   
   static server_rec *server_conf;
  -static int sd;
   static fd_set listenfds;
   static int listenmaxfd;
   
  @@ -151,17 +127,12 @@
   #endif
   
   static pool *pconf;  /* Pool for config stuff */
  -static int my_pid;   /* it seems silly to call getpid all the time */
   static scoreboard *ap_scoreboard_image = NULL;
  -static int volatile exit_after_unblock = 0;
   
   struct thread_globals {
  +int child_num;
   pool *pchild;/* Pool for httpd child stuff */
  -int srv;
  -int csd;
  -int requests_this_child;
  -fd_set main_fds;
  -ap_generation_t ap_my_generation;
  +int usr1_just_die;
   };
   
   static struct thread_globals **ppthread_globals = NULL;
  @@ -171,11 +142,14 @@
   
   void reinit_scoreboard(pool *p)
   {
  -ap_assert(!ap_scoreboard_image);
  -ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
   if (ap_scoreboard_image == NULL) {
  -fprintf(stderr, Ouch! Out of memory reiniting scoreboard!\n);
  +ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
  +
  +if (ap_scoreboard_image == NULL) {
  +fprintf(stderr, Ouch! Out of memory reiniting scoreboard!\n);
  +}
   }
  +
   memset(ap_scoreboard_image, 0, SCOREBOARD_SIZE);
   }
   
  @@ -191,8 +165,10 @@
   static void clean_child_exit(int code)
   {
   if (THREAD_GLOBAL(pchild)) {
  - ap_destroy_pool(THREAD_GLOBAL(pchild));
  +ap_destroy_pool(THREAD_GLOBAL(pchild));
   }
  +
  +ap_scoreboard_image-servers[THREAD_GLOBAL(child_num)].thread_retval = 
code;
   _endthread();
   }
   
  @@ -435,12 +411,13 @@
ss-vhostrec =  r-server;
}
   }
  +
   if (status == SERVER_STARTING  r == NULL) {
/* clean up the slot's vhostrec pointer (maybe re-used)
 * and mark the slot as belonging to a new generation.
 */
ss-vhostrec

cvs commit: apache-2.0/mpm/src/modules/mpm/spmt_os2 spmt_os2.c

1999-07-12 Thread bjh
bjh 99/07/12 01:35:39

  Modified:mpm/src/modules/mpm/spmt_os2 spmt_os2.c
  Log:
  Assorted fixes for the OS/2 mpm:
  - pchild really should be thread local
  - clean_child_exit() should call _endthread(), not exit()
  - Use DosSleep() for delay in wait_or_timeout() instead of ap_select
  - Rework logic of searching for listen rec in child main, was getting hung
in infinite loop when two sockets were being listened to. NOTE: I got it
from prefork.c originally so that's probably broken too.
  - Remove a debugging fprintf I accidentally left in...
  
  Revision  ChangesPath
  1.2   +25 -24apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- spmt_os2.c1999/07/11 14:49:06 1.1
  +++ spmt_os2.c1999/07/12 08:35:39 1.2
  @@ -151,12 +151,12 @@
   #endif
   
   static pool *pconf;  /* Pool for config stuff */
  -static pool *pchild; /* Pool for httpd child stuff */
   static int my_pid;   /* it seems silly to call getpid all the time */
   static scoreboard *ap_scoreboard_image = NULL;
   static int volatile exit_after_unblock = 0;
   
   struct thread_globals {
  +pool *pchild;/* Pool for httpd child stuff */
   int srv;
   int csd;
   int requests_this_child;
  @@ -188,13 +188,12 @@
   
   
   /* a clean exit from a child with proper cleanup */
  -static void clean_child_exit(int code) __attribute__ ((noreturn));
   static void clean_child_exit(int code)
   {
  -if (pchild) {
  - ap_destroy_pool(pchild);
  +if (THREAD_GLOBAL(pchild)) {
  + ap_destroy_pool(THREAD_GLOBAL(pchild));
   }
  -exit(code);
  +_endthread();
   }
   
   
  @@ -232,7 +231,7 @@
   static void accept_mutex_init(pool *p)
   {
   int rc = DosCreateMutexSem(NULL, lock_sem, DC_SEM_SHARED, FALSE);
  -fprintf(stderr, Created mutex\n);
  +
   if (rc != 0) {
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_EMERG, server_conf,
Parent cannot create lock semaphore, rc=%d, rc);
  @@ -532,7 +531,6 @@
   
   static int wait_or_timeout(ap_wait_t *status)
   {
  -struct timeval tv;
   int ret;
   
   ++wait_or_timeout_counter;
  @@ -549,9 +547,8 @@
   if (ret  0) {
return ret;
   }
  -tv.tv_sec = SCOREBOARD_MAINTENANCE_INTERVAL / 100;
  -tv.tv_usec = SCOREBOARD_MAINTENANCE_INTERVAL % 100;
  -ap_select(0, NULL, NULL, NULL, tv);
  +
  +DosSleep(SCOREBOARD_MAINTENANCE_INTERVAL / 1000);
   return -1;
   }
   
  @@ -905,15 +902,15 @@
   NET_SIZE_T clen;
   struct sockaddr sa_server;
   struct sockaddr sa_client;
  -ap_listen_rec *lr;
  -ap_listen_rec *last_lr;
  +ap_listen_rec *lr = NULL;
  +ap_listen_rec *first_lr = NULL;
   pool *ptrans;
   conn_rec *current_conn;
   int my_child_num = (int)child_num_arg;
   ap_iol *iol;
  +pool *pchild;
   
   my_pid = getpid();
  -last_lr = NULL;
   
   /* Disable the restart signal handlers and enable the just_die stuff.
* Note that since restart() just notes that a restart has been
  @@ -928,6 +925,7 @@
*/
   pchild = ap_make_sub_pool(pconf);
   *ppthread_globals = (struct thread_globals *)ap_palloc(pchild, 
sizeof(struct thread_globals));
  +THREAD_GLOBAL(pchild) = pchild;
   THREAD_GLOBAL(ap_my_generation) = 0;
   THREAD_GLOBAL(requests_this_child) = 0;
   THREAD_GLOBAL(csd) = -1;
  @@ -997,23 +995,27 @@
   
/* we remember the last_lr we searched last time around so that
   we don't end up starving any particular listening socket */
  - if (last_lr == NULL) {
  - lr = ap_listeners;
  + if (first_lr == NULL) {
  + first_lr = ap_listeners;
}
  - else {
  - lr = last_lr-next;
  - }
  - while (lr != last_lr) {
  + 
  +lr = first_lr;
  + 
  + do {
if (!lr) {
lr = ap_listeners;
  + }
  + 
  + if (FD_ISSET(lr-fd, THREAD_GLOBAL(main_fds))) {
  +first_lr = lr-next;
  + break;
}
  - if (FD_ISSET(lr-fd, THREAD_GLOBAL(main_fds))) break;
lr = lr-next;
  - }
  - if (lr == last_lr) {
  + } while (lr != first_lr);
  + 
  + if (lr == first_lr) {
continue;
}
  - last_lr = lr;
sd = lr-fd;
}
else {
  @@ -1181,7 +1183,6

cvs commit: apache-2.0/mpm/src/os/os2 iol_socket.c util_os2.c

1999-07-12 Thread bjh
bjh 99/07/12 01:47:48

  Modified:mpm/src/include ap_config.h
   mpm/src/os/os2 iol_socket.c util_os2.c
  Log:
  OS/2 EMX library's select() isn't thread safe so bypass it and go direct to 
the
  OS/2 API call. Unfortunately this only works on socket handles which will
  break probe_writable_fds() so I'll have to find a way to fix that too.
  
  Revision  ChangesPath
  1.2   +2 -0  apache-2.0/mpm/src/include/ap_config.h
  
  Index: ap_config.h
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/include/ap_config.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_config.h   1999/06/18 18:39:27 1.1
  +++ ap_config.h   1999/07/12 08:47:47 1.2
  @@ -1163,6 +1163,8 @@
   #elif defined(SELECT_NEEDS_CAST)
   #define ap_select(_a, _b, _c, _d, _e)   \
   select((_a), (int *)(_b), (int *)(_c), (int *)(_d), (_e))
  +#elif defined(OS2)
  +int ap_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set 
*exceptfds, struct timeval *timeout);
   #else
   #define ap_select(_a, _b, _c, _d, _e)   \
select(_a, _b, _c, _d, _e)
  
  
  
  1.2   +1 -1  apache-2.0/mpm/src/os/os2/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/os/os2/iol_socket.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- iol_socket.c  1999/07/11 14:49:07 1.1
  +++ iol_socket.c  1999/07/12 08:47:47 1.2
  @@ -140,7 +140,7 @@
tv.tv_sec = iol-timeout; \
tv.tv_usec = 0; \
do { \
  - rv = select(iol-fd + 1, selread, selwrite, NULL, iol-timeout  0 
? NULL : tv); \
  + rv = ap_select(iol-fd + 1, selread, selwrite, NULL, iol-timeout  
0 ? NULL : tv); \
} while (rv == -1  errno == EINTR); \
if (!FD_ISSET(iol-fd, fdset)) { \
errno = ETIMEDOUT; \
  
  
  
  1.3   +91 -0 apache-2.0/mpm/src/os/os2/util_os2.c
  
  Index: util_os2.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/os/os2/util_os2.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- util_os2.c1999/07/11 14:49:07 1.2
  +++ util_os2.c1999/07/12 08:47:48 1.3
  @@ -94,3 +94,94 @@
 
 return result;
   }
  +
  +
  +
  +
  +int (*os2_select)( int *, int, int, int, long ) = NULL;
  +static HMODULE hSO32DLL;
  +
  +int ap_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set 
*exceptfds, struct timeval *timeout)
  +{
  +int *fds, s, fd_count=0, rc;
  +int num_read, num_write, num_except;
  +long ms_timeout = -1;
  +
  +if (os2_select == NULL) {
  +DosEnterCritSec(); /* Stop two threads doing this at the same time */
  +
  +if (os2_select == NULL) {
  +hSO32DLL = ap_os_dso_load(SO32DLL);
  +
  +if (hSO32DLL) {
  +os2_select = ap_os_dso_sym(hSO32DLL, SELECT);
  +}
  +}
  +DosExitCritSec();
  +}
  +
  +ap_assert(os2_select != NULL);
  +fds = alloca(sizeof(int) * nfds);
  +
  +if (readfds) {
  +for (s=0; snfds; s++)
  +if (FD_ISSET(s, readfds))
  +fds[fd_count++] = _getsockhandle(s);
  +}
  +
  +num_read = fd_count;
  +
  +if (writefds) {
  +for (s=0; snfds; s++)
  +if (FD_ISSET(s, writefds))
  +fds[fd_count++] = _getsockhandle(s);
  +}
  +
  +num_write = fd_count - num_read;
  +
  +if (exceptfds) {
  +for (s=0; snfds; s++)
  +if (FD_ISSET(s, exceptfds))
  +fds[fd_count++] = _getsockhandle(s);
  +}
  +
  +num_except = fd_count - num_read - num_write;
  +
  +if (timeout)
  +ms_timeout = timeout-tv_usec / 1000 + timeout-tv_sec * 1000;
  +
  +rc = os2_select(fds, num_read, num_write, num_except, ms_timeout);
  +
  +if (rc  0) {
  +fd_count = 0;
  +
  +if (readfds) {
  +for (s=0; snfds; s++) {
  +if (FD_ISSET(s, readfds)) {
  +if (fds[fd_count++]  0)
  +FD_CLR(s, readfds);
  +}
  +}
  +}
  +
  +if (writefds) {
  +for (s=0; snfds; s++) {
  +if (FD_ISSET(s, writefds)) {
  +if (fds[fd_count++]  0)
  +FD_CLR(s, writefds);
  +}
  +}
  +}
  +
  +if (exceptfds) {
  +for (s=0; snfds; s++) {
  +if (FD_ISSET(s, exceptfds)) {
  +if (fds[fd_count++]  0)
  +FD_CLR(s, exceptfds);
  +}
  +}
  +}
  +}
  +
  +return rc;
  +}
  
  
  


cvs commit: apache-2.0/mpm/src/os/os2 iol_socket.c iol_socket.h Makefile.tmpl util_os2.c

1999-07-11 Thread bjh
bjh 99/07/11 07:49:07

  Modified:mpm/src  Configure
   mpm/src/main http_protocol.c
   mpm/src/os/os2 Makefile.tmpl util_os2.c
  Added:   mpm/src/modules/mpm/spmt_os2 .cvsignore Makefile.libdir
Makefile.tmpl scoreboard.h spmt_os2.c
   mpm/src/os/os2 iol_socket.c iol_socket.h
  Log:
  Make it all work on OS/2.
  Includes an OS/2 specific single process, multithreaded mpm.
  
  Revision  ChangesPath
  1.11  +6 -5  apache-2.0/mpm/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/Configure,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Configure 1999/07/10 18:20:16 1.10
  +++ Configure 1999/07/11 14:49:03 1.11
  @@ -341,11 +341,12 @@
OSDIR=os/os2
DEF_WANTHSREGEX=yes
OS='EMX OS/2'
  - CFLAGS=$CFLAGS -DOS2 -Zbsd-signals -Zbin-files -Zcrtdll -DTCPIPV4 -g
  - LDFLAGS=$LDFLAGS -Zexe -Zcrtdll
  + CFLAGS=$CFLAGS -DOS2 -DTCPIPV4 -g -Zmt
  + LDFLAGS=$LDFLAGS -Zexe -Zmtd -Zsysv-signals -Zbin-files
LIBS=$LIBS -lsocket -lufc -lbsd
DBM_LIB=-lgdbm
SHELL=sh
  + DEF_MPM_METHOD=spmt_os2
;;
   *-hi-hiux)
OS='HI-UX'
  @@ -1717,13 +1718,13 @@
   ## Now create modules.c
   ##
   
  -$CAT  $awkfile EOFM
  +$CAT  $awkfile 'EOFM'
   BEGIN {
modules[n++] = core
pmodules[pn++] = core
   } 
  -/^Module/ { modules[n++] = \$2 ; pmodules[pn++] = \$2 } 
  -/^%Module/ { pmodules[pn++] = \$2 } 
  +/^Module/ { modules[n++] = $2 ; pmodules[pn++] = $2 } 
  +/^%Module/ { pmodules[pn++] = $2 } 
   END {
print /*
print  * modules.c --- automatically generated by Apache
  
  
  
  1.10  +1 -1  apache-2.0/mpm/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/mpm/src/main/http_protocol.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- http_protocol.c   1999/07/07 15:31:58 1.9
  +++ http_protocol.c   1999/07/11 14:49:04 1.10
  @@ -1936,7 +1936,7 @@
   else
   o = IOBUFSIZE;
   
  -while ((n = read(fd, buf, o))  1  
  +while ((n = read(fd, buf, o))  0  
   (errno == EINTR || errno == EAGAIN)  
   !ap_is_aborted(r-connection))
   continue;
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/.cvsignore
  
  Index: .cvsignore
  ===
  Makefile
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/Makefile.libdir
  
  Index: Makefile.libdir
  ===
  This is a place-holder which indicates to Configure that it shouldn't
  provide the default targets when building the Makefile in this directory.
  Instead it'll just prepend all the important variable definitions, and
  copy the Makefile.tmpl onto the end.
  
  
  
  1.1  apache-2.0/mpm/src/modules/mpm/spmt_os2/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  
  LIB=libspmt_os2.$(LIBEXT)
  
  OBJS=\
   spmt_os2.o
  
  all: lib
  
  lib: $(LIB)
  
  libspmt_os2.a: $(OBJS)
rm -f $@
ar cr $@ $(OBJS)
$(RANLIB) $@
  
  spmt_os2.dll: $(OBJS) spmt_os2.def
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS) $(LIBS_SHLIB)
emxbind -b -q -s -h0 -dspmt_os2.def $*  \
rm $*
  
  .SUFFIXES: .o .dll
  
  .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $
  
  clean:
rm -f $(OBJS) $(OBJS_PIC) $(LIB)
  
  distclean: clean
-rm -f Makefile
  
  # We really don't expect end users to use this rule.  It works only with
  # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  # using it.
  depend:
cp Makefile.tmpl Makefile.tmpl.bak \
 sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl  Makefile.new \
 gcc -MM $(INCLUDES) $(CFLAGS) *.c | sed -e s%\(.\)%/\\1%g 
 Makefile.new \
 sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
   -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
 Makefile.tmpl \
 rm Makefile.new
  
  #Dependencies
  
  $(OBJS): Makefile
  
  # DO NOT REMOVE
  spmt_os2.o: spmt_os2.c $(INCDIR)/httpd.h \
   $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
   $(INCDIR)/ap_config_auto.h $(INCDIR)/os.h \
   $(INCDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
   $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
   $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
   $(INCDIR)/ap.h $(INCDIR)/apr.h \
   $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \
   $(INCDIR)/http_log.h $(INCDIR)/http_config.h \
   $(INCDIR)/ap_hooks.h $(INCDIR)/http_core.h \
   $(INCDIR

cvs commit: apache-2.0/mpm/src/modules/mpm/spmt_os2 - New directory

1999-07-09 Thread bjh
bjh 99/07/09 10:38:15

  apache-2.0/mpm/src/modules/mpm/spmt_os2 - New directory


cvs commit: apache-1.3/src/os/os2 util_os2.c

1999-07-08 Thread bjh
bjh 99/07/08 09:46:21

  Modified:src/os/os2 util_os2.c
  Log:
  Eliminate missing prototype warning for DosGetMessage()
  
  Revision  ChangesPath
  1.5   +1 -2  apache-1.3/src/os/os2/util_os2.c
  
  Index: util_os2.c
  ===
  RCS file: /home/cvs/apache-1.3/src/os/os2/util_os2.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- util_os2.c1999/05/07 05:49:46 1.4
  +++ util_os2.c1999/07/08 16:46:20 1.5
  @@ -1,6 +1,5 @@
  -#define INCL_DOSFILEMGR
  +#define INCL_DOS
   #define INCL_DOSERRORS
  -#define INCL_DOSEXCEPTIONS
   #include os2.h
   #include httpd.h
   #include http_log.h
  
  
  


cvs commit: apache-1.3/src/main http_core.c http_protocol.c

1999-07-03 Thread bjh
bjh 99/07/03 00:59:50

  Modified:src/main http_core.c http_protocol.c
  Log:
  These 'OS/2 HPFS filename case problem' fixes are now handled by
  ap_os_canonical_filename() in a better way.
  
  Revision  ChangesPath
  1.270 +0 -4  apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.269
  retrieving revision 1.270
  diff -u -r1.269 -r1.270
  --- http_core.c   1999/06/29 15:13:12 1.269
  +++ http_core.c   1999/07/03 07:59:48 1.270
  @@ -1409,10 +1409,6 @@
   *endp = '\0';
   
   cmd-path = ap_getword_conf(cmd-pool, arg);
  -#ifdef OS2
  -/* Fix OS/2 HPFS filename case problem. */
  -cmd-path = strlwr(cmd-path);
  -#endif
   cmd-override = OR_ALL|ACCESS_CONF;
   
   if (thiscmd-cmd_data) { /* DirectoryMatch */
  
  
  
  1.271 +0 -4  apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.270
  retrieving revision 1.271
  diff -u -r1.270 -r1.271
  --- http_protocol.c   1999/06/05 15:48:09 1.270
  +++ http_protocol.c   1999/07/03 07:59:49 1.271
  @@ -749,10 +749,6 @@
   
for (x = r-uri; (x = strchr(x, '\\')) != NULL; )
*x = '/';
  -#ifndef WIN32   /* for OS/2 only: */
  - /* Fix OS/2 HPFS filename case problem. */
  - ap_str_tolower(r-uri);
  -#endif
}
   #endif  /* OS2 || WIN32 */
   }
  
  
  


  1   2   >