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

2000-02-21 Thread rbb
rbb 00/02/21 10:29:31

  Modified:src/lib/apr/file_io/unix pipe.c
  Log:
  Stupid bug in pipe logic
  
  Revision  ChangesPath
  1.11  +1 -1  apache-2.0/src/lib/apr/file_io/unix/pipe.c
  
  Index: pipe.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/pipe.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- pipe.c2000/01/06 14:43:09 1.10
  +++ pipe.c2000/02/21 18:29:31 1.11
  @@ -122,7 +122,7 @@
   (*out)->cntxt = cont;
   (*out)->filedes = filedes[1];
   (*out)->buffered = 0;
  -(*in)->pipe = 1;
  +(*out)->pipe = 1;
   (*out)->fname = ap_pstrdup(cont, "PIPE");
   (*out)->timeout = -1;
   
  
  
  


cvs commit: apache-2.0/src acinclude.m4

2000-02-18 Thread rbb
rbb 00/02/17 18:12:16

  Modified:src  acinclude.m4
  Log:
  These changes didn't get into the patch for dynamic modules.  With this,
  dynamic modules should work.  :-)
  
  Revision  ChangesPath
  1.20  +2 -0  apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- acinclude.m4  2000/01/21 01:25:20 1.19
  +++ acinclude.m4  2000/02/18 02:12:16 1.20
  @@ -50,6 +50,7 @@
 APACHE_SUBST(CC)
 APACHE_SUBST(CFLAGS)
 APACHE_SUBST(CPPFLAGS)
  +  APACHE_SUBST(LTFLAGS)
 APACHE_SUBST(LDFLAGS)
 APACHE_SUBST(DEFS)
 APACHE_SUBST(LIBTOOL)
  @@ -250,6 +251,7 @@
   case "$enable_$1" in
   shared*)
 enable_$1=`echo $ac_n $enable_$1$ac_c|sed 's/shared,*//'`
  +  sharedobjs=yes
 shared=yes;;
   *)
 MODLIST="$MODLIST ifelse($4,,$1,$4)"
  
  
  


cvs commit: apache-2.0/src/os config.m4

2000-02-17 Thread rbb
rbb 00/02/17 14:32:30

  Modified:src/build rules.mk
   src/modules/standard config.m4
   src/os   config.m4
  Log:
  Enable dynamic module support on Linux.  This should work on any LIBTOOL
  based system, but YMMV.
  
  Revision  ChangesPath
  1.3   +2 -2  apache-2.0/src/build/rules.mk
  
  Index: rules.mk
  ===
  RCS file: /home/cvs/apache-2.0/src/build/rules.mk,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rules.mk  2000/02/16 00:55:51 1.2
  +++ rules.mk  2000/02/17 22:32:29 1.3
  @@ -21,7 +21,7 @@
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   #
   
##
  -# $Id: rules.mk,v 1.2 2000/02/16 00:55:51 rbb Exp $ 
  +# $Id: rules.mk,v 1.3 2000/02/17 22:32:29 rbb Exp $ 
   #
   
   include $(DEPTH)/config_vars.mk
  @@ -31,7 +31,7 @@
   COMPILE = $(CC) $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) 
$(EXTRA_CFLAGS)
   LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) 
$(EXTRA_INCLUDES) $(CPPFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
   CCLD = $(CC)
  -LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) 
-o $@
  +LINK = $(LIBTOOL) --mode=link $(CCLD) $(LTFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) 
$(LDFLAGS) -o $@
   mkinstalldirs = $(abs_srcdir)/helpers/mkdir.sh
   INSTALL = $(abs_srcdir)/helpers/install.sh -c
   INSTALL_DATA = $(INSTALL) -m 644
  
  
  
  1.12  +5 -0  apache-2.0/src/modules/standard/config.m4
  
  Index: config.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/config.m4,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- config.m4 2000/01/11 13:11:11 1.11
  +++ config.m4 2000/02/17 22:32:30 1.12
  @@ -51,5 +51,10 @@
   APACHE_CHECK_STANDARD_MODULE(echo, , yes)
   
   APACHE_MODPATH_FINISH
  +
  +if test "$sharedobjs" = "yes"; then
  +LIBS="$LIBS -ldl"
  +LTFLAGS="$LTFLAGS -export-dynamic"
  +fi
   
   APACHE_SUBST(STANDARD_LIBS)
  
  
  
  1.5   +2 -1  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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- config.m4 2000/01/26 07:51:43 1.4
  +++ config.m4 2000/02/17 22:32:30 1.5
  @@ -1,6 +1,7 @@
   AC_MSG_CHECKING(for target platform)
   
  -PLATFORM=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`
  +#PLATFORM=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`
  +PLATFORM=`$ac_config_guess`
   
   case "$PLATFORM" in
   *beos*)
  
  
  


cvs commit: apache-2.0/src/build rules.mk

2000-02-16 Thread rbb
rbb 00/02/15 16:55:53

  Modified:src/build rules.mk
  Log:
  Fix the make clean rules.  We must delete *.slo files or we are leaving stale
  libraries in the modules/standard directory when configured for dynamic
  modules.
  
  Revision  ChangesPath
  1.2   +2 -2  apache-2.0/src/build/rules.mk
  
  Index: rules.mk
  ===
  RCS file: /home/cvs/apache-2.0/src/build/rules.mk,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- rules.mk  2000/01/11 13:10:59 1.1
  +++ rules.mk  2000/02/16 00:55:51 1.2
  @@ -21,7 +21,7 @@
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   #
   
##
  -# $Id: rules.mk,v 1.1 2000/01/11 13:10:59 sascha Exp $ 
  +# $Id: rules.mk,v 1.2 2000/02/16 00:55:51 rbb Exp $ 
   #
   
   include $(DEPTH)/config_vars.mk
  @@ -117,7 +117,7 @@
   clean: clean-recursive clean-x
   
   clean-x:
  - rm -f $(targets) *.lo *.la *.o $(CLEANFILES)
  + rm -f $(targets) *.slo *.lo *.la *.o $(CLEANFILES)
rm -rf .libs
   
   distclean: distclean-recursive clean-x
  
  
  


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

2000-02-14 Thread rbb
rbb 00/02/14 14:20:36

  Modified:src/modules/mpm/mpmt_pthread mpmt_pthread.c scoreboard.c
  Log:
  Port the scoreboard from the mpmt_pthread MPM to use APR's shared memory.
  Tested on Linux, but it could use testing on other platforms.
  
  Revision  ChangesPath
  1.55  +1 -1  apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mpmt_pthread.c2000/01/19 01:15:42 1.54
  +++ mpmt_pthread.c2000/02/14 22:20:34 1.55
  @@ -84,7 +84,7 @@
   int ap_threads_per_child=0; /* Worker threads per child */
   int ap_max_requests_per_child=0;
   static char *ap_pid_fname=NULL;
  -static char *ap_scoreboard_fname=NULL;
  +API_VAR_EXPORT char *ap_scoreboard_fname=NULL;
   static int ap_daemons_to_start=0;
   static int min_spare_threads=0;
   static int max_spare_threads=0;
  
  
  
  1.15  +26 -426   apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c
  
  Index: scoreboard.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- scoreboard.c  2000/01/19 01:15:42 1.14
  +++ scoreboard.c  2000/02/14 22:20:34 1.15
  @@ -10,25 +10,9 @@
   #include "mpmt_pthread.h"
   #include "scoreboard.h"
   #include 
  -#ifdef USE_SHMGET_SCOREBOARD
  -#include 
  -#include 
  -#endif
  -
  -#ifdef USE_OS2_SCOREBOARD
  -/* Add MMAP style functionality to OS/2 */
  -#define INCL_DOSMEMMGR
  -#define INCL_DOSEXCEPTIONS
  -#define INCL_DOSSEMAPHORES
  -#include 
  -#include 
  -#include 
  -caddr_t create_shared_heap(const char *, size_t);
  -caddr_t get_shared_heap(const char *);
  -#endif
   
   scoreboard *ap_scoreboard_image = NULL;
  -
  +API_VAR_IMPORT char *ap_scoreboard_fname;
   /*
*
* Dealing with the scoreboard... a lot of these variables are global
  @@ -70,438 +54,58 @@
   
   
   #else /* MULTITHREAD */
  -#if defined(USE_OS2_SCOREBOARD)
  -
  -/* The next two routines are used to access shared memory under OS/2.  */
  -/* This requires EMX v09c to be installed.   */
  -
  -caddr_t create_shared_heap(const char *name, size_t size)
  -{
  -ULONG rc;
  -void *mem;
  -Heap_t h;
  -
  -rc = DosAllocSharedMem(&mem, name, size,
  -PAG_COMMIT | PAG_READ | PAG_WRITE);
  -if (rc != 0)
  - return NULL;
  -h = _ucreate(mem, size, !_BLOCK_CLEAN, _HEAP_REGULAR | _HEAP_SHARED,
  -  NULL, NULL);
  -if (h == NULL)
  - DosFreeMem(mem);
  -return (caddr_t) h;
  -}
  -
  -caddr_t get_shared_heap(const char *Name)
  -{
  -
  -PVOID BaseAddress;   /* Pointer to the base address of
  -the shared memory object */
  -ULONG AttributeFlags;/* Flags describing characteristics
  -of the shared memory object */
  -APIRET rc;   /* Return code */
  -
  -/* Request read and write access to */
  -/*   the shared memory object   */
  -AttributeFlags = PAG_WRITE | PAG_READ;
  -
  -rc = DosGetNamedSharedMem(&BaseAddress, Name, AttributeFlags);
  -
  -if (rc != 0) {
  - printf("DosGetNamedSharedMem error: return code = %ld", rc);
  - return 0;
  -}
  -
  -return BaseAddress;
  -}
  -
  -static void setup_shared_mem(ap_context_t *p)
  -{
  -caddr_t m;
  -
  -int rc;
  -
  -m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", 
SCOREBOARD_SIZE);
  -if (m == 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  - "%s: Could not create OS/2 Shared memory pool.",
  -  ap_server_argv0);
  - exit(APEXIT_INIT);
  -}
  -
  -rc = _uopen((Heap_t) m);
  -if (rc != 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  - "%s: Could not uopen() newly created OS/2 Shared memory pool.",
  - ap_server_argv0);
  -}
  -ap_scoreboard_image = (scoreboard *) m;
  -ap_scoreboard_image->global.running_generation = 0;
  -}
  -
  -API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
  -{
  -caddr_t m;
  -int rc;
  -
  -m = (caddr_t) get_shared_heap("\\SHAREMEM\\SCOREBOARD");
  -if (m == 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  - "%s: Could not find existing OS/2 Shared memory pool.",
  -  ap_server_argv0);
  - exit(APEXIT_I

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

2000-02-14 Thread rbb
rbb 00/02/14 05:43:39

  Modified:src/lib/apr/network_io/unix sendrecv.c
  Log:
  Fix some bugs in ap_send and ap_recv.  We used to return APR_SUCCESS even
  when it didn't succeed.  The other problem this is solving, is that we
  never set the length to -1 anymore.  The length is the number of bytes
  written or read, as such -1 makes no sense.  If there is an error, 0 bytes
  were written, so len should be 0.
  Submitted by: Manoj Kasichainula and Ryan Bloom
  
  Revision  ChangesPath
  1.10  +10 -2 apache-2.0/src/lib/apr/network_io/unix/sendrecv.c
  
  Index: sendrecv.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sendrecv.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- sendrecv.c2000/01/26 05:01:16 1.9
  +++ sendrecv.c2000/02/14 13:43:39 1.10
  @@ -108,17 +108,21 @@
   } while (srv == -1 && errno == EINTR);
   
   if (srv == 0) {
  -(*len) = -1;
  +(*len) = 0;
   return APR_TIMEUP;
   }
   else if (srv < 0) {
  -(*len) = -1;
  +(*len) = 0;
   return errno;
   }
   else {
   do {
   rv = write(sock->socketdes, buf, (*len));
   } while (rv == -1 && errno == EINTR);
  +if (rv == -1) {
  +(*len) = 0;
  +return errno;
  +}
   }
   }
   (*len) = rv;
  @@ -175,6 +179,10 @@
   do {
   rv = read(sock->socketdes, buf, (*len));
   } while (rv == -1 && errno == EINTR);
  +if (rv == -1) {
  +(*len) = 0;
  +return errno;
  +}
   }
   }
   else if (rv == -1 && errno == EAGAIN && sock->timeout == 0) {
  
  
  


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

2000-02-10 Thread rbb
rbb 00/02/10 15:46:36

  Modified:src/lib/apr/shmem/unix shmem.c
   src/modules/mpm/prefork prefork.c
  Log:
  Make the prefork MPM use APR shared memory for it's scoreboard.
  
  Revision  ChangesPath
  1.5   +1 -2  apache-2.0/src/lib/apr/shmem/unix/shmem.c
  
  Index: shmem.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/shmem.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- shmem.c   2000/01/27 23:49:31 1.4
  +++ shmem.c   2000/02/10 23:46:29 1.5
  @@ -89,7 +89,6 @@
   ap_status_t ap_shm_destroy(struct shmem_t *m)
   {
   mm_destroy(m->mm);
  -m->mm = NULL;
   return APR_SUCCESS;
   }
   
  @@ -108,7 +107,7 @@
   }
   
   /* ***APRDOC
  - * ap_status_t ap_shm_calloc(ap_shmem_t *, ap_size_t)
  + * void *ap_shm_calloc(ap_shmem_t *, ap_size_t)
*allocate memory from the block of shared memory and initialize it
*to zero.
* arg 1) The shared memory block to destroy. 
  
  
  
  1.67  +23 -444   apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- prefork.c 2000/01/28 18:02:08 1.66
  +++ prefork.c 2000/02/10 23:46:33 1.67
  @@ -106,10 +106,6 @@
   #include 
   #include 
   #include 
  -#ifdef USE_SHMGET_SCOREBOARD
  -#include 
  -#include 
  -#endif
   
   
   
  @@ -905,479 +901,63 @@
   return -1;
   }
   #endif
  -
  -/*
  - *
  - * Dealing with the scoreboard... a lot of these variables are global
  - * only to avoid getting clobbered by the longjmp() that happens when
  - * a hard timeout expires...
  - *
  - * We begin with routines which deal with the file itself... 
  - */
   
  -#if defined(USE_OS2_SCOREBOARD)
  +#if APR_HAS_SHARED_MEMORY
  +#include "apr_shmem.h"
   
  -/* The next two routines are used to access shared memory under OS/2.  */
  -/* This requires EMX v09c to be installed.   */
  +static ap_shmem_t *scoreboard_shm = NULL;
   
  -caddr_t create_shared_heap(const char *name, size_t size)
  +static ap_status_t cleanup_shared_mem(void *d)
   {
  -ULONG rc;
  -void *mem;
  -Heap_t h;
  -
  -rc = DosAllocSharedMem(&mem, name, size,
  -PAG_COMMIT | PAG_READ | PAG_WRITE);
  -if (rc != 0)
  - return NULL;
  -h = _ucreate(mem, size, !_BLOCK_CLEAN, _HEAP_REGULAR | _HEAP_SHARED,
  -  NULL, NULL);
  -if (h == NULL)
  - DosFreeMem(mem);
  -return (caddr_t) h;
  -}
  -
  -caddr_t get_shared_heap(const char *Name)
  -{
  -
  -PVOID BaseAddress;   /* Pointer to the base address of
  -the shared memory object */
  -ULONG AttributeFlags;/* Flags describing characteristics
  -of the shared memory object */
  -APIRET rc;   /* Return code */
  -
  -/* Request read and write access to */
  -/*   the shared memory object   */
  -AttributeFlags = PAG_WRITE | PAG_READ;
  -
  -rc = DosGetNamedSharedMem(&BaseAddress, Name, AttributeFlags);
  -
  -if (rc != 0) {
  - printf("DosGetNamedSharedMem error: return code = %ld", rc);
  - return 0;
  -}
  -
  -return BaseAddress;
  +mm_free(scoreboard_shm, ap_scoreboard_image);
  +ap_scoreboard_image = NULL;
  +ap_shm_destroy(scoreboard_shm);
   }
   
   static void setup_shared_mem(ap_context_t *p)
   {
  -caddr_t m;
  -
  -int rc;
  -
  -m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", 
SCOREBOARD_SIZE);
  -if (m == 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  - "%s: Could not create OS/2 Shared memory pool.",
  -  ap_server_argv0);
  - exit(APEXIT_INIT);
  -}
  -
  -rc = _uopen((Heap_t) m);
  -if (rc != 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  - "%s: Could not uopen() newly created OS/2 Shared memory pool.",
  - ap_server_argv0);
  -}
  -ap_scoreboard_image = (scoreboard *) m;
  -ap_scoreboard_image->global.running_generation = 0;
  -}
  -
  -static void reopen_scoreboard(ap_context_t *p)
  -{
  -caddr_t m;
  -int rc;
  -
  -m = (caddr_t) get_shared_heap("\\SHAREMEM\\SCOREBOARD");
  -if (m == 0) {
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  - "%s: Could not find existing OS/2 Shared memory pool.",
  - 

cvs commit: apache-2.0/src/include ap_ac_config.h

2000-02-10 Thread rbb
rbb 00/02/10 15:16:14

  Modified:src/include ap_ac_config.h
  Log:
  We need to make sure we are using signals that interrupt system calls.  This
  was keeping graceful restart from working in the prefork MPM.  Currently,
  this is a real hack, but I am hoping to get a better fix in place tomorrow.
  
  Revision  ChangesPath
  1.8   +2 -0  apache-2.0/src/include/ap_ac_config.h
  
  Index: ap_ac_config.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/ap_ac_config.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ap_ac_config.h2000/01/21 01:25:24 1.7
  +++ ap_ac_config.h2000/02/10 23:16:12 1.8
  @@ -231,4 +231,6 @@
   #undef USE_MMAP_FILES
   #endif
   
  +#define signal(s, f)ap_signal(s, f)
  +
   #endif /* AP_AC_CONFIG_H */
  
  
  


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

2000-02-10 Thread rbb
rbb 00/02/10 12:25:15

  Modified:src/lib/apr/shmem/unix Makefile.in
  Log:
  make clean should also clean MM.
  
  Revision  ChangesPath
  1.4   +1 -0  apache-2.0/src/lib/apr/shmem/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   2000/01/27 23:49:31 1.3
  +++ Makefile.in   2000/02/10 20:25:14 1.4
  @@ -25,6 +25,7 @@
   
   clean:
$(RM) -f *.o *.a *.so
  + cd mm; make clean; cd ..
   
   distclean: clean
-$(RM) -f Makefile
  
  
  


cvs commit: apache-2.0/src apaci.in configure.in

2000-02-09 Thread rbb
rbb 00/02/08 17:33:28

  Modified:src  configure.in
  Added:   src  apaci.in
  Log:
  Fix prefix handling.  Before this patch, when using --prefix on the
  configure line, the binary ignored it when setting HTTPD_ROOT.  This
  patch fixes that problem.
  
  Revision  ChangesPath
  1.22  +7 -2  apache-2.0/src/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- configure.in  2000/01/17 20:34:41 1.21
  +++ configure.in  2000/02/09 01:33:24 1.22
  @@ -147,12 +147,17 @@
 $SHELL $srcdir/ltconfig --output=shlibtool --disable-static 
--srcdir=$srcdir --cache-file=./config.cache $srcdir/ltmain.sh
   fi
   
  -APACHE_FAST_OUTPUT(Makefile ap/Makefile lib/Makefile main/Makefile
  +CFLAGS="$CFLAGS \`\$(abs_srcdir)/apaci\`"
  +
  +APACHE_FAST_OUTPUT(apaci Makefile ap/Makefile lib/Makefile main/Makefile
  modules/Makefile os/Makefile)
   APACHE_FAST_GENERATE

   dnl ## Build modules.c
   rm -f $srcdir/modules.c
   echo $MODLIST | $AWK -f $srcdir/helpers/build-modules-c.awk > 
$srcdir/modules.c
  +
  +AC_SUBST(prefix)
   
  -AC_OUTPUT($APACHE_OUTPUT_FILES)
  +AC_OUTPUT($APACHE_OUTPUT_FILES apaci)
  +chmod 744 apaci
  
  
  
  1.1  apache-2.0/src/apaci.in
  
  Index: apaci.in
  ===
  #!/bin/sh
  ## USED AS A COMMAND LINE EXPANDER TO OVERRIDE PATHS
  ## WITHOUT DISTURBING THE KNOWN MAKE BUILD PROCESS DISPLAY
  echo '-DHTTPD_ROOT="@prefix@"'
  echo '-DSUEXEC_BIN="@prefix@/bin/suexec"'
  echo '-DSHARED_CORE_DIR="@prefix@/libexec"'
  echo '-DDEFAULT_PIDLOG="logs/httpd.pid"'
  echo '-DDEFAULT_SCOREBOARD="logs/httpd.scoreboard"'
  echo '-DDEFAULT_LOCKFILE="logs/httpd.lock"'
  echo '-DDEFAULT_XFERLOG="logs/access_log"'
  echo '-DDEFAULT_ERRORLOG="logs/error_log"'
  echo '-DTYPES_CONFIG_FILE="conf/mime.types"'
  echo '-DSERVER_CONFIG_FILE="conf/httpd.conf"'
  echo '-DACCESS_CONFIG_FILE="conf/access.conf"'
  echo '-DRESOURCE_CONFIG_FILE="conf/srm.conf"'
  
  
  


Re: cvs commit: apache-2.0 STATUS

2000-02-08 Thread rbb

>   +* Platforms that do not support fork (primarily Win32 and AS/400)
>   +  Consider introducing HAVE_FORK feature macro. Architect start-up code
>   +  that avoids initializing all the modules in the parent process on
>   +  platforms that do not support fork.

APR already has an APR_HAS_FORK feature macro.  It is just a question now
of using that macro in Apache.

Ryan

Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

2000-02-07 Thread rbb
rbb 00/02/07 13:19:51

  Modified:src/lib/apr/misc/unix start.c
  Log:
  Fix the signalling logic for Apache 2.0.  The removed code used to block
  all signals sent to an APR process.  This logic is left over from APR the
  APR signals code which was removed a while ago.  If APR doesn't have
  signalling code, then we shouldn't be blocking signals.
  
  Revision  ChangesPath
  1.18  +0 -9  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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- start.c   2000/01/25 23:04:39 1.17
  +++ start.c   2000/02/07 21:19:50 1.18
  @@ -187,16 +187,7 @@
*/
   ap_status_t ap_initialize(void)
   {
  -sigset_t sigset;
  -
   setup_lock();
  -
  -sigfillset(&sigset);
  -#if defined(HAVE_PTHREAD_SIGMASK) && defined(USE_THREADS)
  -pthread_sigmask(SIG_BLOCK, &sigset, NULL);
  -#else
  -sigprocmask(SIG_BLOCK, &sigset, NULL);
  -#endif
   return APR_SUCCESS;
   }
   
  
  
  


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

2000-02-04 Thread rbb
rbb 00/02/04 13:14:10

  Modified:src/lib/apr configure.in
  Log:
  Re-structure APR's configure.in file.  This should make adding functions to
  APR easier.  Basically, I just moved things around a bit to make them easier
  to find, and I added some output.
  
  Revision  ChangesPath
  1.52  +286 -272  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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- configure.in  2000/02/04 01:06:46 1.51
  +++ configure.in  2000/02/04 21:14:09 1.52
  @@ -1,28 +1,30 @@
  +dnl ##
  +dnl ## Autoconf configuration file for APR
  +dnl ##
   
  +echo "Configuring APR library"
  +echo "Platform: ${OS}"
  +echo "(Default will be ${DEFAULT_OSDIR})"
  +
   AC_CONFIG_AUX_DIR(./helpers)
   OS=`./config.guess`
  -OS=`./config.sub $OS` 
  +OS=`./config.sub $OS`
  +
  +dnl # Some initial steps for configuration.  We setup the default directory
  +dnl # and which files are to be configured.
   
   # These added to allow default directories to be used...
   DEFAULT_OSDIR="unix"
  -MODULES="file_io network_io threadproc misc locks time mmap shmem" 
  -
  -echo "Configuring APR library"
  -echo "Platform: ${OS}"
  -echo "(Default will be ${DEFAULT_OSDIR})"
  +MODULES="file_io network_io threadproc misc locks time mmap shmem"
   
   dnl Process this file with autoconf to produce a configure script.
   AC_INIT(configure.in)
  -
   AC_CONFIG_HEADER(include/apr_config.h)
   
  -AC_ARG_WITH(optim,[  --with-optim="FLAGS"  compiler optimisation flags],
  - [OPTIM="$withval"])
  -
   # Most platforms use a prefix of 'lib' on their library files.
   LIBPREFIX='lib'
   
  -dnl Checks for programs.
  +dnl # Checks for programs.
   AC_PROG_CC
   AC_PROG_RANLIB
   AC_PROG_MAKE_SET
  @@ -32,53 +34,21 @@
   # This macro needs to be here in case we are on an AIX box.
   AC_AIX
   
  -REENTRANCY_FLAGS
  -PTHREADS_CHECK
  -
  -AC_CACHE_CHECK([for threads], ac_cv_enable_threads, 
  -  [ AC_ARG_ENABLE(threads,
  -[  --enable-threads  Enable threading support in APR.], 
  -[ ] , 
  -[ AC_CHECK_HEADERS(pthread.h,  
  -   [ ac_cv_enable_threads="pthread" ] , 
  -   [ ac_cv_enable_threads="no" ] ) ] ) ] ) 
  -
  -if test "$ac_cv_enable_threads" = "no"; then 
  -threads="0"
  -pthreadh="0"
  -else
  -if test "$ac_cv_enable_threads" = "pthread"; then
  -# We have specified pthreads for our threading library, just make sure
  -# that we have everything we need
  -  AC_CHECK_HEADERS(pthread.h, [ 
  -  threads="1"
  -  pthreadh="1"
  -  AC_DEFINE(USE_THREADS) ], [
  -  threads="0"
  -  pthreadh="0" ] )
  -else
  -# We basically specified that we wanted threads, but not how to implement
  -# them.  In this case, just look for pthreads.  In the future, we can check
  -# for other threading libraries as well.
  -  AC_CHECK_HEADERS(pthread.h, [ 
  -  threads="1"
  -  pthreadh="1"
  -  AC_DEFINE(USE_THREADS) ], [
  -  threads="0"
  -  pthreadh="0" ] )
  -fi
  +# Use /bin/sh if it exists, otherwise go looking for sh in the path
  +if test ".$SH" = . -a -f /bin/sh; then
  +  SH="/bin/sh"
   fi
  +AC_CHECK_PROG(SH, sh, sh)
   
  -pthreadser="0"
  -if test "$threads" = "1"; then
  -AC_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
  -AC_CHECK_FUNC(pthread_mutex_init, [
  -AC_DEFINE(USE_PTHREAD_SERIALIZE)
  -pthreadser="1" ])
  -fi
  +dnl #- Checks for compiler flags
  +echo -e "\nCheck for compiler flags."
  +AC_ARG_WITH(optim,[  --with-optim="FLAGS"  compiler optimisation flags],
  +[OPTIM="$withval"])
   
  -AC_ARG_WITH(debug,[  --with-debug  Turn on debugging and compile 
time warnings],
  - [if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -g -Wall"; else 
CFLAGS="$CFLAGS -g"; fi])
  +AC_ARG_WITH(debug,[  --with-debug  Turn on debugging and compile 
tim
  +e warnings],
  +[if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -g -Wall"; else 
CFLAGS="$C
  +FLAGS -g"; fi])
   
   dnl # this is the place to put specific options for platform/compiler
   dnl # combinations
  @@ -91,79 +61,6 @@
   ;;
   esac
   
  -dnl Checks for standard typedefs
  -AC_TYPE_OFF_T
  -AC_TYPE_PID_T
  -AC_TYPE_SIZE_T
  -AC_T

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

2000-02-04 Thread rbb
rbb 00/02/03 17:07:04

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in
  Log:
  Cleanup the code to determine what kind of shared memory we are using.  This
  is still not great, but at least we are trying now.
  
  Revision  ChangesPath
  1.51  +34 -3 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.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- configure.in  2000/01/28 17:42:45 1.50
  +++ configure.in  2000/02/04 01:06:46 1.51
  @@ -359,9 +359,40 @@
   
   # Shared memory support.  Until I figure out how to do this well, we are hard
   # coding this.  I am hoping to do this more generally ASAP.
  -anonymous_shm="1"
  -filebased_shm="0"
  -keybased_shm="0"
  +  AC_ARG_ENABLE(shmem,
  +[ --enable-shmem  Enable shared memory support in APR. ],
  +[ ],
  +ac_cv_enable_shmem="mm" ) 
  +
  +if test "$ac_cv_enable_shmem" = "no"; then
  +  sharedmem="0"
  +  anonymous_shm="0"
  +  filebased_shm="0"
  +  keybased_shm="0"
  +else 
  +  if test "$ac_cv_enable_shmem" = "mm"; then
  +sharedmem="1"
  +anonymous_shm="1"
  +filebased_shm="0"
  +keybased_shm="0"
  +  else 
  +if test "$ac_cv_enable_shmem" = "file"; then
  +  sharedmem="1"
  +  anonymous_shm="0"
  +  filebased_shm="1"
  +  keybased_shm="0"
  +else 
  +  if test "$ac_cv_enable_shmem" = "key"; then
  +sharedmem="1"
  +anonymous_shm="0"
  +filebased_shm="0"
  +keybased_shm="1"
  +  fi  
  +fi
  +  fi
  +fi
  +
  +AC_SUBST(sharedmem)
   AC_SUBST(anonymous_shm)
   AC_SUBST(filebased_shm)
   AC_SUBST(keybased_shm)
  
  
  
  1.14  +5 -4  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr.h.in  2000/01/28 17:42:51 1.13
  +++ apr.h.in  2000/02/04 01:06:57 1.14
  @@ -56,10 +56,11 @@
   #endif
   
   /*  APR Feature Macros */
  -#define APR_HAS_THREADS  @threads@
  -#define APR_HAS_SENDFILE @sendfile@
  -#define APR_HAS_MMAP @mmap@
  -#define APR_HAS_FORK @fork@
  +#define APR_HAS_SHARED_MEMORY @sharedmem@
  +#define APR_HAS_THREADS   @threads@
  +#define APR_HAS_SENDFILE  @sendfile@
  +#define APR_HAS_MMAP  @mmap@
  +#define APR_HAS_FORK  @fork@
   
   /* Typedefs that APR needs. */
   
  
  
  


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

2000-02-03 Thread rbb
rbb 00/02/03 11:38:12

  Modified:src/main http_main.c
  Log:
  APR requires that ap_initialize is called as one of the first functions.
  It sets up the rest of the APR types.  This was causing lockups whenever
  we tried to us an APR lock.
  
  Revision  ChangesPath
  1.28  +2 -0  apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- http_main.c   2000/01/28 18:01:14 1.27
  +++ http_main.c   2000/02/03 19:38:08 1.28
  @@ -308,6 +308,8 @@
   
   g_pHookPool=pglobal;
   
  +ap_initialize();
  +
   ap_setup_prelinked_modules(process);
   
   ap_create_context(&pcommands, pglobal);
  
  
  


Re: cvs commit: apache-2.0/src/os/unix iol_socket.c unixd.c

2000-01-29 Thread rbb

> >   Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
> >   defined correctly in all C files.
> 
> If its a requirement, shouldn't httpd.h include ap_config.h, rather then
> requiring module authors to magically know they should do this?

As has been stated before, httpd.h can't include ap_config.h.  If httpd.h
includes ap_config.h, then all of the autoconf generated macros become
public, and that causes macro redefinition errors when trying to compile
big modules like PHP.  What we really need is a public header file that
has namespace protected macros, but I don't have time to do that right
now, and this fixes the problem that Bill was having.

I am in SF for the next week, and won't be doing much work, wh I get back,
I hope to have the time to look into the configure process again.

Ryan

Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

2000-01-28 Thread rbb
rbb 00/01/28 10:02:32

  Modified:src/ap   ap_hooks.c ap_sha1.c
   src/helpers build-modules-c.awk
   src/main buff.c gen_test_char.c http_config.c
http_connection.c http_core.c http_main.c
http_protocol.c http_request.c http_vhost.c
iol_file.c listen.c rfc1413.c util.c util_md5.c
util_script.c util_uri.c
   src/modules/mpm/prefork prefork.c
   src/modules/standard mod_actions.c mod_alias.c mod_asis.c
mod_auth.c mod_dir.c mod_echo.c mod_setenvif.c
   src/os/unix iol_socket.c unixd.c
  Log:
  Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
  defined correctly in all C files.
  
  Revision  ChangesPath
  1.10  +1 -0  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ap_hooks.c2000/01/19 01:14:22 1.9
  +++ ap_hooks.c2000/01/28 18:00:33 1.10
  @@ -1,3 +1,4 @@
  +#include "ap_config.h"
   #include "httpd.h"
   #include "ap_hooks.h"
   #include 
  
  
  
  1.4   +1 -1  apache-2.0/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===
  RCS file: /home/cvs/apache-2.0/src/ap/ap_sha1.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_sha1.c 2000/01/19 01:14:22 1.3
  +++ ap_sha1.c 2000/01/28 18:00:35 1.4
  @@ -84,13 +84,13 @@
   
   #include 
   
  +#include "ap_config.h"
   #include "httpd.h"
   #include "ap_sha1.h"
   #include "ap.h"
   #ifdef CHARSET_EBCDIC
   #include "ebcdic.h"
   #endif /*CHARSET_EBCDIC*/
  -#include "ap_config.h"
   
   /* a bit faster & bigger, if defined */
   #define UNROLL_LOOPS
  
  
  
  1.3   +1 -0  apache-2.0/src/helpers/build-modules-c.awk
  
  Index: build-modules-c.awk
  ===
  RCS file: /home/cvs/apache-2.0/src/helpers/build-modules-c.awk,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build-modules-c.awk   1999/12/19 16:36:49 1.2
  +++ build-modules-c.awk   2000/01/28 18:00:46 1.3
  @@ -17,6 +17,7 @@
   print " * configuration script.  DO NOT HAND EDIT!"
   print " */"
   print ""
  +print "#include \"ap_config.h\""
   print "#include \"httpd.h\""
   print "#include \"http_config.h\""
   print ""
  
  
  
  1.29  +1 -1  apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- buff.c2000/01/23 16:37:39 1.28
  +++ buff.c2000/01/28 18:00:58 1.29
  @@ -55,10 +55,10 @@
*
*/
   
  +#include "ap_config.h"
   #include "httpd.h"
   #include "http_main.h"
   #include "http_log.h"
  -#include "ap_config.h"
   
   #include 
   #include 
  
  
  
  1.2   +1 -0  apache-2.0/src/main/gen_test_char.c
  
  Index: gen_test_char.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/gen_test_char.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- gen_test_char.c   1999/08/24 06:45:18 1.1
  +++ gen_test_char.c   2000/01/28 18:01:04 1.2
  @@ -1,4 +1,5 @@
   /* we need some of the portability definitions... for strchr */
  +#include "ap_config.h"
   #include "httpd.h"
   
   /* A bunch of functions in util.c scan strings looking for certain 
characters.
  
  
  
  1.24  +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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- http_config.c 2000/01/19 01:15:02 1.23
  +++ http_config.c 2000/01/28 18:01:06 1.24
  @@ -72,6 +72,7 @@
   
   #define CORE_PRIVATE
   
  +#include "ap_config.h"
   #include "apr_portable.h"
   #include "apr_file_io.h"
   #include "httpd.h"
  @@ -81,7 +82,6 @@
   #include "http_request.h"/* for default_handler (see invoke_handler) */
   #include "http_main.h"
   #include "http_vhost.h"
  -#include "ap_config.h"
   
   HOOK_STRUCT(
HOOK_LINK(header_parse

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

2000-01-28 Thread rbb
rbb 00/01/28 09:42:53

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in apr_general.h
  Log:
  Fix the APR build process on UNIX.  We need to include signal.h if we have
  it.
  
  Revision  ChangesPath
  1.50  +2 -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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- configure.in  2000/01/27 23:49:23 1.49
  +++ configure.in  2000/01/28 17:42:45 1.50
  @@ -223,7 +223,7 @@
   AC_CHECK_HEADERS(pwd.h)
   AC_CHECK_HEADERS(sys/sem.h)
   AC_CHECK_HEADERS(setjmp.h)
  -AC_CHECK_HEADERS(signal.h)
  +AC_CHECK_HEADERS(signal.h, signalh="1", signalh="0")
   AC_CHECK_HEADERS(stdarg.h, stdargh="1", stdargh="0")
   AC_CHECK_HEADERS(stddef.h)
   AC_CHECK_HEADERS(stdio.h, stdioh="1", stdioh"0")
  @@ -384,6 +384,7 @@
   AC_SUBST(stdioh)
   AC_SUBST(sys_typesh)
   AC_SUBST(sys_uioh)
  +AC_SUBST(signalh)
   AC_SUBST(threads)
   AC_SUBST(pthreadh)
   AC_SUBST(short_value)
  
  
  
  1.13  +1 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr.h.in  2000/01/27 23:49:26 1.12
  +++ apr.h.in  2000/01/28 17:42:51 1.13
  @@ -33,6 +33,7 @@
   #define APR_HAVE_STDIO_H@stdioh@
   #define APR_HAVE_SYS_TYPES_H@sys_typesh@
   #define APR_HAVE_SYS_UIO_H  @sys_uioh@
  +#define APR_HAVE_SIGNAL_H   @signalh@
   
   #define APR_USE_FLOCK_SERIALIZE   @flockser@ 
   #define APR_USE_SYSVSEM_SERIALIZE @sysvser@
  
  
  
  1.16  +6 -3  apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- apr_general.h 2000/01/19 01:14:56 1.15
  +++ apr_general.h 2000/01/28 17:42:52 1.16
  @@ -53,6 +53,9 @@
*
*/
   
  +#ifndef APR_GENERAL_H
  +#define APR_GENERAL_H
  +
   #ifdef WIN32
   #include "apr_win.h"
   #else
  @@ -65,10 +68,10 @@
   #if APR_HAVE_SYS_TYPES_H
   #include 
   #endif
  +#if APR_HAVE_SIGNAL_H
  +#include 
  +#endif
   #include "apr_errno.h"
  -
  -#ifndef APR_GENERAL_H
  -#define APR_GENERAL_H
   
   #ifdef __cplusplus
   extern "C" {
  
  
  


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

2000-01-28 Thread rbb
>   Fix some return codes and leave the new process handle open. In general,
>   the parent process should explicitly close the handle if it does not need
>   it. And Apache requires the handle for free_proc_chain clean-up processing.
>   
>   Revision  ChangesPath
>if (CreateProcess(NULL, cmdline, NULL, NULL, TRUE, 0, pEnvBlock, 
> attr->currdir, 
>  &attr->si, &(*new)->pi)) {
>   -if (attr->detached) {
>   -CloseHandle((*new)->pi.hProcess);
>   -}
>if (attr->child_in) {
>ap_close(attr->child_in);
>}

If we want to keep the process handle open, shouldn't we just be not
opening the file detached?  I don't have the answer with me, but ISTR a
peice of code from Apache 1.3 (or somewhere) that closed the handle when
detaching the process.

Ryan



Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

2000-01-27 Thread rbb
rbb 00/01/27 15:49:40

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in apr_errno.h apr_shmem.h
   src/lib/apr/shmem/unix Makefile.in shmem.c
   src/lib/apr/test Makefile.in
  Added:   src/lib/apr/test testshmem.c
  Removed: src/lib/apr/shmem shmem.c
  Log:
  A first pass at shared memory for Unix.  This is still pretty ugly, but I
  will clean it up over the next few days.  At least this gives everybody
  some idea of where I want the shared memory stuff to go in APR.
  
  Revision  ChangesPath
  1.49  +15 -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.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- configure.in  2000/01/26 18:06:30 1.48
  +++ configure.in  2000/01/27 23:49:23 1.49
  @@ -5,7 +5,7 @@
   
   # These added to allow default directories to be used...
   DEFAULT_OSDIR="unix"
  -MODULES="file_io network_io threadproc misc locks time mmap" 
  +MODULES="file_io network_io threadproc misc locks time mmap shmem" 
   
   echo "Configuring APR library"
   echo "Platform: ${OS}"
  @@ -357,6 +357,15 @@
   procpthreadser="0"
   fi
   
  +# Shared memory support.  Until I figure out how to do this well, we are hard
  +# coding this.  I am hoping to do this more generally ASAP.
  +anonymous_shm="1"
  +filebased_shm="0"
  +keybased_shm="0"
  +AC_SUBST(anonymous_shm)
  +AC_SUBST(filebased_shm)
  +AC_SUBST(keybased_shm)
  +
   dnl Start building stuff from our information
   AC_SUBST(LDLIBS)
   AC_SUBST(OPTIM)
  @@ -399,6 +408,11 @@
   if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
   AC_DEFINE(HAVE_GMTOFF)
   fi
  +
  +# run the MM config script regardless of whether we are going to use 
  +# it or not.  When we have a much better idea of who is using MM, we can
  +# run this on a more conditional basis.
  +AC_CONFIG_SUBDIRS(shmem/unix/mm)
   
   MAKEFILE1="Makefile lib/Makefile "
   SUBDIRS="lib "
  
  
  
  1.12  +5 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr.h.in  2000/01/26 18:06:31 1.11
  +++ apr.h.in  2000/01/27 23:49:26 1.12
  @@ -40,6 +40,11 @@
   #define APR_USE_PROC_PTHREAD_SERIALIZE@procpthreadser@ 
   #define APR_USE_PTHREAD_SERIALIZE @pthreadser@ 
   
  +#define APR_USES_ANONYMOUS_SHM@anonymous_shm@
  +#define APR_USES_FILEBASED_SHM@filebased_shm@
  +#define APR_USES_KEYBASED_SHM @keybased_shm@
  +
  +
   #define APR_HAVE_IN_ADDR@have_in_addr@
   #define APR_HAVE_INET_ADDR  @inet_addr@
   #define APR_HAVE_INET_NETWORK   @inet_network@
  
  
  
  1.13  +4 -0  apache-2.0/src/lib/apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_errno.h   1999/12/20 16:10:11 1.12
  +++ apr_errno.h   2000/01/27 23:49:27 1.13
  @@ -107,6 +107,7 @@
   #define APR_ENOTHREAD  (APR_OS_START_ERROR + 12)
   #define APR_ENOTHDKEY  (APR_OS_START_ERROR + 13)
   #define APR_ENOTTHREADSAFE (APR_OS_START_ERROR + 14)
  +#define APR_ESHMLOCK   (APR_OS_START_ERROR + 15)
   
   /* APR STATUS VALUES */
   #define APR_INCHILD(APR_OS_START_STATUS + 1)
  @@ -127,6 +128,9 @@
   #define APR_LESS   (APR_OS_START_STATUS + 16)
   #define APR_EQUAL  (APR_OS_START_STATUS + 17)
   #define APR_MORE   (APR_OS_START_STATUS + 18)
  +#define APR_ANONYMOUS  (APR_OS_START_STATUS + 19)
  +#define APR_FILEBASED  (APR_OS_START_STATUS + 20)
  +#define APR_KEYBASED   (APR_OS_START_STATUS + 21)
   
   /* A simple value to be used to initialze a status variable. */
   #define APR_EINIT  (APR_OS_START_STATUS + 16)  
  
  
  
  1.3   +19 -12apache-2.0/src/lib/apr/include/apr_shmem.h
  
  Index: apr_shmem.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_shmem.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_shmem.h   1999/10/04 16:36:55 1.2
  +++ apr_shmem.h   2000/01/27 23:49:27 1.3
  @@ -56,6 +56,7 @@
   #ifndef APR_SHMEM_H
   #define APR_SHMEM_H
   
  +#include "apr.h"
   #include "apr_general.h"
   #include "apr_errno.h"
   
  @@ -63,19 +64,25 @

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

2000-01-26 Thread rbb
rbb 00/01/26 10:06:32

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in
  Log:
  We need to know if a platform has fork or not.
  
  Revision  ChangesPath
  1.48  +2 -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.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- configure.in  2000/01/24 13:58:59 1.47
  +++ configure.in  2000/01/26 18:06:30 1.48
  @@ -309,11 +309,13 @@
   AC_CHECK_FUNCS(strcasecmp stricmp poll setsid)
   AC_CHECK_FUNCS(sigaction writev)
   AC_CHECK_FUNCS(sendfile, [ sendfile="1" ], [ sendfile="0" ]) 
  +AC_CHECK_FUNCS(fork, [ fork="1" ], [ fork="0" ]) 
   AC_CHECK_FUNCS(getpass)
   AC_CHECK_FUNC(inet_addr, [ inet_addr="1" ], [ inet_addr="0" ])
   AC_CHECK_FUNC(inet_network, [ inet_network="1" ], [ inet_network="0" ])
   AC_CHECK_FUNC(_getch)
   AC_SUBST(sendfile)
  +AC_SUBST(fork)
   AC_SUBST(inet_addr)
   AC_SUBST(inet_network)
   
  
  
  
  1.11  +1 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr.h.in  2000/01/24 13:59:01 1.10
  +++ apr.h.in  2000/01/26 18:06:31 1.11
  @@ -53,6 +53,7 @@
   #define APR_HAS_THREADS  @threads@
   #define APR_HAS_SENDFILE @sendfile@
   #define APR_HAS_MMAP @mmap@
  +#define APR_HAS_FORK @fork@
   
   /* Typedefs that APR needs. */
   
  
  
  


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

2000-01-25 Thread rbb
rbb 00/01/25 15:04:44

  Modified:src/lib/apr/include apr_portable.h
   src/lib/apr/locks/unix crossproc.c locks.c locks.h
   src/lib/apr/misc/unix start.c
   src/lib/apr/test testthread.c
  Log:
  Take a couple of values that were static for all locks out of the lock
  structure.  These values are now created once and used for all locks.
  
  Revision  ChangesPath
  1.21  +0 -4  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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- apr_portable.h2000/01/24 13:59:01 1.20
  +++ apr_portable.h2000/01/25 23:04:23 1.21
  @@ -149,12 +149,8 @@
   struct os_lock_t {
   #if APR_USE_SYSVSEM_SERIALIZE
   int crossproc;
  -struct sembuf op_on;
  -struct sembuf op_off;
   #elif APR_USE_FCNTL_SERIALIZE
   int crossproc;
  -struct flock lock_it;
  -struct flock unlock_it;
   #elif APR_USE_PROC_PTHREAD_SERIALIZE
   pthread_mutex_t *crossproc; 
   #elif APR_USE_FLOCK_SERIALIZE
  
  
  
  1.12  +41 -24apache-2.0/src/lib/apr/locks/unix/crossproc.c
  
  Index: crossproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/crossproc.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- crossproc.c   2000/01/23 01:13:46 1.11
  +++ crossproc.c   2000/01/25 23:04:27 1.12
  @@ -56,6 +56,19 @@
   #include "locks.h"
   
   #if defined (USE_SYSVSEM_SERIALIZE)  
  +
  +static struct sembuf op_on;
  +static struct sembuf op_off;
  +
  +void setup_lock() {
  +op_on.sem_num = 0;
  +op_on.sem_op = -1;
  +op_on.sem_flg = SEM_UNDO;
  +op_off.sem_num = 0;
  +op_off.sem_op = 1;
  +op_off.sem_flg = SEM_UNDO;
  +}
  +
   ap_status_t lock_cleanup(void *lock_)
   {
   struct lock_t *lock=lock_;
  @@ -84,14 +97,6 @@
   lock_cleanup(new);
   return errno;
   }
  -/* preinitialize these */
  -new->op_on.sem_num = 0;
  -new->op_on.sem_op = -1;
  -new->op_on.sem_flg = SEM_UNDO;
  -new->op_off.sem_num = 0;
  -new->op_off.sem_op = 1;
  -new->op_off.sem_flg = SEM_UNDO;
  -
   new->curr_locked = 0;
   ap_register_cleanup(new->cntxt, (void *)new, lock_cleanup, 
ap_null_cleanup);
   return APR_SUCCESS;
  @@ -100,7 +105,7 @@
   ap_status_t lock_inter(struct lock_t *lock)
   {
   lock->curr_locked = 1;
  -if (semop(lock->interproc, &lock->op_on, 1) < 0) {
  +if (semop(lock->interproc, &op_on, 1) < 0) {
   return errno;
   }
   return APR_SUCCESS;
  @@ -108,7 +113,7 @@
   
   ap_status_t unlock_inter(struct lock_t *lock)
   {
  -if (semop(lock->interproc, &lock->op_off, 1) < 0) {
  +if (semop(lock->interproc, &op_off, 1) < 0) {
   return errno;
   }
   lock->curr_locked = 0;
  @@ -133,6 +138,9 @@
   
   #elif defined (USE_PROC_PTHREAD_SERIALIZE)  
   
  +void setup_lock() {
  +}
  +
   ap_status_t lock_cleanup(struct lock_t *lock)
   {
   if (lock->curr_locked == 1) {
  @@ -227,12 +235,28 @@
   
   #elif defined (USE_FCNTL_SERIALIZE)  
   
  +static struct flock lock_it;
  +static struct flock unlock_it;
  +
  +void setup_lock() {
  +lock_it.l_whence = SEEK_SET;/* from current point */
  +lock_it.l_start = 0;/* -"- */
  +lock_it.l_len = 0;  /* until end of file */
  +lock_it.l_type = F_WRLCK;   /* set exclusive/write lock */
  +lock_it.l_pid = 0;  /* pid not actually interesting */
  +unlock_it.l_whence = SEEK_SET;  /* from current point */
  +unlock_it.l_start = 0;  /* -"- */
  +unlock_it.l_len = 0;/* until end of file */
  +unlock_it.l_type = F_UNLCK; /* set exclusive/write lock */
  +unlock_it.l_pid = 0;/* pid not actually interesting */
  +}
  +
   static ap_status_t lock_cleanup(void *lock_)
   {
   struct lock_t *lock=lock_;
   
   if (lock->curr_locked == 1) {
  -if (fcntl(lock->interproc, F_SETLKW, &lock->unlock_it) < 0) {
  +if (fcntl(lock->interproc, F_SETLKW, &unlock_it) < 0) {
   return errno;
   }
   lock->curr_locked=0;
  @@ -248,17 +272,6 @@
   lock_cleanup(new);
   return errno;
   }
  -/* preinitialize these */
  -new->lock_it.l_whence = SEEK_SET;/* from current point */
  -new->lock_it.l_start = 0;/* -"- */
  -new->lock_it.l_len = 0;  /* until end of file */
  -new->lock_it.l_type =

Re: cvs commit: apache-2.0/src/lib/apr/locks/unix locks.h

2000-01-24 Thread rbb

> >   -#ifdef HAVE_STRUCT_UNION_SEMUN
> >   -#include 
> >   -#endif
> > 
> >#if APR_HAS_THREADS
> >#if HAVE_PTHREAD_H
> >   @@ -99,7 +96,7 @@
> >#endif
> >/* End System Headers */
> > 
> >   -#ifndef HAVE_STRUCT_UNION_SEMUN
> >   +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
> >/* it makes no sense, but this isn't defined on solaris */
> >union semun {
> >long val;
> 
> Que? If you don't include sys/sem.h, then this doesn't compile - why did
> you remove it?

If you look about four lines above this,. we include sys/sem.h if it is on
the system.  The problem was we weren't checking for it.  I put the check
into configure.in, so we should be including it.  I just didn't see a need
for sys/sem.h to be included twice.  :-)

> 
> BTW, why are these structures included in the locking structure at all?
> They're essentially constant static structures, but they currently exist
> in each lock.
> 

I have no good answer for this.  I'll look into it though.

Ryan


Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

2000-01-24 Thread rbb
rbb 00/01/24 05:59:03

  Modified:src/lib/apr acconfig.h configure.in
   src/lib/apr/include apr.h.in apr_portable.h
   src/lib/apr/locks/unix locks.h
  Log:
  Namespace protect the HAVE_SEMUN variable that was added.  This has not
  been tested fully, because I don't have access to a platform that uses
  semaphores, but the logic is sound.
  
  Revision  ChangesPath
  1.21  +0 -1  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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- acconfig.h2000/01/11 12:58:46 1.20
  +++ acconfig.h2000/01/24 13:58:59 1.21
  @@ -27,7 +27,6 @@
   @TOP@
   
   /* Various #defines we need to know about */
  -#undef HAVE_STRUCT_UNION_SEMUN
   #undef HAVE_LOCK_EX
   #undef HAVE_F_SETLK
   #undef HAVE_PTHREAD_PROCESS_SHARED
  
  
  
  1.47  +6 -3  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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- configure.in  2000/01/23 01:13:44 1.46
  +++ configure.in  2000/01/24 13:58:59 1.47
  @@ -221,6 +221,7 @@
   AC_CHECK_HEADERS(osreldate.h)
   AC_CHECK_HEADERS(process.h)
   AC_CHECK_HEADERS(pwd.h)
  +AC_CHECK_HEADERS(sys/sem.h)
   AC_CHECK_HEADERS(setjmp.h)
   AC_CHECK_HEADERS(signal.h)
   AC_CHECK_HEADERS(stdarg.h, stdargh="1", stdargh="0")
  @@ -285,10 +286,12 @@
   ],[
   union semun arg;
   semctl(0, 0, 0, arg);
  -], [AC_DEFINE(HAVE_STRUCT_UNION_SEMUN) union_semun=yes]
  -msg=yes,dnl
  -msg=no)
  +], [have_union_semun="1" union_semun=yes ]
  +msg=yes, [
  +have_union_semun="0"
  +msg=no ] )
   AC_MSG_RESULT([$msg])
  +AC_SUBST(have_union_semun)
   
   AC_MSG_CHECKING(looking for in_addr in netinet/in.h)
   AC_TRY_COMPILE([
  
  
  
  1.10  +1 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apr.h.in  2000/01/19 01:14:55 1.9
  +++ apr.h.in  2000/01/24 13:59:01 1.10
  @@ -43,6 +43,7 @@
   #define APR_HAVE_IN_ADDR@have_in_addr@
   #define APR_HAVE_INET_ADDR  @inet_addr@
   #define APR_HAVE_INET_NETWORK   @inet_network@
  +#define APR_HAVE_UNION_SEMUN@have_union_semun@
   
   #if APR_HAVE_SYS_TYPES_H
   #include 
  
  
  
  1.20  +1 -1  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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- apr_portable.h2000/01/23 01:13:45 1.19
  +++ apr_portable.h2000/01/24 13:59:01 1.20
  @@ -81,7 +81,7 @@
   #if APR_HAVE_PTHREAD_H
   #include 
   #endif
  -#ifdef HAVE_STRUCT_UNION_SEMUN
  +#if APR_HAVE_UNION_SEMUN
   #include 
   #endif
   
  
  
  
  1.10  +1 -4  apache-2.0/src/lib/apr/locks/unix/locks.h
  
  Index: locks.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- locks.h   2000/01/23 01:13:47 1.9
  +++ locks.h   2000/01/24 13:59:02 1.10
  @@ -88,9 +88,6 @@
   #if HAVE_FCNTL_H
   #include 
   #endif
  -#ifdef HAVE_STRUCT_UNION_SEMUN
  -#include 
  -#endif
   
   #if APR_HAS_THREADS
   #if HAVE_PTHREAD_H
  @@ -99,7 +96,7 @@
   #endif
   /* End System Headers */
   
  -#ifndef HAVE_STRUCT_UNION_SEMUN
  +#if !APR_HAVE_UNION_SEMUN && APR_USE_SYSVSEM_SERIALIZE
   /* it makes no sense, but this isn't defined on solaris */
   union semun {
   long val;
  
  
  


Re: cvs commit: apache-2.0/src/os/win32 main_win32.c os.h

2000-01-23 Thread rbb

>#define APR_HAS_THREADS  1
>#define APR_HAS_SENDFILE 0
>#define APR_HAS_MMAP 0
>   +#define APR_HAVE_IN_ADDR

Please follow the format that the other defines use.  It makes it the code
much more readable if all of the defines have a specified value.

Ryan

Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---




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

2000-01-23 Thread rbb
On Sun, 23 Jan 2000, Ben Laurie wrote:

> [EMAIL PROTECTED] wrote:
> > 
> > >src/lib/apr/include apr_portable.h
> > >src/lib/apr/locks/unix crossproc.c locks.h
> > >src/lib/apr/time/unix timestr.c
> > >   Log:
> > >   Make interprocess mutexes actually choose, fix semaphore mutexes.
> > 
> > What does this mean?
> 
> It means don't force them to be always fcntl, i.e. actually use the
> choice instead of overriding it.

Okay, I didn't realize we were overriding it.  I just didn't understand
the comment.

> 
> > 
> > >   Index: apr_portable.h
> > >   ===
> > >   RCS file: 
> > > /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v
> > >   retrieving revision 1.18
> > >   retrieving revision 1.19
> > >   diff -u -r1.18 -r1.19
> > >   --- apr_portable.h  2000/01/09 20:58:22 1.18
> > >   +++ apr_portable.h  2000/01/23 01:13:45 1.19
> > >   @@ -81,6 +81,9 @@
> > >#if APR_HAVE_PTHREAD_H
> > >#include 
> > >#endif
> > >   +#ifdef HAVE_STRUCT_UNION_SEMUN
> > >   +#include 
> > >   +#endif
> > 
> > This is bad.  We cannot use HAVE_ macros in public header files, because
> > they aren't namepsace protected.  It really doesn't matter if we named
> > them ourselves or if autoconf named them for us.  Please change this to
> > APR_HAVE_STRUCT_UNION_SEMUN.
> 
> Sure, but I couldn't figure out where/how that happens/should happen.

Not a problem, I'll do it, and that will serve as an example of how to do
this in the future.  I won't get to it till tomorrow though..

Ryan


Come to the first official Apache Software Foundation
Conference!!!   

___
Ryan Bloom  [EMAIL PROTECTED]
2121 Stonehenge Dr. Apt #3
Raleigh, NC 27615   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

2000-01-23 Thread rbb

>src/lib/apr/include apr_portable.h
>src/lib/apr/locks/unix crossproc.c locks.h
>src/lib/apr/time/unix timestr.c
>   Log:
>   Make interprocess mutexes actually choose, fix semaphore mutexes.

What does this mean?

>   Index: apr_portable.h
>   ===
>   RCS file: /export/home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v
>   retrieving revision 1.18
>   retrieving revision 1.19
>   diff -u -r1.18 -r1.19
>   --- apr_portable.h  2000/01/09 20:58:22 1.18
>   +++ apr_portable.h  2000/01/23 01:13:45 1.19
>   @@ -81,6 +81,9 @@
>#if APR_HAVE_PTHREAD_H
>#include 
>#endif
>   +#ifdef HAVE_STRUCT_UNION_SEMUN
>   +#include 
>   +#endif

This is bad.  We cannot use HAVE_ macros in public header files, because
they aren't namepsace protected.  It really doesn't matter if we named
them ourselves or if autoconf named them for us.  Please change this to
APR_HAVE_STRUCT_UNION_SEMUN.

Ryan



Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix networkio.h sockaddr.c

2000-01-20 Thread rbb

>   Convert HAVE_NETINET... to the APR mac

Please undo this change.  APR is not providing configuration macros for
Apache.  That is up to Apache to do.  The APR_HAVE_NETINET_H macro is
defined so that the APR PUBLIC header file can use it.  This macro should
also not be used by APR internal files.  It should only be used by header
files that APR provides for other programs, such as apr_network_io.h

Ryan



cvs commit: apache-site/contributors index.html

2000-01-20 Thread rbb
rbb 00/01/20 07:23:35

  Modified:contributors index.html
  Log:
  Update the contributors page with my new information.
  
  Revision  ChangesPath
  1.86  +2 -2  apache-site/contributors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/contributors/index.html,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- index.html2000/01/07 13:32:00 1.85
  +++ index.html2000/01/20 15:23:33 1.86
  @@ -188,9 +188,9 @@
   
   
   Name: Ryan Bloom
  -Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  +Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://www.ntrnet.net/~rbb";>http://www.ntrnet.net/~rbb
  -Organization: IBM Corp
  +Organization:Covalent Technologies
   Occupation: Software Engineer
   Location: Research Triangle Park, NC
   OS Expertise: Linux, AIX, Windows 
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_access.c mod_auth_db.c mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_env.c mod_expires.c mod_imap.c mod_include.c mod_log_config.c mod_mime.c mod_mime_magic.c mod_negotiation.c mod_rewrite.c mod_userdir.c

2000-01-19 Thread rbb
rbb 00/01/18 18:43:02

  Modified:src/include httpd.h
   src/modules/standard mod_access.c mod_auth_db.c
mod_autoindex.c mod_cern_meta.c mod_cgi.c mod_env.c
mod_expires.c mod_imap.c mod_include.c
mod_log_config.c mod_mime.c mod_mime_magic.c
mod_negotiation.c mod_rewrite.c mod_userdir.c
  Log:
  Manoj has been pushing for this for a while, but I've been too dense
  to understand that he was right.  :-)  Basically, this makes the modules
  use ap_config to test for header file inclusion.  This method is not to
  be used for larger modules that run autoconf theirselves.  Including
  ap_config is only valid for modules which rely on Apache to do their
  configuration.  Currently, this is only the core modules.
  
  Revision  ChangesPath
  1.20  +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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- httpd.h   2000/01/19 01:14:31 1.19
  +++ httpd.h   2000/01/19 02:41:49 1.20
  @@ -377,7 +377,7 @@
   API_EXPORT(const char *) ap_get_server_version(void);
   API_EXPORT(void) ap_add_version_component(const char *component);
   #else
  -#define ap_get_server_version()  (SERVER_BASEVERSION)
  +#define ap_get_server_version()  (AP_SERVER_BASEVERSION)
   #define ap_add_version_component(x) ((void)0)
   #endif
   API_EXPORT(const char *) ap_get_server_built(void);
  
  
  
  1.6   +3 -0  apache-2.0/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_access.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_access.c  2000/01/18 23:41:51 1.5
  +++ mod_access.c  2000/01/19 02:41:52 1.6
  @@ -63,12 +63,15 @@
*/
   
   #include "apr_network_io.h"
  +#include "ap_config.h"
   #include "httpd.h"
   #include "http_core.h"
   #include "http_config.h"
   #include "http_log.h"
   #include "http_request.h"
  +#ifdef HAVE_STRING_H
   #include 
  +#endif
   
   enum allowdeny_type {
   T_ENV,
  
  
  
  1.6   +3 -0  apache-2.0/src/modules/standard/mod_auth_db.c
  
  Index: mod_auth_db.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_db.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_auth_db.c 1999/10/22 16:01:24 1.5
  +++ mod_auth_db.c 2000/01/19 02:41:53 1.6
  @@ -90,12 +90,15 @@
* no control is passed along.
*/
   
  +#include "ap_config.h"
   #include "httpd.h"
   #include "http_config.h"
   #include "http_core.h"
   #include "http_log.h"
   #include "http_protocol.h"
  +#ifdef HAVE_DB_H
   #include 
  +#endif
   
   #if defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 2)
   #define DB2
  
  
  
  1.22  +3 -0  apache-2.0/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- mod_autoindex.c   2000/01/18 23:41:52 1.21
  +++ mod_autoindex.c   2000/01/19 02:41:53 1.22
  @@ -64,6 +64,7 @@
* Adapted to Apache by rst.
*/
   
  +#include "ap_config.h"
   #include "httpd.h"
   #include "http_config.h"
   #include "http_core.h"
  @@ -73,7 +74,9 @@
   #include "http_main.h"
   #include "util_script.h"
   #include "apr_fnmatch.h"
  +#ifdef HAVE_STRING_H
   #include 
  +#endif
   
   module MODULE_VAR_EXPORT autoindex_module;
   
  
  
  
  1.8   +7 -2  apache-2.0/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mod_cern_meta.c   2000/01/10 15:35:51 1.7
  +++ mod_cern_meta.c   2000/01/19 02:41:56 1.8
  @@ -148,13 +148,18 @@
* 29.Jun.96 All directives made per-directory.
*/
   
  +#include "ap_config.h"
   #include "httpd.h"
   #include "http_config.h"
  -#include 
  -#include 
   #include "util_script.h"
   #include "http_log.h"
   #include "http_request.h"
  +#ifdef HAVE_SYS_TYPES_H
  +#include 
  +#endif
  +#ifdef HAVE_SYS_STAT_H
  +#include 

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

2000-01-19 Thread rbb
rbb 00/01/18 18:09:08

  Modified:src/include ap_buf.h buff.h util_date.h
   src/main http_core.c http_protocol.c
  Log:
  Cleanup a few things with the compile.  There were also a few macro name
  changes I missed earlier.
  
  Revision  ChangesPath
  1.3   +2 -0  apache-2.0/src/include/ap_buf.h
  
  Index: ap_buf.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/ap_buf.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_buf.h  1999/06/20 19:34:28 1.2
  +++ ap_buf.h  2000/01/19 02:08:56 1.3
  @@ -58,7 +58,9 @@
   #ifndef AP_BUF_H
   #define AP_BUF_H
   
  +#ifdef HAVE_SYS_UIO_H
   #include  /* for struct iovec */
  +#endif
   
   typedef struct ap_bufel ap_bufel;
   struct ap_bufel {
  
  
  
  1.13  +2 -0  apache-2.0/src/include/buff.h
  
  Index: buff.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/buff.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- buff.h2000/01/19 01:14:27 1.12
  +++ buff.h2000/01/19 02:08:57 1.13
  @@ -62,7 +62,9 @@
   extern "C" {
   #endif
   
  +#ifdef HAVE_STDARG_H
   #include 
  +#endif
   #include "ap_iol.h"
   #include "apr_lib.h"
   #include "apr_general.h"
  
  
  
  1.8   +1 -10 apache-2.0/src/include/util_date.h
  
  Index: util_date.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/util_date.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- util_date.h   2000/01/19 01:14:31 1.7
  +++ util_date.h   2000/01/19 02:08:57 1.8
  @@ -67,17 +67,8 @@
*/
   
   #include "apr_time.h"
  -/* XXX - This section lists include files for OS-specific types that APR
  - * should replace. Once they are replaced, this section should be
  - * removed */
  -#ifndef NO_MORE_OS_TYPES_IN_THIS_FILE
  -#include "ap_config_auto.h"
  -#ifdef HAVE_SYS_TIME_H
  -#include 
  -#endif
  -#endif /* NO_MORE_OS_TYPES_IN_THIS_FILE */
   
  -#define BAD_DATE (time_t)0
  +#define BAD_DATE (ap_time_t)0
   
   API_EXPORT(int) ap_checkmask(const char *data, const char *mask);
   API_EXPORT(ap_time_t) ap_parseHTTPdate(const char *date);
  
  
  
  1.33  +2 -2  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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- http_core.c   2000/01/19 01:15:04 1.32
  +++ http_core.c   2000/01/19 02:09:01 1.33
  @@ -2060,13 +2060,13 @@
   ap_snprintf(sport, sizeof sport, "%u", (unsigned) ap_get_server_port(r));
   
   if (conf->server_signature == srv_sig_withmail) {
  - return ap_pstrcat(r->pool, prefix, "" SERVER_BASEVERSION
  + return ap_pstrcat(r->pool, prefix, "" AP_SERVER_BASEVERSION
  " Server at mailto:";,
  r->server->server_admin, "\">",
  ap_get_server_name(r), " Port ", sport,
  "\n", NULL);
   }
  -return ap_pstrcat(r->pool, prefix, "" SERVER_BASEVERSION
  +return ap_pstrcat(r->pool, prefix, "" AP_SERVER_BASEVERSION
  " Server at ", ap_get_server_name(r), " Port ", sport,
  "\n", NULL);
   }
  
  
  
  1.50  +2 -2  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.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- http_protocol.c   2000/01/19 01:15:09 1.49
  +++ http_protocol.c   2000/01/19 02:09:03 1.50
  @@ -1332,7 +1332,7 @@
   r->connection->keepalive = -1;
   }
   else
  -protocol = SERVER_PROTOCOL;
  +protocol = AP_SERVER_PROTOCOL;
   
   #ifdef CHARSET_EBCDIC
   ap_bsetflag(r->connection->client, B_EBCDIC2ASCII, 1);
  @@ -1775,7 +1775,7 @@
   
   if (r->expecting_100 && r->proto_num >= HTTP_VERSION(1,1)) {
   /* sending 100 Continue interim response */
  -ap_rvputs(r, SERVER_PROTOCOL, " ", status_lines[0], 
"\015\012\015\012",
  +ap_rvputs(r, AP_SERVER_PROTOCOL, " ", status_lines[0], 
"\015\012\015\012",
 NULL);
   ap_rflush(r);
   }
  
  
  


cvs commit: apache-2.0/src/regex config.m4

2000-01-19 Thread rbb
rbb 00/01/18 17:16:35

  Modified:src/ap   ap_base64.c ap_hooks.c ap_sha1.c
   src/include ap.h ap_ac_config.h buff.h conf.h explain.h
http_conf_globals.h http_connection.h http_core.h
http_log.h httpd.h util_date.h util_md5.h
   src/lib/apr configure.in
   src/lib/apr/include apr.h.in apr_general.h apr_network_io.h
   src/main http_config.c http_connection.c http_core.c
http_log.c http_main.c http_protocol.c
http_request.c http_vhost.c iol_file.c listen.c
rfc1413.c util.c util_date.c util_script.c
util_uri.c
   src/modules/mpm/dexter dexter.c mpm_default.h scoreboard.c
   src/modules/mpm/mpmt_beos mpm_default.h
   src/modules/mpm/mpmt_pthread mpm_default.h mpmt_pthread.c
scoreboard.c scoreboard.h
   src/modules/mpm/prefork mpm_default.h prefork.c scoreboard.h
   src/modules/mpm/spmt_os2 mpm_default.h scoreboard.h
   src/modules/mpm/winnt mpm_default.h
   src/os/beos beosd.h os.h
   src/os/os2 os.h
   src/os/unix iol_socket.c os.h unixd.c unixd.h
   src/os/win32 os.h
   src/regex config.m4
  Log:
  Finish the commits for the change in the header files.  Basically, this hides
  all of the Apache macros that modules don't need access to.  This should
  have been committed with the modules, but I wasn't paying attention to the
  directory I was in when I ran the commit.
  Submitted by: Manoj Kasichainula and Ryan Bloom
  
  Revision  ChangesPath
  1.3   +2 -1  apache-2.0/src/ap/ap_base64.c
  
  Index: ap_base64.c
  ===
  RCS file: /home/cvs/apache-2.0/src/ap/ap_base64.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_base64.c   1999/09/11 07:15:56 1.2
  +++ ap_base64.c   2000/01/19 01:14:21 1.3
  @@ -61,14 +61,15 @@
* ugly 'len' functions, which is quite a nasty cost.
*/
   
  +#define CORE_PRIVATE
   #include 
   
  -#include "ap_config.h"
   #include "ap.h"
   
   #ifdef CHARSET_EBCDIC
   #include "ebcdic.h"
   #endif   /* CHARSET_EBCDIC */
  +#include "ap_config.h"
   
   /* ck but it's fast and const should make it shared text page. */
   static const unsigned char pr2six[256] =
  
  
  
  1.9   +1 -0  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ap_hooks.c1999/11/28 13:32:15 1.8
  +++ ap_hooks.c2000/01/19 01:14:22 1.9
  @@ -1,6 +1,7 @@
   #include "httpd.h"
   #include "ap_hooks.h"
   #include 
  +#include 
   
   #if 0
   #define ap_palloc(pool,size) malloc(size)
  
  
  
  1.3   +1 -1  apache-2.0/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===
  RCS file: /home/cvs/apache-2.0/src/ap/ap_sha1.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_sha1.c 1999/09/13 18:22:20 1.2
  +++ ap_sha1.c 2000/01/19 01:14:22 1.3
  @@ -85,12 +85,12 @@
   #include 
   
   #include "httpd.h"
  -#include "ap_config.h"
   #include "ap_sha1.h"
   #include "ap.h"
   #ifdef CHARSET_EBCDIC
   #include "ebcdic.h"
   #endif /*CHARSET_EBCDIC*/
  +#include "ap_config.h"
   
   /* a bit faster & bigger, if defined */
   #define UNROLL_LOOPS
  
  
  
  1.8   +33 -0 apache-2.0/src/include/ap.h
  
  Index: ap.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/ap.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ap.h  1999/11/23 06:33:51 1.7
  +++ ap.h  2000/01/19 01:14:26 1.8
  @@ -65,6 +65,39 @@
   extern "C" {
   #endif
   
  +/* stuff marked API_EXPORT is part of the API, and intended for use
  + * by modules
  + */
  +#ifndef API_EXPORT
  +#define API_EXPORT(type)type
  +#endif
  +
  +/* Stuff marked API_EXPORT_NONSTD is part of the API, and intended for
  + * use by modules.  The difference between API_EXPORT and
  + * API_EXPORT_NONSTD is that the latter is required for any functions
  + * which use varargs or are used via indirect function call.  This
  + * is to accomodate the two calling conventions in windows dlls.
  + */
  +#ifndef API_EXPORT_NONSTD
  +#define API_EXPORT_NONSTD(type)type
  +#endif
  +
  +#ifndef MODULE_VAR_EXPORT
  +#define MODULE_VAR_EXPORT
  +

cvs commit: apache-2.0/src/modules/standard mod_access.c mod_asis.c mod_auth_digest.c mod_autoindex.c mod_cgi.c mod_dir.c mod_echo.c mod_env.c mod_imap.c mod_include.c mod_mime.c mod_negotiation.c mod_status.c mod_userdir.c

2000-01-18 Thread rbb
rbb 00/01/18 15:42:07

  Modified:src/modules/standard mod_access.c mod_asis.c
mod_auth_digest.c mod_autoindex.c mod_cgi.c
mod_dir.c mod_echo.c mod_env.c mod_imap.c
mod_include.c mod_mime.c mod_negotiation.c
mod_status.c mod_userdir.c
  Log:
  This is a huge change to the configure system.  Basically, this name space
  protects most, if not all, of the Apache macros.   This has been tested on
  Linux using all of the Unix MPM's.  The biggest push was that Apache's
  httpd.h header file can no longer include the ap_config.h file.  Most of the
  other files include this themselves now.
  Submitted by: Ryan Bloom and Manoj Kasichainula
  
  Revision  ChangesPath
  1.5   +2 -0  apache-2.0/src/modules/standard/mod_access.c
  
  Index: mod_access.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_access.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_access.c  1999/10/20 12:50:06 1.4
  +++ mod_access.c  2000/01/18 23:41:51 1.5
  @@ -62,11 +62,13 @@
* 
*/
   
  +#include "apr_network_io.h"
   #include "httpd.h"
   #include "http_core.h"
   #include "http_config.h"
   #include "http_log.h"
   #include "http_request.h"
  +#include 
   
   enum allowdeny_type {
   T_ENV,
  
  
  
  1.15  +2 -0  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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_asis.c2000/01/06 14:43:37 1.14
  +++ mod_asis.c2000/01/18 23:41:51 1.15
  @@ -63,6 +63,8 @@
   #include "http_main.h"
   #include "http_request.h"
   
  +#define ASIS_MAGIC_TYPE "httpd/send-as-is"
  +
   static int asis_handler(request_rec *r)
   {
   ap_file_t *f = NULL;
  
  
  
  1.5   +0 -1  apache-2.0/src/modules/standard/mod_auth_digest.c
  
  Index: mod_auth_digest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_digest.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_auth_digest.c 1999/11/19 18:48:28 1.4
  +++ mod_auth_digest.c 2000/01/18 23:41:52 1.5
  @@ -125,7 +125,6 @@
   #include "http_request.h"
   #include "http_log.h"
   #include "http_protocol.h"
  -#include "ap_config.h"
   #include "ap_ctype.h"
   #include "util_uri.h"
   #include "util_md5.h"
  
  
  
  1.21  +1 -0  apache-2.0/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_autoindex.c   2000/01/10 15:35:50 1.20
  +++ mod_autoindex.c   2000/01/18 23:41:52 1.21
  @@ -73,6 +73,7 @@
   #include "http_main.h"
   #include "util_script.h"
   #include "apr_fnmatch.h"
  +#include 
   
   module MODULE_VAR_EXPORT autoindex_module;
   
  
  
  
  1.26  +2 -0  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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mod_cgi.c 2000/01/10 15:35:51 1.25
  +++ mod_cgi.c 2000/01/18 23:41:52 1.26
  @@ -77,6 +77,8 @@
   #include "http_log.h"
   #include "util_script.h"
   #include "http_conf_globals.h"
  +#include 
  +#include 
   
   module MODULE_VAR_EXPORT cgi_module;
   
  
  
  
  1.6   +1 -1  apache-2.0/src/modules/standard/mod_dir.c
  
  Index: mod_dir.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_dir.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_dir.c 2000/01/10 15:35:51 1.5
  +++ mod_dir.c 2000/01/18 23:41:53 1.6
  @@ -152,7 +152,7 @@
num_names = d->index_names->nelts;
   }
   else {
  - dummy_ptr[0] = DEFAULT_INDEX;
  + dummy_ptr[0] = AP_DEFAULT_INDEX;
names_ptr = dummy_ptr;
num_names = 1;
   }
  
  
  
  1.15  +1 -0  apache-2.0/src/modules/standard/mod_echo.c
  
  Index: mod_echo.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_echo.c,v

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

2000-01-17 Thread rbb
rbb 00/01/17 11:12:36

  Modified:src/lib/apr/file_io/unix filestat.c
  Log:
  Fix a problem with ap_stat.  We should return the platforms error code, not
  an APR error if the stat function fails.
  
  Revision  ChangesPath
  1.12  +2 -2  apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- filestat.c2000/01/10 16:39:56 1.11
  +++ filestat.c2000/01/17 19:12:30 1.12
  @@ -105,7 +105,7 @@
   return APR_SUCCESS;
   }
   else {
  -return APR_ENOSTAT;
  +return errno;
   }
   }
   
  @@ -135,6 +135,6 @@
   return APR_SUCCESS;
   }
   else {
  -return APR_ENOSTAT;
  +return errno;
   }
   }
  
  
  


cvs commit: apache-1.3/src Configure

2000-01-15 Thread rbb
rbb 00/01/15 08:10:47

  Modified:src  Configure
  Log:
  Add -Ae flag to HPUX compiler.  This allows HPUX to compile with the
  long long variable types.
  
  Revision  ChangesPath
  1.389 +2 -2  apache-1.3/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-1.3/src/Configure,v
  retrieving revision 1.388
  retrieving revision 1.389
  diff -u -r1.388 -r1.389
  --- Configure 2000/01/15 16:01:07 1.388
  +++ Configure 2000/01/15 16:10:46 1.389
  @@ -1395,7 +1395,7 @@
   'HI-UX')
case "$CC" in
*/cc|cc )
  - CFLAGS="$CFLAGS -Aa -D_HIUX_SOURCE"
  + CFLAGS="$CFLAGS -Aa -Ae -D_HIUX_SOURCE"
OPTIM=" "
TOPTIM=""
;;
  @@ -1404,7 +1404,7 @@
   'HP-UX'|'HP-UX 10'|'HP-UX 11')
case "$CC" in
*/cc|cc )
  - CFLAGS="$CFLAGS -Aa -D_HPUX_SOURCE"
  + CFLAGS="$CFLAGS -Aa -Ae -D_HPUX_SOURCE"
OPTIM=" "
TOPTIM=""
;;
  
  
  


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

2000-01-14 Thread rbb
rbb 00/01/14 10:24:04

  Added:   src/lib/apr/include apr_iconv.h
  Log:
  Initial pass at codepage conversion routines.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/lib/apr/include/apr_iconv.h
  
  Index: apr_iconv.h
  ===
  /* 
   * Copyright (c) 1999 The Apache Group.  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 acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * 4. The names "Apache Server" and "Apache Group" must not be used to
   *endorse or promote products derived from this software without
   *prior written permission. For written permission, please contact
   *[EMAIL PROTECTED]
   *
   * 5. Products derived from this software may not be called "Apache"
   *nor may "Apache" appear in their names without prior written
   *permission of the Apache Group.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *acknowledgment:
   *"This product includes software developed by the Apache Group
   *for use in the Apache HTTP server project (http://www.apache.org/)."
   *
   * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
   * EXPRESSED 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 APACHE GROUP OR
   * ITS 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.
   * 
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Group.
   * For more information on the Apache Group and the Apache HTTP server
   * project, please see <http://www.apache.org/>.
   *
   */
  
  #ifndef APR_ICONV_H
  #define APR_ICONV_H
  
  #include "apr_general.h"
  #include "apr_time.h"
  #include "apr_errno.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  #if !defined(ICONV_IMPLEMENT)
  
  typedef void ap_iconv_t;
  
  /* For platforms where we don't bother with translating between codepages
   */
  
  #define ap_codepage_open(convset, topage, frompage, context) 
  #define ap_translate_codepage(convset, inbuf, inbytes_left, outbuf, \
outbytes_left) outbuf=inbuf;
  /* The purpose of ap_translate char is to translate one character
   * at a time.  This needs to be written carefully so that it works
   * with double-byte character sets. 
   */
  #define ap_translate_char(convset, inchar, outchar) outchar = inchar
  #define ap_codepage_close(convset)
  
  #else
  
  typedef struct ap_iconv_tap_iconv_t;
  
  void ap_codepage_open(ap_iconv_t **convset, const char *topage, 
   const char *frompage, ap_context_t *context); 
  void ap_translate_codepage(ap_iconv_t *convset, const char *inbuf, 
ap_size_t inbytes_left, const char *outbuf,
ap_size_t outbytes_left);
  /* The purpose of ap_translate char is to translate one character
   * at a time.  This needs to be written carefully so that it works
   * with double-byte character sets. 
   */
  void ap_translate_char(ap_iconv_t *convset, char inchar, char outchar);
  void ap_codepage_close(ap_iconv_t *convset)
  #endif
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif  /* ! APR_ICONV_H */
  
  
  
  
  


cvs commit: apache-1.3 STATUS

2000-01-13 Thread rbb
rbb 00/01/13 05:19:45

  Modified:.STATUS
  Log:
  I tested Brian's Configure patch on HPUX, and it built and served pages, I
  think we finally have a solution that makes everybody happy.  :-)  At the
  very least, it gets my vote.
  
  Revision  ChangesPath
  1.791 +5 -1  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.790
  retrieving revision 1.791
  diff -u -r1.790 -r1.791
  --- STATUS2000/01/13 12:59:37 1.790
  +++ STATUS2000/01/13 13:19:44 1.791
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 2000/01/13 12:59:37 $]
  +  Last modified at [$Date: 2000/01/13 13:19:44 $]
   
   Release:
   
  @@ -41,6 +41,10 @@
 suggested patches break other platforms. So it
 is entirely possible that this fix is the one we
 will ship with.
  +UPDATE: Brian posted a patch which implements SHMOD_SUFFIX_NAME.
  + This has been reported to work on OS/2 and HPUX.
  + <[EMAIL PROTECTED]>
  + Ryan +1
   
   * HPUX build failure without -Ae provided to HPUX compiler as a CFLAG.
 The error message states this flag is required for "long long" types
  
  
  


cvs commit: apache-1.3 STATUS

2000-01-13 Thread rbb
rbb 00/01/13 04:59:39

  Modified:.STATUS
  Log:
  votes
  
  Revision  ChangesPath
  1.790 +2 -2  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.789
  retrieving revision 1.790
  diff -u -r1.789 -r1.790
  --- STATUS2000/01/13 12:47:45 1.789
  +++ STATUS2000/01/13 12:59:37 1.790
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 2000/01/13 12:47:45 $]
  +  Last modified at [$Date: 2000/01/13 12:59:37 $]
   
   Release:
   
  @@ -52,7 +52,7 @@
 a patch which fixes the problems and addresses some concerns.
   Message-ID: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
  - Status: Sascha +1, Jim +1 (untested)
  + Status: Sascha +1, Jim +1 (untested), Ryan +1 (untested)
   
   * Namespace collision is possible with the Expat library. J.
 Clark is aware of this, but we should not wait for an official
  
  
  


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

2000-01-12 Thread rbb
rbb 00/01/12 10:20:45

  Modified:src/main http_protocol.c http_request.c
  Log:
  Fix some remaining problems with SSI's and Windows.  Basically, the
  sendfile stuff doesn't work properly with chuncked data.
  Submitted by: Allan Edwards
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.47  +14 -9 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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- http_protocol.c   2000/01/09 05:18:23 1.46
  +++ http_protocol.c   2000/01/12 18:20:43 1.47
  @@ -2016,16 +2016,21 @@
   {
   long len;
   #ifdef HAVE_SENDFILE
  -ap_bflush(r->connection->client);
  -if (ap_get_filesize(&len, fd) != APR_SUCCESS) {
  -ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -  "ap_send_fd: ap_get_filesize failed.");
  -return 0;
  +if (!r->chunked) {
  +ap_bflush(r->connection->client);
  +if (ap_get_filesize(&len, fd) != APR_SUCCESS) {
  +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +  "ap_send_fd: ap_get_filesize failed.");
  +return 0;
  +}
  +if (iol_sendfile(r->connection->client->iol, fd, len,
  + NULL, 0, 0) != APR_SUCCESS) {
  +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  +  "ap_send_fd: iol_sendfile failed.");
  +}
   }
  -if (iol_sendfile(r->connection->client->iol, fd, len,
  - NULL, 0, 0) != APR_SUCCESS) {
  -ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  -  "ap_send_fd: iol_sendfile failed.");
  +else {
  +len = ap_send_fd_length(fd, r, -1);
   }
   #else
   len = ap_send_fd_length(fd, r, -1);
  
  
  
  1.16  +1 -0  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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_request.c2000/01/10 15:35:49 1.15
  +++ http_request.c2000/01/12 18:20:43 1.16
  @@ -845,6 +845,7 @@
   rnew->server = r->server;
   rnew->request_config = ap_create_request_config(rnew->pool);
   rnew->htaccess   = r->htaccess;
  +rnew->chunked= r->chunked;
   
   ap_set_sub_req_protocol(rnew, r);
   fdir = ap_make_dirstr_parent(rnew->pool, r->filename);
  
  
  


cvs commit: apache-1.3 STATUS

2000-01-11 Thread rbb
rbb 00/01/11 06:41:57

  Modified:.STATUS
  Log:
  I just submitted a message about this problem with a patch, but I think it's
  a showstopper.  Sorry  :-)
  
  Revision  ChangesPath
  1.783 +7 -1  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.782
  retrieving revision 1.783
  diff -u -r1.782 -r1.783
  --- STATUS2000/01/11 12:47:10 1.782
  +++ STATUS2000/01/11 14:41:56 1.783
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 2000/01/11 12:47:10 $]
  +  Last modified at [$Date: 2000/01/11 14:41:56 $]
   
   Release:
   
  @@ -37,6 +37,12 @@
 out. Jim has done this. With this fix, we no longer
 consider this a show-stopper, but we are leaving this here
 so people look at this and double check.
  +
  +* HPUX build failure without -Ae provided to HPUX compiler as a CFLAG.
  +  The error message states this flag is required for "long long" types
  +  to be recognized by HPUX's compiler
  +Ryan submitted a patch for this problem
  +STATUS:  Ryan +1
   
   RELEASE NON-SHOWSTOPPERS BUT WOULD BE REAL NICE TO WRAP THESE UP:
   
  
  
  


cvs commit: apache-1.3 STATUS

2000-01-11 Thread rbb
rbb 00/01/11 04:47:12

  Modified:.STATUS
  Log:
  Update STATUS
  
  Revision  ChangesPath
  1.782 +2 -2  apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.781
  retrieving revision 1.782
  diff -u -r1.781 -r1.782
  --- STATUS2000/01/10 21:32:58 1.781
  +++ STATUS2000/01/11 12:47:10 1.782
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 2000/01/10 21:32:58 $]
  +  Last modified at [$Date: 2000/01/11 12:47:10 $]
   
   Release:
   
  @@ -68,7 +68,7 @@
   * Ken's patch to allow for umask settings for suExec. Suggested
 by PR#4178.
   Message-ID: <[EMAIL PROTECTED]>
  -Status: Ken +1
  +Status: Ken +1, Ryan +1
   
   * Andrew Ford's patch (1999/12/05) to add absolute times to mod_expires
Message-ID: <[EMAIL PROTECTED]>
  
  
  


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

2000-01-10 Thread rbb
rbb 00/01/10 08:39:57

  Modified:src/lib/apr/file_io/unix filestat.c
  Log:
  Cleanup small bug in new filetype_from_mode, we just need to make sure
  we return the value we set.  This makes the new code work properly on Unix.
  
  Revision  ChangesPath
  1.11  +1 -0  apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- filestat.c2000/01/10 15:35:47 1.10
  +++ filestat.c2000/01/10 16:39:56 1.11
  @@ -78,6 +78,7 @@
   if (S_ISSOCK(mode))
   type = APR_SOCK;
   #endif
  +return type;
   }
   
   /* ***APRDOC
  
  
  


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

2000-01-09 Thread rbb
rbb 00/01/09 12:58:27

  Modified:src/lib/apr/include apr_portable.h
   src/lib/apr/time/unix Makefile.in time.c
  Log:
  add the ap_get_os_*_time funcs after Dean's time re-write.
  
  Revision  ChangesPath
  1.18  +12 -6 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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- apr_portable.h1999/12/06 18:19:34 1.17
  +++ apr_portable.h2000/01/09 20:58:22 1.18
  @@ -91,7 +91,8 @@
   typedef HANDLEap_os_thread_t;
   typedef PROCESS_INFORMATION   ap_os_proc_t;
   typedef DWORD ap_os_threadkey_t; 
  -typedef SYSTEMTIMEap_os_time_t;
  +typedef FILETIME  ap_os_imp_time_t;
  +typedef SYSTEMTIMEap_os_exp_time_t;
   
   #elif defined(OS2)
   #define INCL_DOS
  @@ -103,7 +104,8 @@
   typedef TID   ap_os_thread_t;
   typedef PID   ap_os_proc_t;
   typedef PULONGap_os_threadkey_t; 
  -typedef struct timevalap_os_time_t;
  +typedef struct timevalap_os_imp_time_t;
  +typedef struct tm ap_os_exp_time_t;
   
   #elif defined(BEOS)
   #include 
  @@ -124,7 +126,8 @@
   typedef thread_id ap_os_thread_t;
   typedef thread_id ap_os_proc_t;
   typedef int   ap_os_threadkey_t;
  -typedef struct timevalap_os_time_t;
  +typedef struct timevalap_os_imp_time_t;
  +typedef struct tm ap_os_exp_time_t;
   
   #else
   /* Any other OS should go above this one.  This is the lowest common
  @@ -173,7 +176,8 @@
   typedef pthread_key_t ap_os_threadkey_t;
   #endif
   typedef pid_t ap_os_proc_t;
  -typedef struct timevalap_os_time_t;
  +typedef struct timevalap_os_imp_time_t;
  +typedef struct tm ap_os_exp_time_t;
   #endif
   
   ap_status_t ap_get_os_file(ap_os_file_t *, ap_file_t *); 
  @@ -181,7 +185,8 @@
   ap_status_t ap_get_os_sock(ap_os_sock_t *, ap_socket_t *);
   ap_status_t ap_get_os_lock(ap_os_lock_t *, ap_lock_t *); 
   ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *); 
  -ap_status_t ap_get_os_time(ap_os_time_t **, ap_time_t *); 
  +ap_status_t ap_get_os_exp_time(ap_os_exp_time_t **, ap_exploded_time_t *);   
  
  +ap_status_t ap_get_os_imp_time(ap_os_imp_time_t **, ap_time_t *); 
   #if APR_HAS_THREADS
   ap_status_t ap_get_os_thread(ap_os_thread_t *, ap_thread_t *);
   ap_status_t ap_get_os_threadkey(ap_os_threadkey_t *, ap_key_t *);
  @@ -192,7 +197,8 @@
   ap_status_t ap_put_os_sock(ap_socket_t **, ap_os_sock_t *, ap_context_t *);
   ap_status_t ap_put_os_lock(ap_lock_t **, ap_os_lock_t *, ap_context_t *); 
   ap_status_t ap_put_os_proc(ap_proc_t **, ap_os_proc_t *, ap_context_t *); 
  -ap_status_t ap_put_os_time(ap_time_t **, ap_os_time_t *, ap_context_t *); 
  +ap_status_t ap_put_os_imp_time(ap_time_t *, ap_os_imp_time_t **, 
ap_context_t *); 
  +ap_status_t ap_put_os_exp_time(ap_exploded_time_t *, ap_os_exp_time_t **, 
ap_context_t *); 
   #if APR_HAS_THREADS
   ap_status_t ap_put_os_thread(ap_thread_t **, ap_os_thread_t *, ap_context_t 
*);
   ap_status_t ap_put_os_threadkey(ap_key_t **, ap_os_threadkey_t *, 
ap_context_t *);
  
  
  
  1.11  +12 -12apache-2.0/src/lib/apr/time/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/Makefile.in,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Makefile.in   2000/01/09 05:18:21 1.10
  +++ Makefile.in   2000/01/09 20:58:24 1.11
  @@ -50,15 +50,15 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  -time.o: time.c atime.h ../../include/apr_config.h \
  - ../../include/apr_time.h ../../include/apr_general.h \
  - ../../include/apr.h ../../include/apr_errno.h ../../include/apr_lib.h \
  - ../../include/apr_file_io.h ../../include/apr_thread_proc.h \
  - ../../include/apr_portable.h ../../include/apr_network_io.h \
  - ../../include/apr_lock.h
  -timestr.o: timestr.c atime.h ../../include/apr_config.h \
  - ../../include/apr_time.h ../../include/apr_general.h \
  - ../../include/apr.h ../../include/apr_errno.h ../../include/apr_lib.h \
  - ../../include/apr_file_io.h ../../include/apr_thread_proc.h \
  - ../../include/apr_portable.h ../../include/apr_network_io.h \
  - ../../include/apr_lock.h
  +time.o: time.c atime.h $(INCDIR)/apr_config.h \
  + $(INCDIR)/apr_time.h $(INCDIR)/apr_general.h \
  + $(INCDIR)/apr.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h \
  + $(INCDIR)/apr_file_io.h $(INCDIR)/apr_thread_proc.h \
  + $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
  + $(INCDIR)/apr_lock.h
  +timestr.o: time

cvs commit: apache-2.0/src/modules/standard mod_autoindex.c mod_rewrite.c mod_usertrack.c

2000-01-07 Thread rbb
rbb 00/01/07 12:38:15

  Modified:src/modules/standard mod_autoindex.c mod_rewrite.c
mod_usertrack.c
  Log:
  Move some modules over to using ap_time_t instead of struct tm.
  
  Revision  ChangesPath
  1.18  +6 -3  apache-2.0/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_autoindex.c   2000/01/06 19:19:34 1.17
  +++ mod_autoindex.c   2000/01/07 20:38:05 1.18
  @@ -1273,7 +1273,7 @@
   autoindex_config_rec *d, request_rec *r,
   int autoindex_opts, char keyid, char direction)
   {
  -int x;
  +int x, rv;
   char *name = r->uri;
   char *tp;
   int static_columns = (autoindex_opts & SUPPRESS_COLSORT);
  @@ -1404,8 +1404,11 @@
if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
if (ar[x]->lm != -1) {
char time_str[MAX_STRING_LEN];
  - struct tm *ts = localtime(&ar[x]->lm);
  - strftime(time_str, MAX_STRING_LEN, "%d-%b-%Y %H:%M  ", ts);
  + ap_time_t *ts = NULL;
  +ap_make_time(&ts, r->pool);
  +ap_set_ansitime(ts, ar[x]->lm);
  + ap_strftime(time_str, &rv, MAX_STRING_LEN, 
  +"%d-%b-%Y %H:%M  ", ts);
ap_rputs(time_str, r);
}
else {
  
  
  
  1.10  +32 -19apache-2.0/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_rewrite.c 2000/01/07 15:50:40 1.9
  +++ mod_rewrite.c 2000/01/07 20:38:06 1.10
  @@ -3556,8 +3556,14 @@
   {
   const char *result;
   char resultbuf[LONG_STRING_LEN];
  -time_t tc;
  -struct tm *tm;
  +ap_time_t *tm = NULL;
  +ap_int32_t tmvalue = 0;
  +ap_int32_t year;
  +ap_int32_t mon;
  +ap_int32_t mday;
  +ap_int32_t hour;
  +ap_int32_t min;
  +ap_int32_t sec;
   request_rec *rsub;
   #ifndef WIN32
   struct passwd *pw;
  @@ -3667,42 +3673,49 @@
   
   /* underlaying Unix system stuff */
   else if (strcasecmp(var, "TIME_YEAR") == 0) {
  -tc = time(NULL);
  -tm = localtime(&tc);
  +ap_make_init_time(&tm, r->pool);
  +ap_explode_time(tm, APR_LOCALTIME);
  +ap_get_year(tm, &year);
   ap_snprintf(resultbuf, sizeof(resultbuf), "%02d%02d",
  -(tm->tm_year / 100) + 19, tm->tm_year % 100);
  +(year / 100) + 19, year % 100);
   result = resultbuf;
   }
   #define MKTIMESTR(format, tmfield) \
  -tc = time(NULL); \
  -tm = localtime(&tc); \
  -ap_snprintf(resultbuf, sizeof(resultbuf), format, tm->tmfield); \
  +ap_make_init_time(&tm, r->pool); \
  +ap_explode_time(tm, APR_LOCALTIME); \
  +ap_get_tmfield(tm, &tmvalue); \
  +ap_snprintf(resultbuf, sizeof(resultbuf), format, tmvalue); \
   result = resultbuf;
   else if (strcasecmp(var, "TIME_MON") == 0) {
  -MKTIMESTR("%02d", tm_mon+1)
  +MKTIMESTR("%02d", mon+1)
   }
   else if (strcasecmp(var, "TIME_DAY") == 0) {
  -MKTIMESTR("%02d", tm_mday)
  +MKTIMESTR("%02d", mday)
   }
   else if (strcasecmp(var, "TIME_HOUR") == 0) {
  -MKTIMESTR("%02d", tm_hour)
  +MKTIMESTR("%02d", hour)
   }
   else if (strcasecmp(var, "TIME_MIN") == 0) {
  -MKTIMESTR("%02d", tm_min)
  +MKTIMESTR("%02d", min)
   }
   else if (strcasecmp(var, "TIME_SEC") == 0) {
  -MKTIMESTR("%02d", tm_sec)
  +MKTIMESTR("%02d", sec)
   }
   else if (strcasecmp(var, "TIME_WDAY") == 0) {
  -MKTIMESTR("%d", tm_wday)
  +MKTIMESTR("%d", wday)
   }
   else if (strcasecmp(var, "TIME") == 0) {
  -tc = time(NULL);
  -tm = localtime(&tc);
  +ap_make_init_time(&tm, r->pool);
  +ap_explode_time(tm, APR_LOCALTIME);
  +ap_get_year(tm, &year);
  +ap_get_mon(tm, &mon);
  +ap_get_mday(tm, &mday);
  +ap_get_hour(tm, &hour);
  +ap_get_min(tm, &min);
  +ap_get_sec(tm, &sec);
   ap_snprintf(resultbuf, s

cvs commit: apache-2.0/src/modules/standard mod_cern_meta.c mod_expires.c mod_mime_magic.c mod_speling.c

2000-01-07 Thread rbb
rbb 00/01/07 07:52:25

  Modified:src/modules/standard mod_cern_meta.c mod_expires.c
mod_mime_magic.c mod_speling.c
  Log:
  Fix the rest of the modules to work with the new APR stat structure.
  
  Revision  ChangesPath
  1.6   +2 -2  apache-2.0/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_cern_meta.c   1999/12/31 20:32:35 1.5
  +++ mod_cern_meta.c   2000/01/07 15:52:18 1.6
  @@ -309,12 +309,12 @@
   
   /* if ./.web/$1.meta exists then output 'asis' */
   
  -if (r->finfo.st_mode == 0) {
  +if (r->finfo.protection == 0) {
return DECLINED;
   };
   
   /* is this a directory? */
  -if (S_ISDIR(r->finfo.st_mode) || r->uri[strlen(r->uri) - 1] == '/') {
  +if (S_ISDIR(r->finfo.protection) || r->uri[strlen(r->uri) - 1] == '/') {
return DECLINED;
   };
   
  
  
  
  1.7   +3 -3  apache-2.0/src/modules/standard/mod_expires.c
  
  Index: mod_expires.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_expires.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_expires.c 2000/01/06 19:19:36 1.6
  +++ mod_expires.c 2000/01/07 15:52:18 1.7
  @@ -403,7 +403,7 @@
   expires_dir_config *conf;
   char *code;
   char *timestr = NULL;
  -ap_int64_t base;
  +ap_ansi_time_t base;
   time_t additional;
   time_t expires;
   ap_time_t *finaltime = NULL;
  @@ -453,13 +453,13 @@
   
   switch (code[0]) {
   case 'M':
  - if (r->finfo.st_mode == 0) { 
  + if (r->finfo.protection == 0) { 
/* file doesn't exist on disk, so we can't do anything based on
 * modification time.  Note that this does _not_ log an error.
 */
return DECLINED;
}
  -base = r->finfo.st_mtime;
  +ap_get_ansitime(r->finfo.mtime, &base);
   additional = atoi(&code[1]);
   break;
   case 'A':
  
  
  
  1.12  +4 -4  apache-2.0/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_mime_magic.c  2000/01/04 19:01:02 1.11
  +++ mod_mime_magic.c  2000/01/07 15:52:18 1.12
  @@ -1448,7 +1448,7 @@
*/
   static int fsmagic(request_rec *r, const char *fn)
   {
  -switch (r->finfo.st_mode & S_IFMT) {
  +switch (r->finfo.protection & S_IFMT) {
   case S_IFDIR:
magic_rsl_puts(r, DIR_MAGIC_TYPE);
return DONE;
  @@ -1497,14 +1497,14 @@
break;
   default:
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO | APLOG_ERR, 0, r,
  - MODNAME ": invalid mode 0%o.", (unsigned 
int)r->finfo.st_mode);
  + MODNAME ": invalid mode 0%o.", (unsigned 
int)r->finfo.protection);
return HTTP_INTERNAL_SERVER_ERROR;
   }
   
   /*
* regular file, check next possibility
*/
  -if (r->finfo.st_size == 0) {
  +if (r->finfo.size == 0) {
magic_rsl_puts(r, MIME_TEXT_UNKNOWN);
return DONE;
   }
  @@ -2448,7 +2448,7 @@
   magic_server_config_rec *conf;
   
   /* the file has to exist */
  -if (r->finfo.st_mode == 0 || !r->filename) {
  +if (r->finfo.protection == 0 || !r->filename) {
return DECLINED;
   }
   
  
  
  
  1.7   +1 -1  apache-2.0/src/modules/standard/mod_speling.c
  
  Index: mod_speling.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_speling.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_speling.c 1999/10/23 21:20:16 1.6
  +++ mod_speling.c 2000/01/07 15:52:21 1.7
  @@ -244,7 +244,7 @@
   }
   
   /* We've already got a file of some kind or another */
  -if (r->proxyreq || (r->finfo.st_mode != 0)) {
  +if (r->proxyreq || (r->finfo.protection != 0)) {
   return DECLINED;
   }
   
  
  
  


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

2000-01-07 Thread rbb
rbb 00/01/07 07:50:42

  Modified:src/modules/standard mod_rewrite.c
  Log:
  Fix mod_rewrite to work with the new APR stat structure.
  Submitted by:  Paul Reder
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.9   +4 -4  apache-2.0/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_rewrite.c 2000/01/04 19:01:04 1.8
  +++ mod_rewrite.c 2000/01/07 15:50:40 1.9
  @@ -3762,8 +3762,8 @@
   /* file stuff */
   else if (strcasecmp(var, "SCRIPT_USER") == 0) {
   result = "";
  -if (r->finfo.st_mode != 0) {
  -if ((pw = getpwuid(r->finfo.st_uid)) != NULL) {
  +if (r->finfo.protection != 0) {
  +if ((pw = getpwuid(r->finfo.user)) != NULL) {
   result = pw->pw_name;
   }
   }
  @@ -3777,8 +3777,8 @@
   }
   else if (strcasecmp(var, "SCRIPT_GROUP") == 0) {
   result = "";
  -if (r->finfo.st_mode != 0) {
  -if ((gr = getgrgid(r->finfo.st_gid)) != NULL) {
  +if (r->finfo.protection != 0) {
  +if ((gr = getgrgid(r->finfo.group)) != NULL) {
   result = gr->gr_name;
   }
   }
  
  
  


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

2000-01-06 Thread rbb
rbb 00/01/06 12:20:30

  Modified:src/lib/apr/include apr_time.h
   src/lib/apr/time/unix time.c
  Log:
  Add a new time function which creates a new time instance and initializes
  the current time.  This augments the ap_make_time ap_current_time
  combination that we already have because it does the same thing in one
  function.  Both methods are necessary, because more often than not, we
  create a time instance, but don't fill it out with the current time.
  
  Revision  ChangesPath
  1.10  +1 -0  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- apr_time.h2000/01/06 19:19:26 1.9
  +++ apr_time.h2000/01/06 20:20:21 1.10
  @@ -76,6 +76,7 @@
   
   /* Function Definitions */
   ap_status_t ap_make_time(ap_time_t **, ap_context_t *);
  +ap_status_t ap_make_init_time(ap_time_t **, ap_context_t *);
   ap_status_t ap_current_time(ap_time_t *);
   ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e);
   ap_status_t ap_implode_time(ap_time_t *);
  
  
  
  1.15  +22 -1 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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- time.c1999/12/21 15:16:36 1.14
  +++ time.c2000/01/06 20:20:25 1.15
  @@ -58,7 +58,7 @@
   
   /* ***APRDOC
* ap_status_t ap_make_time(ap_context_t *, ap_time_t *)
  - *Create a time entity.
  + *Create an empty time entity.
* arg 1) The context to operate on.
* arg 2) The new time entity to create.
*/
  @@ -74,6 +74,27 @@
   (*new)->explodedtime = ap_palloc(cont, sizeof(struct tm));
   (*new)->time_ex = 0;
   (*new)->currtime = NULL;
  +return APR_SUCCESS;
  +}
  +
  +/* ***APRDOC
  + * ap_status_t ap_make_init_time(ap_context_t *, ap_time_t *)
  + *Create a time entity and fill it out with the current time.
  + * arg 1) The context to operate on.
  + * arg 2) The new time entity to create.
  + */
  +ap_status_t ap_make_init_time(struct atime_t **new, ap_context_t *cont)
  +{
  +(*new) = (struct atime_t *)ap_palloc(cont, sizeof(struct atime_t));
  +
  +if ((*new) == NULL) {
  +return APR_ENOMEM;
  +}
  +
  +(*new)->cntxt = cont;
  +(*new)->explodedtime = ap_palloc(cont, sizeof(struct tm));
  +(*new)->time_ex = 0;
  +gettimeofday((*new)->currtime, NULL);
   return APR_SUCCESS;
   }
   
  
  
  


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

2000-01-06 Thread rbb
rbb 00/01/06 11:19:42

  Modified:src/lib/apr/file_io/unix filestat.c
   src/lib/apr/include apr_time.h
   src/lib/apr/test testtime.c
   src/lib/apr/time/unix access.c
   src/modules/standard mod_autoindex.c mod_expires.c
mod_include.c mod_usertrack.c
  Log:
  Next pass at the time functions.  This defines an ap_ansi_time_t which has
  a specific format (seconds since 0:00:00 Jan 1, 1970).  I also renamed the
  (get|set)_curtime functions to (get|set)ansitime.  This should make more
  sense, and be a bit more intuitive.
  
  Revision  ChangesPath
  1.8   +6 -6  apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- filestat.c2000/01/06 14:43:08 1.7
  +++ filestat.c2000/01/06 19:19:25 1.8
  @@ -75,11 +75,11 @@
   finfo->size = info.st_size;
   finfo->inode = info.st_ino;
   ap_make_time(&finfo->atime, thefile->cntxt);
  -ap_set_curtime(finfo->atime, info.st_atime);
  +ap_set_ansitime(finfo->atime, info.st_atime);
   ap_make_time(&finfo->mtime, thefile->cntxt);
  -ap_set_curtime(finfo->mtime, info.st_mtime);
  +ap_set_ansitime(finfo->mtime, info.st_mtime);
   ap_make_time(&finfo->ctime, thefile->cntxt);
  -ap_set_curtime(finfo->ctime, info.st_ctime);
  +ap_set_ansitime(finfo->ctime, info.st_ctime);
   
   return APR_SUCCESS;
   }
  @@ -108,11 +108,11 @@
   finfo->size = info.st_size;
   finfo->inode = info.st_ino;
   ap_make_time(&finfo->atime, cont);
  -ap_set_curtime(finfo->atime, info.st_atime);
  +ap_set_ansitime(finfo->atime, info.st_atime);
   ap_make_time(&finfo->mtime, cont);
  -ap_set_curtime(finfo->mtime, info.st_mtime);
  +ap_set_ansitime(finfo->mtime, info.st_mtime);
   ap_make_time(&finfo->ctime, cont);
  -ap_set_curtime(finfo->ctime, info.st_ctime);
  +ap_set_ansitime(finfo->ctime, info.st_ctime);
   return APR_SUCCESS;
   }
   else {
  
  
  
  1.9   +6 -2  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apr_time.h1999/12/31 05:09:20 1.8
  +++ apr_time.h2000/01/06 19:19:26 1.9
  @@ -65,6 +65,10 @@
   
   typedef enum {APR_LOCALTIME, APR_UTCTIME} ap_timetype_e;
   
  +/* ap_ansi_time_t is defined as the number of seconds since
  + * 0:00:00 01/01/70.
  + */
  +typedef ap_int64_t   ap_ansi_time_t;
   typedef struct atime_t   ap_time_t;
   
   API_VAR_IMPORT const char ap_month_snames[12][4];
  @@ -80,7 +84,7 @@
   ap_status_t ap_strftime(char *s, ap_size_t *retsize, ap_size_t max, const 
char *format, ap_time_t *tm);
   
   /* accessor functions */
  -ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *);
  +ap_status_t ap_get_ansitime(ap_time_t *, ap_ansi_time_t *);
   ap_status_t ap_timediff(ap_time_t *, ap_time_t *, ap_int32_t *);
   
   ap_status_t ap_get_sec(ap_time_t *, ap_int32_t *);
  @@ -91,7 +95,7 @@
   ap_status_t ap_get_year(ap_time_t *, ap_int32_t *);
   ap_status_t ap_get_wday(ap_time_t *, ap_int32_t *);
   
  -ap_status_t ap_set_curtime(ap_time_t *, ap_int64_t);
  +ap_status_t ap_set_ansitime(ap_time_t *, ap_ansi_time_t);
   ap_status_t ap_set_sec(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_min(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_hour(ap_time_t *, ap_int32_t);
  
  
  
  1.4   +2 -2  apache-2.0/src/lib/apr/test/testtime.c
  
  Index: testtime.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testtime.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- testtime.c1999/10/04 16:37:25 1.3
  +++ testtime.c2000/01/06 19:19:28 1.4
  @@ -165,8 +165,8 @@
   fprintf(stdout, "OK\n");
   
   fprintf(stdout, "\tComparing two time values...");
  -ap_get_curtime(time, &t1);
  -ap_get_curtime(time2, &t2);
  +ap_get_ansitime(time, &t1);
  +ap_get_ansitime(time2, &t2);
   if ((t1 == -1) || (t2 == -1) || (t1 != t2)) {
   fprintf(stderr, "Values don't match\n");
   exit(-1);
  
  
  
  1.10  +4 -4  apache-2.0/src/lib/apr/time/unix/access.c
  
  Index: access.c
  ===

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

2000-01-06 Thread rbb
rbb 00/01/06 11:16:08

  Modified:src/main http_request.c
  Log:
  Fix a minor bug that would cause us to return FORBIDDEN for all requests.
  
  Revision  ChangesPath
  1.13  +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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- http_request.c2000/01/06 14:43:27 1.12
  +++ http_request.c2000/01/06 19:16:07 1.13
  @@ -266,7 +266,7 @@
   if (cp != end)
   *cp = '/';
   
  -if (rv != APR_SUCCESS) {
  +if (rv == APR_SUCCESS) {
   /*
* Aha!  Found something.  If it was a directory, we will search
* contents of that directory for a multi_match, so the PATH_INFO
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_actions.c mod_asis.c mod_autoindex.c mod_cgi.c mod_dir.c mod_include.c mod_mime.c mod_negotiation.c mod_userdir.c

2000-01-06 Thread rbb
rbb 00/01/06 06:43:51

  Modified:src/include httpd.h
   src/lib/apr/file_io/unix fileacc.c filedup.c fileio.h
filestat.c open.c pipe.c readwrite.c
   src/lib/apr/include apr_file_io.h
   src/lib/apr/test ab_apr.c testmmap.c
   src/main http_config.c http_core.c http_log.c
http_protocol.c http_request.c util.c
   src/modules/standard mod_actions.c mod_asis.c
mod_autoindex.c mod_cgi.c mod_dir.c mod_include.c
mod_mime.c mod_negotiation.c mod_userdir.c
  Log:
  Separate the stat structure from the file structure and use ap_stat and
  ap_getfileinfo in apache.
  
  Revision  ChangesPath
  1.17  +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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- httpd.h   1999/12/21 21:41:43 1.16
  +++ httpd.h   2000/01/06 14:43:00 1.17
  @@ -768,7 +768,7 @@
   char *filename;
   char *path_info;
   char *args;  /* QUERY_ARGS, if any */
  -struct stat finfo;   /* ST_MODE set to zero if no such file 
*/
  +ap_finfo_t finfo;/* ST_MODE set to zero if no such file 
*/
   uri_components parsed_uri;   /* components of uri, dismantled */
   
   /* Various other config info which may change with .htaccess files
  
  
  
  1.13  +16 -130   apache-2.0/src/lib/apr/file_io/unix/fileacc.c
  
  Index: fileacc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/fileacc.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- fileacc.c 1999/12/03 15:18:22 1.12
  +++ fileacc.c 2000/01/06 14:43:05 1.13
  @@ -104,144 +104,30 @@
   }
   
   /* ***APRDOC
  - * ap_status_t ap_get_filesize(ap_ssize_t *, ap_file_t *)
  - *Return the size of the current file.
  - * arg 1) The currently open file.
  - * arg 2) The size of the file.  
  - */ 
  -ap_status_t ap_get_filesize(ap_ssize_t *size, struct file_t *file)
  -{
  -if (file != NULL) {
  -if (file->stated == 0) {
  -ap_getfileinfo(file);
  -}
  -*size = file->size;
  -return APR_SUCCESS;
  -}
  -else {
  -*size = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_get_fileperms(ap_fileperms_t *, ap_file_t *)
  - *Return the permissions of the current file.
  - * arg 1) The currently open file.
  - * arg 2) The permissions of the file.  
  - */ 
  -ap_status_t ap_get_fileperms(ap_fileperms_t *perm, struct file_t *file)
  -{
  -if (file != NULL) {
  -if (file->stated == 0) {
  -ap_getfileinfo(file);
  -}
  -*perm = file->protection;
  -return APR_SUCCESS;
  -}
  -else {
  -*perm = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_get_fileatime(time_t *, ap_file_t *)
  - *Return the last access time of the current file.
  - * arg 1) The currently open file.
  - * arg 2) The last access time of the file.  
  - */ 
  -ap_status_t ap_get_fileatime(time_t *atime, struct file_t *file)
  -{
  -if (file != NULL) {
  -if (file->stated == 0) {
  -ap_getfileinfo(file);
  -}
  -*atime = file->atime;
  -return APR_SUCCESS;
  -}
  -else {
  -*atime = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_get_filectime(time_t *, ap_file_t *)
  - *Return the time of the last change to the current file.
  - * arg 1) The currently open file.
  - * arg 2) The last change time of the file.  
  - */ 
  -ap_status_t ap_get_filectime(time_t *ptime, struct file_t *file)
  -{
  -if (file != NULL) {
  -if (file->stated == 0) {
  -ap_getfileinfo(file);
  -}
  -*ptime = file->ctime;
  -return APR_SUCCESS;
  -}
  -else {
  -*ptime = -1;
  -return APR_ENOFILE;
  -}
  -}
  -
  -/* ***APRDOC
  - * ap_status_t ap_get_filemtime(time_t *, ap_file_t *)
  - *Return the last modified time of the current file.
  - * arg 1) The currently open file.
  - * arg 2) The last modified time of the file.  
  - */ 
  -ap_status_t ap_get_filemtime(time_t *mt

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

2000-01-05 Thread rbb
rbb 00/01/05 05:08:00

  Modified:src/lib/apr/file_io/win32 fileio.h
  Log:
  Add some comments to clear up some of the fields to windows' ap_file_t.
  
  Revision  ChangesPath
  1.4   +15 -3 apache-2.0/src/lib/apr/file_io/win32/fileio.h
  
  Index: fileio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/fileio.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- fileio.h  1999/12/09 21:00:06 1.3
  +++ fileio.h  2000/01/05 13:07:59 1.4
  @@ -83,16 +83,28 @@
   #include "apr_file_io.h"
   #include "apr_errno.h"
   
  +/* quick run-down of fields in windows' ap_file_t structure that may have 
  + * obvious uses.
  + * fname --  the filename as passed to the open call.
  + * dwFileAttricutes -- Attributes used to open the file.
  + * demonfname -- the canonicalized filename.  Used to store the result from
  + *   ap_os_canonicalize_filename.
  + * lowerdemonfname -- inserted at Ken Parzygnat's request, because of the
  + *ugly way windows deals with case in the filesystem.
  + * append -- Windows doesn't support the append concept when opening files.
  + *   APR needs to keep track of this, and always make sure we append
  + *   correctly when writing to a file with this flag set TRUE.
  + *  
   struct file_t {
   ap_context_t *cntxt;
   HANDLE filehand;
   char *fname;
   DWORD dwFileAttributes;
  -char *demonfname; /* Is this necessary */
  -char *lowerdemonfname; /* Is this necessary */
  +char *demonfname; 
  +char *lowerdemonfname; 
   int buffered;
   int stated;
  -int append; /* is this necessary?*/
  +int append; 
   int eof_hit;
   off_t size;
   time_t atime;
  
  
  


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

2000-01-04 Thread rbb
rbb 00/01/04 12:46:49

  Modified:src/lib/apr/file_io/unix filestat.c
  Log:
  If ap_stat allocates space for a file, then ap_stat also has to register
  a cleanup.
  
  Revision  ChangesPath
  1.6   +3 -0  apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- filestat.c2000/01/04 19:00:42 1.5
  +++ filestat.c2000/01/04 20:46:48 1.6
  @@ -106,6 +106,9 @@
   if ((*thefile) == NULL) {
   return APR_ENOMEM;
   }
  +(*thefile)->cntxt = cont;
  +ap_register_cleanup((*thefile)->cntxt, (void *)(*thefile),
  +file_cleanup, ap_null_cleanup);
   (*thefile)->fname = ap_pstrdup(cont, fname);
   (*thefile)->filehand = NULL;
   (*thefile)->filedes = -1;
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_asis.c mod_autoindex.c mod_cgi.c mod_cgid.c mod_include.c mod_mime_magic.c mod_negotiation.c mod_rewrite.c

2000-01-04 Thread rbb
rbb 00/01/04 11:01:13

  Modified:src/lib/apr/file_io/unix filestat.c open.c
   src/lib/apr/include apr_file_io.h
   src/lib/apr/test abc.c testfile.c testmmap.c testproc.c
   src/main buff.c http_config.c http_log.c util.c
   src/modules/experimental mod_mmap_static.c
   src/modules/mpm/prefork prefork.c
   src/modules/standard mod_asis.c mod_autoindex.c mod_cgi.c
mod_cgid.c mod_include.c mod_mime_magic.c
mod_negotiation.c mod_rewrite.c
  Log:
  Initialize all ap_file_t's to NULL.  This allows ap_open and ap_stat to
  work together without causing memory leaks.
  
  Revision  ChangesPath
  1.5   +1 -1  apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- filestat.c2000/01/03 20:57:20 1.4
  +++ filestat.c2000/01/04 19:00:42 1.5
  @@ -92,7 +92,7 @@
* arg 2) The name of the file to stat.
* arg 3) the context to use to allocate the new file. 
*/ 
  -ap_status_t ap_stat(struct file_t **thefile, char *fname, ap_context_t *cont)
  +ap_status_t ap_stat(struct file_t **thefile, const char *fname, ap_context_t 
*cont)
   {
   struct stat info;
   int rv = stat(fname, &info);
  
  
  
  1.30  +3 -1  apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- open.c1999/12/31 01:16:53 1.29
  +++ open.c2000/01/04 19:00:42 1.30
  @@ -104,7 +104,9 @@
   int oflags = 0;
   char *buf_oflags;
   
  -(*new) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
  +if ((*new) == NULL) {
  +(*new) = (struct file_t *)ap_palloc(cont, sizeof(struct file_t));
  +}
   
   (*new)->cntxt = cont;
   (*new)->oflags = oflags;
  
  
  
  1.25  +1 -1  apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- apr_file_io.h 2000/01/03 19:47:44 1.24
  +++ apr_file_io.h 2000/01/04 19:00:44 1.25
  @@ -132,7 +132,7 @@
   ap_status_t ap_make_iov(ap_iovec_t **, struct iovec *, ap_context_t *);
   ap_status_t ap_dupfile(ap_file_t **, ap_file_t *);
   ap_status_t ap_getfileinfo(ap_file_t *);
  -ap_status_t ap_stat(ap_file_t **thefile, char *fname, ap_context_t *cont);
  +ap_status_t ap_stat(ap_file_t **thefile, const char *fname, ap_context_t 
*cont);
   ap_status_t ap_seek(ap_file_t *, ap_seek_where_t, ap_off_t *);
   
   ap_status_t ap_opendir(ap_dir_t **, const char *, ap_context_t *);
  
  
  
  1.6   +1 -1  apache-2.0/src/lib/apr/test/abc.c
  
  Index: abc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/abc.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- abc.c 1999/10/14 14:36:35 1.5
  +++ abc.c 2000/01/04 19:00:47 1.6
  @@ -6,7 +6,7 @@
   
   int main(int argc, char *argv[])
   {
  -ap_file_t *fd;
  +ap_file_t *fd = NULL;
   char ch;
   int status = 0;
   ap_context_t *context;
  
  
  
  1.8   +2 -2  apache-2.0/src/lib/apr/test/testfile.c
  
  Index: testfile.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testfile.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- testfile.c1999/10/15 14:20:19 1.7
  +++ testfile.c2000/01/04 19:00:49 1.8
  @@ -210,7 +210,7 @@
   
   int test_filedel(ap_context_t *context)
   {
  -ap_file_t *thefile;
  +ap_file_t *thefile = NULL;
   ap_int32_t flag = APR_READ | APR_WRITE | APR_CREATE;
   ap_status_t stat;
 
  @@ -238,7 +238,7 @@
   int testdirs(ap_context_t *context)
   {
   ap_dir_t *temp;  
  -ap_file_t *file;
  +ap_file_t *file = NULL;
   ap_ssize_t bytes;
   ap_filetype_e type;
   char *fname;
  
  
  
  1.5   +1 -1  apache-2.0/src/lib/apr/test/testmmap.c
  
  Index: testmmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testmmap.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- testmmap.c1999/12/15 12:20:40 1.4
  +++ testmmap.c2000/01/04 19:00:49 1.5
 

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

2000-01-03 Thread rbb
rbb 00/01/03 12:57:25

  Modified:src/lib/apr/file_io/unix filestat.c
  Log:
  Fix the ap_stat function so we don't leak memory if we are passed an already
  filled out file structure.  This leaves us vulnerable to having a file
  structure where the information isn't for the file the strcture points to,
  but I think that's better than constantly allocating memory and possibly
  leaking.
  
  Revision  ChangesPath
  1.4   +10 -5 apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- filestat.c2000/01/03 19:47:43 1.3
  +++ filestat.c2000/01/03 20:57:20 1.4
  @@ -98,13 +98,18 @@
   int rv = stat(fname, &info);
   
   if (rv == 0) {
  -(*thefile) = ap_pcalloc(cont, sizeof(struct file_t));
   if ((*thefile) == NULL) {
  -return APR_ENOMEM;
  +/* Only allocate more space and initialize the object if it is
  + * NULL when passed in.
  + */ 
  +(*thefile) = ap_pcalloc(cont, sizeof(struct file_t));
  +if ((*thefile) == NULL) {
  +return APR_ENOMEM;
  +}
  +(*thefile)->fname = ap_pstrdup(cont, fname);
  +(*thefile)->filehand = NULL;
  +(*thefile)->filedes = -1;
   }
  -(*thefile)->fname = ap_pstrdup(cont, fname);
  -(*thefile)->filehand = NULL;
  -(*thefile)->filedes = -1;
   (*thefile)->protection = info.st_mode;
   (*thefile)->user = info.st_uid;
   (*thefile)->group = info.st_gid;
  
  
  


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

2000-01-03 Thread rbb
rbb 00/01/03 11:47:44

  Modified:src/lib/apr/file_io/unix filestat.c
   src/lib/apr/include apr_file_io.h
  Log:
  Add a new function.  We shouldn't need to have an open file in order to
  get stat information about the file.  This takes care of that problem.
  
  Revision  ChangesPath
  1.3   +35 -0 apache-2.0/src/lib/apr/file_io/unix/filestat.c
  
  Index: filestat.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/filestat.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- filestat.c1999/10/05 01:15:19 1.2
  +++ filestat.c2000/01/03 19:47:43 1.3
  @@ -84,3 +84,38 @@
   }
   }
   
  +/* ***APRDOC
  + * ap_status_t ap_stat(ap_file_t **, char *, ap_context_t *)
  + *get the specified file's stats.  The file is specified by filename,
  + *instead of using a pre-opened file.
  + * arg 1) Where to store the information about the file.
  + * arg 2) The name of the file to stat.
  + * arg 3) the context to use to allocate the new file. 
  + */ 
  +ap_status_t ap_stat(struct file_t **thefile, char *fname, ap_context_t *cont)
  +{
  +struct stat info;
  +int rv = stat(fname, &info);
  +
  +if (rv == 0) {
  +(*thefile) = ap_pcalloc(cont, sizeof(struct file_t));
  +if ((*thefile) == NULL) {
  +return APR_ENOMEM;
  +}
  +(*thefile)->fname = ap_pstrdup(cont, fname);
  +(*thefile)->filehand = NULL;
  +(*thefile)->filedes = -1;
  +(*thefile)->protection = info.st_mode;
  +(*thefile)->user = info.st_uid;
  +(*thefile)->group = info.st_gid;
  +(*thefile)->size = info.st_size;
  +(*thefile)->atime = info.st_atime;
  +(*thefile)->mtime = info.st_mtime;
  +(*thefile)->ctime = info.st_ctime;
  +(*thefile)->stated = 1; 
  +return APR_SUCCESS;
  +}
  +else {
  +return APR_ENOSTAT;
  +}
  +}
  
  
  
  1.24  +1 -0  apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- apr_file_io.h 1999/12/30 19:50:28 1.23
  +++ apr_file_io.h 2000/01/03 19:47:44 1.24
  @@ -132,6 +132,7 @@
   ap_status_t ap_make_iov(ap_iovec_t **, struct iovec *, ap_context_t *);
   ap_status_t ap_dupfile(ap_file_t **, ap_file_t *);
   ap_status_t ap_getfileinfo(ap_file_t *);
  +ap_status_t ap_stat(ap_file_t **thefile, char *fname, ap_context_t *cont);
   ap_status_t ap_seek(ap_file_t *, ap_seek_where_t, ap_off_t *);
   
   ap_status_t ap_opendir(ap_dir_t **, const char *, ap_context_t *);
  
  
  


cvs commit: apache-2.0/src/modules/standard mod_cern_meta.c mod_expires.c mod_status.c mod_usertrack.c

1999-12-31 Thread rbb
rbb 99/12/31 12:32:37

  Modified:src/modules/mpm/prefork prefork.c
   src/modules/standard mod_cern_meta.c mod_expires.c
mod_status.c mod_usertrack.c
  Log:
  A few more tweaks to finish the modules work.  Now, all of the modules
  compile correctly with Apache 2.0. This does run, but it hasn't been tested
  any more than simply compiling and running the server.
  
  Revision  ChangesPath
  1.62  +6 -0  apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- prefork.c 1999/12/29 23:57:53 1.61
  +++ prefork.c 1999/12/31 20:32:34 1.62
  @@ -2985,6 +2985,12 @@
   /* NOP */
   }
   
  +ap_array_header_t *ap_get_status_table(ap_context_t *p)
  +{
  +/* NOP */
  +return NULL;
  +}
  +
   API_EXPORT(void) ap_reset_connection_status(long conn_id)
   {
   /* NOP */
  
  
  
  1.5   +7 -6  apache-2.0/src/modules/standard/mod_cern_meta.c
  
  Index: mod_cern_meta.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cern_meta.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_cern_meta.c   1999/10/22 16:01:25 1.4
  +++ mod_cern_meta.c   1999/12/31 20:32:35 1.5
  @@ -229,7 +229,7 @@
   /* XXX: this is very similar to ap_scan_script_header_err_core...
* are the differences deliberate, or just a result of bit rot?
*/
  -static int scan_meta_file(request_rec *r, FILE *f)
  +static int scan_meta_file(request_rec *r, ap_file_t *f)
   {
   char w[MAX_STRING_LEN];
   char *l;
  @@ -237,7 +237,7 @@
   ap_table_t *tmp_headers;
   
   tmp_headers = ap_make_table(r->pool, 5);
  -while (fgets(w, MAX_STRING_LEN - 1, f) != NULL) {
  +while (ap_fgets(w, MAX_STRING_LEN - 1, f) != APR_SUCCESS) {
   
/* Delete terminal (CR?)LF */
   
  @@ -295,7 +295,8 @@
   char *last_slash;
   char *real_file;
   char *scrap_book;
  -FILE *f;
  +ap_file_t *f = NULL;
  +ap_status_t retcode;
   cern_meta_dir_config *dconf;
   int rv;
   request_rec *rr;
  @@ -354,8 +355,8 @@
   }
   ap_destroy_sub_req(rr);
   
  -f = ap_pfopen(r->pool, metafilename, "r");
  -if (f == NULL) {
  +retcode = ap_open(&f, metafilename, APR_READ | APR_CREATE, 
APR_OS_DEFAULT, r->pool);
  +if (retcode != APR_SUCCESS) {
if (errno == ENOENT) {
return DECLINED;
}
  @@ -366,7 +367,7 @@
   
   /* read the headers in */
   rv = scan_meta_file(r, f);
  -ap_pfclose(r->pool, f);
  +ap_close(f);
   
   return rv;
   }
  
  
  
  1.5   +10 -3 apache-2.0/src/modules/standard/mod_expires.c
  
  Index: mod_expires.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_expires.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_expires.c 1999/10/22 16:01:26 1.4
  +++ mod_expires.c 1999/12/31 20:32:35 1.5
  @@ -402,9 +402,11 @@
   {
   expires_dir_config *conf;
   char *code;
  -time_t base;
  +char *timestr = NULL;
  +ap_int64_t base;
   time_t additional;
   time_t expires;
  +ap_time_t *finaltime = NULL;
   char age[20];
   
   if (ap_is_HTTP_ERROR(r->status))   /* Don't add Expires headers to 
errors */
  @@ -464,7 +466,7 @@
   /* there's been some discussion and it's possible that 
* 'access time' will be stored in request structure
*/
  -base = r->request_time;
  +ap_get_curtime(r->request_time, &base);
   additional = atoi(&code[1]);
   break;
   default:
  @@ -482,13 +484,18 @@
   tzset();/* redundant? called implicitly by 
localtime, at least 
* under FreeBSD
*/
  -ap_table_setn(r->headers_out, "Expires", ap_gm_timestr_822(r->pool, 
expires));
  +ap_make_time(&finaltime, r->pool);
  +ap_set_curtime(finaltime, expires);
  +ap_timestr(×tr, finaltime, APR_UTCTIME, r->pool); 
  +ap_table_setn(r->headers_out, "Expires", timestr);
   return OK;
   }
  +
   static void register_hooks(void)
   {
   ap_hook_fixups(add_expires,NULL,NULL,HOOK_MIDDLE);
   }
  +
   module MODULE_VAR_EXPORT expires_module =
   {
   STANDARD20_MODULE_STUFF,
  
  
  
  1.6   +1 -1  apache-2.0/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /home/cvs/ap

cvs commit: apache-2.0 configure

1999-12-31 Thread rbb
rbb 99/12/31 11:10:59

  Modified:.configure
  Log:
  Update configure script, so --enable-modules=most can compile a working
  Apache 2.0 server.  This basically removes mod_info and mod_proxy from the
  build process.  With this change, most of the server compiles again.
  
  Revision  ChangesPath
  1.8   +2 -0  apache-2.0/configure
  
  Index: configure
  ===
  RCS file: /home/cvs/apache-2.0/configure,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- configure 1999/12/07 14:20:10 1.7
  +++ configure 1999/12/31 19:10:59 1.8
  @@ -799,6 +799,8 @@
  module_auth_digest=no # conflict with mod_digest
  module_log_agent=no   # deprecated
  module_log_referer=no # deprecated
  +module_info=no# needs to be reworked for 
Apache 2.0
  +module_proxy=no   # proxy doesn't work yet, and 
we are probably going to just re-write it for 2.0 
  ;;
  * ) 
  eval "exists=\$module_${apc_optarg}" 
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/31 11:03:19

  Modified:src/modules/standard mod_unique_id.c
  Log:
  Make mod_unique_id compile again with Apache 2.0.
  
  Revision  ChangesPath
  1.5   +15 -20apache-2.0/src/modules/standard/mod_unique_id.c
  
  Index: mod_unique_id.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_unique_id.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_unique_id.c   1999/11/29 23:33:06 1.4
  +++ mod_unique_id.c   1999/12/31 19:03:18 1.5
  @@ -161,7 +161,7 @@
 unique_id_rec_total_size,
 unique_id_rec_size_uu;
   
  -static void unique_id_global_init(server_rec *s, ap_context_t *p)
  +static void unique_id_global_init(ap_context_t *p, ap_context_t *plog, 
ap_context_t *ptemp, server_rec *main_server)
   {
   #ifndef MAXHOSTNAMELEN
   #define MAXHOSTNAMELEN 256
  @@ -200,21 +200,21 @@
* be unique as the physical address of the machine
*/
   if (gethostname(str, sizeof(str) - 1) != 0) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, errno, 
main_server,
 "gethostname: mod_unique_id requires the hostname of the server");
   exit(1);
   }
   str[sizeof(str) - 1] = '\0';
   
   if ((hent = gethostbyname(str)) == NULL) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, h_errno, 
main_server,
   "mod_unique_id: unable to gethostbyname(\"%s\")", str);
   exit(1);
   }
   
   global_in_addr = ((struct in_addr *) hent->h_addr_list[0])->s_addr;
   
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, 0, main_server,
   "mod_unique_id: using ip addr %s",
   inet_ntoa(*(struct in_addr *) hent->h_addr_list[0]));
   
  @@ -245,7 +245,7 @@
   #endif
   }
   
  -static void unique_id_child_init(server_rec *s, ap_context_t *p)
  +static void unique_id_child_init(ap_context_t *p, server_rec *s)
   {
   pid_t pid;
   #ifdef HAVE_GETTIMEOFDAY
  @@ -271,7 +271,7 @@
* global_init ... but oh well.
*/
   if (cur_unique_id.pid != pid) {
  -ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, s,
  +ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_CRIT, 0, s,
   "oh no! pids are greater than 32-bits!  I'm broken!");
   }
   
  @@ -348,7 +348,7 @@
   new_unique_id.counter = cur_unique_id.counter;
   
   new_unique_id.stamp = htonl((unsigned int)r->request_time);
  -new_unique_id.thread_index = htonl((unsigned 
int)r->connection->thread_num);
  +new_unique_id.thread_index = htonl((unsigned int)r->connection->id);
   
   /* we'll use a temporal buffer to avoid uuencoding the possible internal
* paddings of the original structure */
  @@ -392,25 +392,20 @@
   return DECLINED;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_post_config(unique_id_global_init, NULL, NULL, HOOK_MIDDLE);
  +ap_hook_child_init(unique_id_child_init, NULL, NULL, HOOK_MIDDLE);
  +ap_hook_post_read_request(gen_unique_id, NULL, NULL, HOOK_MIDDLE); 
  +}
   
   module MODULE_VAR_EXPORT unique_id_module = {
  -STANDARD_MODULE_STUFF,
  -unique_id_global_init,  /* initializer */
  +STANDARD20_MODULE_STUFF,
   NULL,   /* dir config creater */
   NULL,   /* dir merger --- default is to override */
   NULL,   /* server config */
   NULL,   /* merge server configs */
   NULL,   /* command ap_table_t */
   NULL,   /* handlers */
  -NULL,   /* filename translation */
  -NULL,   /* check_user_id */
  -NULL,   /* check auth */
  -NULL,   /* check access */
  -NULL,   /* type_checker */
  -NULL,   /* fixups */
  -NULL,   /* logger */
  -NULL,   /* header parser */
  -unique_id_child_init,   /* child_init */
  -NULL,   /* child_exit */
  -gen_unique_id   /* post_read_request */
  +register_hooks  /* register hooks */
   };
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/31 09:39:42

  Modified:src/modules/standard mod_usertrack.c
  Log:
  Make mod_usertrack compile cleanly.  Not tested yet.
  
  Revision  ChangesPath
  1.6   +6 -1  apache-2.0/src/modules/standard/mod_usertrack.c
  
  Index: mod_usertrack.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_usertrack.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_usertrack.c   1999/11/30 03:52:54 1.5
  +++ mod_usertrack.c   1999/12/31 17:39:42 1.6
  @@ -182,7 +182,12 @@
   
   if (cls->expires) {
   struct tm *tms;
  -time_t when = r->request_time + cls->expires;
  +ap_time_t *when = NULL;
  +ap_int64_t req_time;
  +
  +ap_make_time(&when, r->pool);
  +ap_get_curtime(when, &req_time);
  +ap_set_curtime(when,  req_time + cls->expires);
   
   #ifndef MILLENIAL_COOKIES
   /*
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/31 09:38:25

  Modified:src/modules/standard mod_status.c
  Log:
  Fix a bug in mod_status.  ap_ht_time expects an ap_time_t type, instead of
  a time_t now.
  
  Revision  ChangesPath
  1.5   +4 -1  apache-2.0/src/modules/standard/mod_status.c
  
  Index: mod_status.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_status.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_status.c  1999/10/13 05:24:16 1.4
  +++ mod_status.c  1999/12/31 17:38:25 1.5
  @@ -82,7 +82,10 @@
   int i;
   ap_array_header_t *server_status;
   ap_status_table_row_t *status_rows;
  -time_t nowtime = time(NULL);
  +ap_time_t *nowtime = NULL;
  +
  +ap_make_time(&nowtime, r->pool);
  +ap_curtime(nowtime);
   
   r->allowed = (1 << M_GET);
   if (r->method_number != M_GET)
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/31 09:06:16

  Modified:src/modules/standard mod_digest.c mod_vhost_alias.c
  Log:
  Update these modules to Apache 2.0.  Not tested, but they compile again.
  
  Revision  ChangesPath
  1.6   +2 -2  apache-2.0/src/modules/standard/mod_digest.c
  
  Index: mod_digest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_digest.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_digest.c  1999/10/22 16:01:25 1.5
  +++ mod_digest.c  1999/12/31 17:06:15 1.6
  @@ -111,7 +111,7 @@
   const char *rpw;
   char *w, *x;
   
  -if (!(f = ap_pcfg_openfile(r->pool, auth_pwfile))) {
  +if (ap_pcfg_openfile(&f, r->pool, auth_pwfile) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
"Could not open password file: %s", auth_pwfile);
return NULL;
  @@ -161,7 +161,7 @@
   
   if (strcasecmp(scheme = ap_getword_white(r->pool, &auth_line), 
"Digest")) {
/* Client tried to authenticate using wrong auth scheme */
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server,
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, errno, r->server,  
"client used wrong authentication scheme: %s for %s", 
scheme, r->uri);
ap_note_digest_auth_failure(r);
  
  
  
  1.3   +7 -13 apache-2.0/src/modules/standard/mod_vhost_alias.c
  
  Index: mod_vhost_alias.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_vhost_alias.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_vhost_alias.c 1999/08/31 05:34:06 1.2
  +++ mod_vhost_alias.c 1999/12/31 17:06:15 1.3
  @@ -457,26 +457,20 @@
   return OK;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_translate_name(mva_translate, NULL, NULL, HOOK_MIDDLE);
  +};
   
   module MODULE_VAR_EXPORT vhost_alias_module =
   {
  -STANDARD_MODULE_STUFF,
  -NULL,/* initializer */
  +STANDARD20_MODULE_STUFF,
   NULL,/* dir config creater */
   NULL,/* dir merger --- default is to override */
   mva_create_server_config,/* server config */
   mva_merge_server_config, /* merge server configs */
   mva_commands,/* command ap_table_t */
   NULL,/* handlers */
  -mva_translate,   /* filename translation */
  -NULL,/* check_user_id */
  -NULL,/* check auth */
  -NULL,/* check access */
  -NULL,/* type_checker */
  -NULL,/* fixups */
  -NULL,/* logger */
  -NULL,/* header parser */
  -NULL,/* child_init */
  -NULL,/* child_exit */
  -NULL /* post read-request */
  +register_hooks  /* register hooks */
   };
  +
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/31 09:04:58

  Modified:src/modules/standard mod_auth_dbm.c
  Log:
  Update mod_auth_dbm to work with Apache 2.0.  This has not been tested,
  but at least it compiles now.
  
  Revision  ChangesPath
  1.6   +9 -15 apache-2.0/src/modules/standard/mod_auth_dbm.c
  
  Index: mod_auth_dbm.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_dbm.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_auth_dbm.c1999/10/22 16:01:24 1.5
  +++ mod_auth_dbm.c1999/12/31 17:04:58 1.6
  @@ -212,7 +212,7 @@
  &dbm_auth_module);
   const char *sent_pw;
   char *real_pw, *colon_pw;
  -char *invalid_pw;
  +ap_status_t invalid_pw;
   int res;
   
   if ((res = ap_get_basic_auth_pw(r, &sent_pw)))
  @@ -235,7 +235,7 @@
*colon_pw = '\0';
   }
   invalid_pw = ap_validate_password(sent_pw, real_pw);
  -if (invalid_pw != NULL) {
  +if (invalid_pw != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  "DBM user %s: authentication failure for \"%s\": %s",
  r->user, r->uri, invalid_pw);
  @@ -309,26 +309,20 @@
   return DECLINED;
   }
   
  +static void register_hooks(void)
  +{
  +ap_hook_check_user_id(dbm_authenticate_basic_user, NULL, NULL, 
HOOK_MIDDLE);
  +ap_hook_auth_checker(dbm_check_auth, NULL, NULL, HOOK_MIDDLE);
  +}
   
   module dbm_auth_module =
   {
  -STANDARD_MODULE_STUFF,
  -NULL,/* initializer */
  +STANDARD20_MODULE_STUFF,
   create_dbm_auth_dir_config,  /* dir config creater */
   NULL,/* dir merger --- default is to override */
   NULL,/* server config */
   NULL,/* merge server config */
   dbm_auth_cmds,   /* command ap_table_t */
   NULL,/* handlers */
  -NULL,/* filename translation */
  -dbm_authenticate_basic_user, /* check_user_id */
  -dbm_check_auth,  /* check auth */
  -NULL,/* check access */
  -NULL,/* type_checker */
  -NULL,/* fixups */
  -NULL,/* logger */
  -NULL,/* header parser */
  -NULL,/* child_init */
  -NULL,/* child_exit */
  -NULL /* post read-request */
  +register_hooks  /* register hooks */
   };
  
  
  


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

1999-12-31 Thread rbb
rbb 99/12/30 17:27:46

  Modified:src/include util_script.h
   src/main util_script.c
  Log:
  Get rid of ap_call_exec.  It has been #if 0'ed out for a long time, and we
  never call it, so I'm taking it out all together now.
  
  Revision  ChangesPath
  1.5   +0 -2  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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- util_script.h 1999/10/31 09:26:03 1.4
  +++ util_script.h 1999/12/31 01:27:35 1.5
  @@ -81,8 +81,6 @@
   int (*getsfunc) (char *, int, void *),
   void *getsfunc_data);
   API_EXPORT(void) ap_send_size(ap_ssize_t size, request_rec *r);
  -API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char 
*argv0, char **env,
  -  int shellcmd);
   
   #ifdef __cplusplus
   }
  
  
  
  1.21  +0 -411apache-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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- util_script.c 1999/12/20 16:38:35 1.20
  +++ util_script.c 1999/12/31 01:27:43 1.21
  @@ -682,414 +682,3 @@
   }
   #endif
   
  -#if 0
  -API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char 
*argv0,
  -  char **env, int shellcmd)
  -{
  -int pid = 0;
  -int errfileno = STDERR_FILENO;
  -
  -#if !defined(WIN32) && !defined(OS2)
  -/* the fd on r->server->error_log is closed, but we need somewhere to
  - * put the error messages from the log_* functions. So, we use stderr,
  - * since that is better than allowing errors to go unnoticed.  Don't do
  - * this on Win32, though, since we haven't fork()'d.
  - */
  -ap_put_os_file(&r->server->error_log, &errfileno, r->pool);
  -#endif
  -
  -/* TODO: all that RLimit stuff should become part of the spawning API,
  - * and not something in the core_dir_config... define a special rlimit
  - * structure and pass it in here.
  - */
  -
  -#ifdef OS2
  -{
  - /* Additions by Alec Kloss, to allow exec'ing of scripts under OS/2 */
  - 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';
  -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);
  -}
  -}
  -}
  - }
  -
  -if (is_script) {
  -cmdline = ap_pstrcat(r->pool, interpreter+2, " ", r->filename, 
NULL);
  -}
  -else if (strstr(strupr(r->filename), ".CMD") > 0) {
  -/* Special case to allow use of REXX commands as scripts. */
  -os2pathname(r->filename);
  -cmdline = ap_pstrcat(r->pool, SHELL_PATH, " /C ", r->filename, 
NULL);
  -}
  -else {
  -cmdline = r->filename;
  - }
  - 
  -args = ap_pstrdup(r->pool, args);
  -ap_unescape_url(args);
  -args = ap_double_quotes(r->pool, args);
  -   

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

1999-12-31 Thread rbb
rbb 99/12/30 17:16:53

  Modified:src/lib/apr/file_io/unix open.c
  Log:
  Fix a nasty little bug that was causing a seg fault everytime we tried
  starting Apache with an existing pid file.  When APR allocates space, it
  has to allocate the right amount.
  
  Revision  ChangesPath
  1.29  +1 -1  apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- open.c1999/12/30 19:50:20 1.28
  +++ open.c1999/12/31 01:16:53 1.29
  @@ -311,7 +311,7 @@
*/
   ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
   {
  -(*thefile) = ap_pcalloc(cont, sizeof(ap_os_file_t *));
  +(*thefile) = ap_pcalloc(cont, sizeof(struct file_t));
   if ((*thefile) == NULL) {
   return APR_ENOMEM;
   }
  
  
  


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

1999-12-30 Thread rbb
rbb 99/12/30 11:50:31

  Modified:src/lib/apr/file_io/unix open.c
   src/lib/apr/include apr_file_io.h
  Log:
  Add a flag to ap_open to allow close on delete status.  This should be the
  preferred way to delete a file after closing it, rather than unlinking the
  file immediately after opening it.  This is more portable, and was can code
  this option to work on all platforms, the unlink option is not always
  possible.
  
  Revision  ChangesPath
  1.28  +5 -1  apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- open.c1999/12/13 13:57:06 1.27
  +++ open.c1999/12/30 19:50:20 1.28
  @@ -93,6 +93,7 @@
*  APR_BINARY   not a text file (This flag is ignored on 
UNIX because it has no meaning)
*  APR_BUFFERED buffer the data.  Default is non-buffered
*  APR_EXCL return error if APR_CREATE and file exists
  + *  APR_DELONCLOSE   delete the file after closing.
* arg 4) Access permissions for file.
* arg 5) The opened file descriptor.
* NOTE:  If mode is APR_OS_DEFAULT, the system open command will be 
  @@ -167,9 +168,12 @@
   if ((*new)->filedes < 0 && (*new)->filehand == NULL) {
  (*new)->filedes = -1;
  (*new)->eof_hit = 1;
  -return errno;
  +   return errno;
   }
   
  +if (flag & APR_DELONCLOSE) {
  +unlink(fname);
  +}
   (*new)->stated = 0;  /* we haven't called stat for this file yet. */
   (*new)->timeout = -1;
   (*new)->eof_hit = 0;
  
  
  
  1.23  +9 -8  apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- apr_file_io.h 1999/12/11 20:24:14 1.22
  +++ apr_file_io.h 1999/12/30 19:50:28 1.23
  @@ -70,15 +70,16 @@
 APR_SOCK} ap_filetype_e; 
   
   /* Flags for ap_open */
  -#define APR_READ 1   /* Open the file for reading */
  -#define APR_WRITE2   /* Open the file for writing */
  -#define APR_CREATE   4   /* Create the file if not there */
  -#define APR_APPEND   8   /* Append to the end of the file */
  -#define APR_TRUNCATE 16  /* Open the file and truncate to 0 length */
  -#define APR_BINARY   32  /* Open the file in binary mode */
  -#define APR_BUFFERED 64  /* Buffer the data when reading or writing 
*/
  -#define APR_EXCL 128 /* Open should fail if APR_CREATE and file
  +#define APR_READ   1   /* Open the file for reading */
  +#define APR_WRITE  2   /* Open the file for writing */
  +#define APR_CREATE 4   /* Create the file if not there */
  +#define APR_APPEND 8   /* Append to the end of the file */
  +#define APR_TRUNCATE   16  /* Open the file and truncate to 0 length 
*/
  +#define APR_BINARY 32  /* Open the file in binary mode */
  +#define APR_BUFFERED   64  /* Buffer the data when reading or 
writing */
  +#define APR_EXCL   128 /* Open should fail if APR_CREATE and file
exists. */
  +#define APR_DELONCLOSE 256 /* Delete the file after close */
   
   /* flags for ap_seek */
   #define APR_SET SEEK_SET
  
  
  


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

1999-12-30 Thread rbb
rbb 99/12/30 11:45:41

  Modified:src/lib/apr/test testproc.c
  Log:
  Fix a minor bug in testproc.  We always call sleep, and it is defined to be
  Sleep on Windows.
  
  Revision  ChangesPath
  1.8   +1 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- testproc.c1999/12/17 12:32:14 1.7
  +++ testproc.c1999/12/30 19:45:38 1.8
  @@ -168,7 +168,7 @@
   }
   else fprintf(stderr, "Read failed.\n");
   
  -Sleep(1000);
  +sleep(1000);
   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/modules/standard mod_log_config.c

1999-12-30 Thread rbb
rbb 99/12/30 10:31:30

  Modified:src/lib/apr/include apr_time.h
   src/lib/apr/time/unix timestr.c
   src/main util.c
   src/modules/standard mod_log_config.c
  Log:
  Some changes to the ap_strftime function.  We now inform the user of the
  length of the string written, and we return a status code.  I expect the
  status code to mean a bit more on Windows than it currently does on Unix.
  
  Revision  ChangesPath
  1.7   +1 -1  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_time.h1999/12/21 21:16:19 1.6
  +++ apr_time.h1999/12/30 18:31:27 1.7
  @@ -77,7 +77,7 @@
   ap_status_t ap_implode_time(ap_time_t *);
   
   ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e 
type, ap_context_t *p);
  -ap_status_t ap_strftime(char *s, ap_size_t max, const char *format, 
ap_time_t *tm);
  +ap_status_t ap_strftime(char *s, ap_int32_t *retsize, ap_size_t max, const 
char *format, ap_time_t *tm);
   
   /* accessor functions */
   ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *);
  
  
  
  1.3   +4 -2  apache-2.0/src/lib/apr/time/unix/timestr.c
  
  Index: timestr.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/timestr.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- timestr.c 1999/12/21 16:21:43 1.2
  +++ timestr.c 1999/12/30 18:31:28 1.3
  @@ -126,8 +126,10 @@
   */
   }
   
  -ap_status_t ap_strftime(char *s, ap_size_t max, const char *format, struct 
atime_t *tm)
  +ap_status_t ap_strftime(char *s, ap_int32_t *retsize, ap_size_t max, 
  +const char *format, struct atime_t *tm)
   {
  -strftime(s, max, format, tm->explodedtime);
  +(*retsize) = strftime(s, max, format, tm->explodedtime);
  +return APR_SUCCESS;
   }
   
  
  
  
  1.22  +2 -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.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- util.c1999/12/21 21:41:48 1.21
  +++ util.c1999/12/30 18:31:28 1.22
  @@ -126,6 +126,7 @@
   
   API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t *t, const char 
*fmt, int gmt)
   {
  +ap_int32_t retcode;
   char ts[MAX_STRING_LEN];
   char tf[MAX_STRING_LEN];
   
  @@ -170,7 +171,7 @@
   }
   
   /* check return code? */
  -ap_strftime(ts, MAX_STRING_LEN, fmt, t);
  +ap_strftime(ts, &retcode, MAX_STRING_LEN, fmt, t);
   ts[MAX_STRING_LEN - 1] = '\0';
   return ap_pstrdup(p, ts);
   }
  
  
  
  1.12  +2 -1  apache-2.0/src/modules/standard/mod_log_config.c
  
  Index: mod_log_config.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_log_config.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_log_config.c  1999/12/21 21:41:53 1.11
  +++ mod_log_config.c  1999/12/30 18:31:29 1.12
  @@ -384,12 +384,13 @@
   ap_int32_t mday, year, hour, min, sec, month;
   ap_time_t *t;
   char tstr[MAX_STRING_LEN];
  +ap_int32_t retcode;
   
   ap_make_time(&t, r->pool);
   ap_get_gmtoff(&timz, t, r->pool);
   
   if (a && *a) {  /* Custom format */
  -ap_strftime(tstr, MAX_STRING_LEN, a, t);
  +ap_strftime(tstr, &retcode, MAX_STRING_LEN, a, t);
   }
   else {  /* CLF format */
   char sign = (timz < 0 ? '-' : '+');
  
  
  


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

1999-12-27 Thread rbb
rbb 99/12/27 15:00:37

  Modified:src/lib/apr configure.in
   src/lib/apr/include apr.h.in apr_general.h
  Log:
  Move the test and defintion of APR_SSIZE_T_FMT.  This was causing problems,
  because the SIZEOF_SSIZE_T macro was in apr_config.h which apr_general.h
  doesn't have access to.  This puts the APR_SSIZE_T_FMT macro in apr.h, which
  is where it really belongs now, because it is a macro which is meant for use
  by external programs.
  
  Revision  ChangesPath
  1.40  +9 -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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- configure.in  1999/12/22 21:24:42 1.39
  +++ configure.in  1999/12/27 23:00:31 1.40
  @@ -144,6 +144,14 @@
   
   AC_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8)
   
  +if test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_int"; then
  +ssize_t_fmt='#define APR_SSIZE_T_FMT "d"'
  +elif test "$ac_cv_sizeof_ssize_t" = "$ac_cv_sizeof_long"; then
  +ssize_t_fmt='#define APR_SSIZE_T_FMT "ld"'
  +else
  +ssize_t_fmt='#error Can not determine the proper size for ssize_t'
  +fi
  +
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
   if test ".$SH" = . -a -f /bin/sh; then
 SH="/bin/sh"
  @@ -361,6 +369,7 @@
   AC_SUBST(fcntlser)
   AC_SUBST(procpthreadser)
   AC_SUBST(pthreadser)
  +AC_SUBST(ssize_t_fmt)
   
   AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
   [AC_TRY_COMPILE([#include 
  
  
  
  1.8   +9 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr.h.in  1999/12/20 16:10:10 1.7
  +++ apr.h.in  1999/12/27 23:00:34 1.8
  @@ -72,5 +72,14 @@
   #define API_VAR_IMPORT   extern
   #define API_VAR_EXPORT   
   
  +/* Define APR_SSIZE_T_FMT.  
  + * If ssize_t is an integer we define it to be "d",
  + * if ssize_t is a long int we define it to be "ld",
  + * if ssize_t is neither we declare an error here.
  + * I looked for a better way to define this here, but couldn't find one, so
  + * to find the logic for this definition search for "ssize_t_fmt" in
  + * configure.in.
  + */
  [EMAIL PROTECTED]@
   
   #endif /* APR_H */
  
  
  
  1.14  +0 -8  apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- apr_general.h 1999/12/09 21:00:22 1.13
  +++ apr_general.h 1999/12/27 23:00:34 1.14
  @@ -79,14 +79,6 @@
   
   #define MAXIMUM_WAIT_OBJECTS 64
   
  -#if SIZEOF_SSIZE_T == SIZEOF_INT
  -# define APR_SSIZE_T_FMT "d"
  -#elif SIZEOF_SSIZE_T == SIZEOF_LONG
  -# define APR_SSIZE_T_FMT "ld"
  -#else
  -# error "Don't know ssize_t printf format"
  -#endif
  -
   typedef struct context_t  ap_context_t;
   typedef int   ap_signum_t;
   
  
  
  


cvs commit: apache-2.0/src acinclude.m4

1999-12-24 Thread rbb
rbb 99/12/24 13:22:28

  Modified:src  acinclude.m4
  Log:
  Cleanup the threads check, also resets the CFLAGS and LDFLAGS variables
  in cases where no threading library was found.
  Submitted by: Sascha Schumann
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.12  +8 -6  apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- acinclude.m4  1999/12/24 19:04:40 1.11
  +++ acinclude.m4  1999/12/24 21:22:27 1.12
  @@ -127,15 +127,17 @@
 LDFLAGS="$test_ldflag $ldflags_orig"
 THREAD_TEST()
 if test "$apache_threads_working" = "yes"; then
  -break
  +break 2
 fi
   done
  -if test "$apache_threads_working" = "yes"; then
  -  threads_result="Updating CFLAGS and LDFLAGS"
  -  break
  -fi
  -  threads_result="Threads not found"
 done
  +  if test "$apache_threads_working" = "yes"; then
  +threads_result="POSIX Threads found"
  +  else
  +CFLAGS="$cflags_orig"
  +LDFLAGS="$ldflags_orig"
  +threads_result="POSIX Threads not found"
  +  fi
   ] )
   
   dnl
  
  
  


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

1999-12-24 Thread rbb
rbb 99/12/24 13:12:24

  Modified:src/modules/mpm config.m4
  Log:
  Fix the threads  check so it works on non-bash shells.
  Submitted by:   Sascha Schumann
  Reviewed by:Ryan Bloom
  
  Revision  ChangesPath
  1.7   +1 -1  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- config.m4 1999/12/24 18:31:10 1.6
  +++ config.m4 1999/12/24 21:12:20 1.7
  @@ -19,7 +19,7 @@
   AC_MSG_RESULT("$threads_result")
   
   AC_MSG_CHECKING([to ensure I can compile the selected MPM]) 
  -if test "$apache_threads_working" = "no" && "$apache_cv_mpm" != "prefork"; 
then
  +if test "$apache_threads_working" = "no" && test "$apache_cv_mpm" != 
"prefork"; then
   AC_MSG_RESULT([can't compile selected MPM because there are no threads, 
defaulting to prefork])
   apache_cv_mpm="prefork"
   else
  
  
  


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

1999-12-24 Thread rbb
rbb 99/12/24 10:31:11

  Modified:src  acinclude.m4 configure.in
   src/modules/mpm config.m4
  Log:
  Finish the MPM decision logic.  This moves the threads checking stuff into
  the mpm directory where it belongs.  It also adds logic so that if threads
  aren't detected, we automatically choose to use the prefork mpm.  Lastly,
  I also cleaned up a variable name to make it more consistent with the other
  variables used in our configure script.
  
  Revision  ChangesPath
  1.9   +5 -5  apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- acinclude.m4  1999/12/23 21:01:27 1.8
  +++ acinclude.m4  1999/12/24 18:31:08 1.9
  @@ -113,10 +113,10 @@
   int data = 1;
   return pthread_create(&thd, NULL, thread_routine, &data);
   } ], [ 
  -  THREADS_WORKING="yes"
  +  apache_threads_working="yes"
 ], [
  -  THREADS_WORKING="no"
  -  ], THREADS_WORKING="no" ) ] )
  +  apache_threads_working="no"
  +  ], apache_threads_working="no" ) ] )
   
   define(APACHE_CHECK_THREADS, [dnl
 cflags_orig="$CFLAGS"
  @@ -126,11 +126,11 @@
 CFLAGS="$test_cflag $cflags_orig"
 LDFLAGS="$test_ldflag $ldflags_orig"
 THREAD_TEST()
  -  if test "$THREADS_WORKING" = "yes"; then
  +  if test "$apache_threads_working" = "yes"; then
   break
 fi
   done
  -if test "$THREADS_WORKING" = "yes"; then
  +if test "$apache_threads_working" = "yes"; then
 threads_result="Updating CFLAGS and LDFLAGS"
 break
   fi
  
  
  
  1.16  +0 -4  apache-2.0/src/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- configure.in  1999/12/23 21:01:28 1.15
  +++ configure.in  1999/12/24 18:31:09 1.16
  @@ -73,10 +73,6 @@
   
   dnl ## Check for library functions
   
  -AC_MSG_CHECKING([for which threading library to use])
  -APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
  -AC_MSG_RESULT("$threads_result")
  -
   dnl See Comment #Spoon
   
   AC_CHECK_FUNCS( \
  
  
  
  1.6   +12 -0 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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- config.m4 1999/12/23 21:01:31 1.5
  +++ config.m4 1999/12/24 18:31:10 1.6
  @@ -14,6 +14,18 @@
 AC_MSG_RESULT(No MPM specified.  Using pthread)
   ])
   
  +AC_MSG_CHECKING([for which threading library to use])
  +APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
  +AC_MSG_RESULT("$threads_result")
  +
  +AC_MSG_CHECKING([to ensure I can compile the selected MPM]) 
  +if test "$apache_threads_working" = "no" && "$apache_cv_mpm" != "prefork"; 
then
  +AC_MSG_RESULT([can't compile selected MPM because there are no threads, 
defaulting to prefork])
  +apache_cv_mpm="prefork"
  +else
  +AC_MSG_RESULT([OK])
  +fi
  +
   APACHE_OUTPUT(modules/mpm/Makefile)
   MPM_NAME=$apache_cv_mpm
   MPM_DIR=modules/mpm/$MPM_NAME
  
  
  


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

1999-12-23 Thread rbb
rbb 99/12/23 13:01:32

  Modified:src  acinclude.m4 configure.in
   src/modules/mpm config.m4
  Log:
  First stab at logic to determine which threading library to use.  This also
  gets rid of the hack of always putting -pthread in the CFLAGS variable.
  
  Revision  ChangesPath
  1.8   +43 -0 apache-2.0/src/acinclude.m4
  
  Index: acinclude.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- acinclude.m4  1999/12/20 03:09:43 1.7
  +++ acinclude.m4  1999/12/23 21:01:27 1.8
  @@ -95,3 +95,46 @@
 fi
   ])
   
  +dnl
  +dnl APACHE_CHECK_THREADS()
  +dnl
  +dnl Determine the best flags for linking against a threading library.
  +dnl
  +AC_DEFUN(THREAD_TEST, [
  +AC_TRY_RUN( [
  +#include 
  +
  +void *thread_routine(void *data) {
  +return data;
  +}
  +
  +int main() {
  +pthread_t thd;
  +int data = 1;
  +return pthread_create(&thd, NULL, thread_routine, &data);
  +} ], [ 
  +  THREADS_WORKING="yes"
  +  ], [
  +  THREADS_WORKING="no"
  +  ], THREADS_WORKING="no" ) ] )
  +
  +define(APACHE_CHECK_THREADS, [dnl
  +  cflags_orig="$CFLAGS"
  +  ldflags_orig="$LDFLAGS"
  +  for test_cflag in $1; do
  +for test_ldflag in $2; do
  +  CFLAGS="$test_cflag $cflags_orig"
  +  LDFLAGS="$test_ldflag $ldflags_orig"
  +  THREAD_TEST()
  +  if test "$THREADS_WORKING" = "yes"; then
  +break
  +  fi
  +done
  +if test "$THREADS_WORKING" = "yes"; then
  +  threads_result="Updating CFLAGS and LDFLAGS"
  +  break
  +fi
  +  threads_result="Threads not found"
  +  done
  +] )
  +
  
  
  
  1.15  +4 -0  apache-2.0/src/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- configure.in  1999/12/21 21:41:40 1.14
  +++ configure.in  1999/12/23 21:01:28 1.15
  @@ -73,6 +73,10 @@
   
   dnl ## Check for library functions
   
  +AC_MSG_CHECKING([for which threading library to use])
  +APACHE_CHECK_THREADS('' -pthread -D_REENTRANT, '' -lpthread -lc_r)
  +AC_MSG_RESULT("$threads_result")
  +
   dnl See Comment #Spoon
   
   AC_CHECK_FUNCS( \
  
  
  
  1.5   +0 -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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- config.m4 1999/12/20 03:09:50 1.4
  +++ config.m4 1999/12/23 21:01:31 1.5
  @@ -46,8 +46,6 @@
   
   dnl XXX - We should be checking for the proper flags to use on a particular 
   dnl platform. This will cover a couple of them, anyway
  -CFLAGS="-pthread $CFLAGS"
  -CXXFLAGS="-pthread $CXXFLAGS"
   
   AC_CHECK_HEADER(pthread.h, [ ],[
   AC_MSG_ERROR(This MPM requires pthreads. Try --with-mpm=prefork.)
  
  
  


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

1999-12-22 Thread rbb
rbb 99/12/22 13:24:47

  Modified:src/lib/apr configure.in
   src/modules/mpm/dexter config.m4
   src/modules/mpm/mpmt_pthread config.m4
  Log:
  This fixes the bug in my last commit.  Apache always caches a value for
  enable-threads.  This allows us to re-configure the server for different
  MPM's without worrying about not having APR-threads available.
  
  Revision  ChangesPath
  1.39  +12 -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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- configure.in  1999/12/22 20:29:16 1.38
  +++ configure.in  1999/12/22 21:24:42 1.39
  @@ -45,6 +45,18 @@
   pthreadh="0"
   else
   if test "$ac_cv_enable_threads" = "pthread"; then
  +# We have specified pthreads for our threading library, just make sure
  +# that we have everything we need
  +  AC_CHECK_HEADERS(pthread.h, [ 
  +  threads="1"
  +  pthreadh="1"
  +  AC_DEFINE(USE_THREADS) ], [
  +  threads="0"
  +  pthreadh="0" ] )
  +else
  +# We basically specified that we wanted threads, but not how to implement
  +# them.  In this case, just look for pthreads.  In the future, we can check
  +# for other threading libraries as well.
 AC_CHECK_HEADERS(pthread.h, [ 
 threads="1"
 pthreadh="1"
  
  
  
  1.2   +3 -0  apache-2.0/src/modules/mpm/dexter/config.m4
  
  Index: config.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/config.m4,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- config.m4 1999/11/29 23:46:38 1.1
  +++ config.m4 1999/12/22 21:24:44 1.2
  @@ -1,6 +1,9 @@
   dnl ## XXX - Need a more thorough check of the proper flags to use
   
   if test "$MPM_NAME" = "dexter" ; then
  +ac_cv_enable_threads="yes"
  +AC_CACHE_SAVE
  +
   APACHE_OUTPUT(modules/mpm/$MPM_NAME/Makefile)
   APACHE_MPM_PTHREAD
   APACHE_MPM_CHECK_SHMEM
  
  
  
  1.3   +3 -0  apache-2.0/src/modules/mpm/mpmt_pthread/config.m4
  
  Index: config.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/config.m4,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- config.m4 1999/11/30 03:52:41 1.2
  +++ config.m4 1999/12/22 21:24:45 1.3
  @@ -1,6 +1,9 @@
   dnl ## XXX - Need a more thorough check of the proper flags to use
   
   if test "$MPM_NAME" = "mpmt_pthread" ; then
  +ac_cv_enable_threads="yes"
  +AC_CACHE_SAVE
  +
   APACHE_OUTPUT(modules/mpm/$MPM_NAME/Makefile)
   
   APACHE_MPM_PTHREAD
  
  
  


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

1999-12-22 Thread rbb
rbb 99/12/22 12:29:20

  Modified:src/lib/apr acconfig.h configure.in
   src/lib/apr/locks/unix intraproc.c
   src/lib/apr/misc/unix start.c
   src/modules/mpm/prefork config.m4
  Log:
  Clean up APR's configure script a bit.  This commit also allows Apache to
  specify that APR should be built without threads for the prefork MPM.  This
  is broken if we then try to configure Apache again using a threaded MPM, but
  this is easily fixable, and I will be doing that soon.  Lastly, I removed all
  thread calls from APR when it is told to build without threads.
  
  Revision  ChangesPath
  1.18  +1 -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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- acconfig.h1999/12/21 21:16:14 1.17
  +++ acconfig.h1999/12/22 20:29:16 1.18
  @@ -45,6 +45,7 @@
   #undef USEBCOPY
   
   #undef HAVE_GMTOFF
  +#undef USE_THREADS
   
   #undef SIZEOF_SSIZE_T
   
  
  
  
  1.38  +50 -67apache-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.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- configure.in  1999/12/21 21:16:17 1.37
  +++ configure.in  1999/12/22 20:29:16 1.38
  @@ -1,3 +1,4 @@
  +
   AC_CONFIG_AUX_DIR(./helpers)
   OS=`./config.guess`
   OS=`./config.sub $OS` 
  @@ -28,6 +29,42 @@
   AC_CHECK_PROG(RM, rm, rm)
   AC_CHECK_PROG(AR, ar, ar)
   
  +# This macro needs to be here in case we are on an AIX box.
  +AC_AIX
  +
  +AC_CACHE_CHECK([for threads], ac_cv_enable_threads, 
  +  [ AC_ARG_ENABLE(threads,
  +[  --enable-threads  Enable threading support in APR.], 
  +[ ] , 
  +[ AC_CHECK_HEADERS(pthread.h,  
  +   [ ac_cv_enable_threads="pthread" ] , 
  +   [ ac_cv_enable_threads="no" ] ) ] ) ] ) 
  +
  +if test "$ac_cv_enable_threads" = "no"; then 
  +threads="0"
  +pthreadh="0"
  +else
  +if test "$ac_cv_enable_threads" = "pthread"; then
  +  AC_CHECK_HEADERS(pthread.h, [ 
  +  threads="1"
  +  pthreadh="1"
  +  AC_DEFINE(USE_THREADS) ], [
  +  threads="0"
  +  pthreadh="0" ] )
  +fi
  +fi
  +
  +pthreadser="0"
  +if test "$threads" = "1"; then
  +AC_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
  +AC_CHECK_LIB(pthread, pthread_mutex_init, [
  +AC_DEFINE(USE_PTHREAD_SERIALIZE)
  +pthreadser="1" ])
  +AC_CHECK_LIB(c_r, pthread_mutex_init, [ 
  +AC_DEFINE(USE_PTHREAD_SERIALIZE)
  +pthreadser="1"])
  +fi
  +
   AC_ARG_WITH(debug,[  --with-debug  Turn on debugging and compile 
time warnings],
[if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -g -Wall"; else 
CFLAGS="$CFLAGS -g"; fi])
   
  @@ -42,10 +79,6 @@
   ;;
   esac
   
  -
  -# This macro needs to be here in case we are on an AIX box.
  -AC_AIX
  -
   dnl Checks for standard typedefs
   AC_TYPE_OFF_T
   AC_TYPE_PID_T
  @@ -80,9 +113,6 @@
   if test "$ac_cv_sizeof_longlong" = "8"; then
   long_value="__int64"
   fi
  -AC_SUBST(short_value)
  -AC_SUBST(int_value)
  -AC_SUBST(long_value)
   
   if test "$ac_cv_type_off_t" = "yes"; then
   off_t_value="off_t"
  @@ -100,10 +130,6 @@
   ssize_t_value="ap_int32_t"
   fi
   
  -AC_SUBST(off_t_value)
  -AC_SUBST(size_t_value)
  -AC_SUBST(ssize_t_value)
  -
   AC_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8)
   
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
  @@ -114,7 +140,6 @@
   
   AC_CHECK_DEFINE(LOCK_EX, sys/file.h)
   AC_CHECK_DEFINE(F_SETLK, fcntl.h)
  -AC_CHECK_DEFINE(PTHREAD_PROCESS_SHARED, pthread.h)
   
   dnl Checks for libraries.
   AC_BEGIN_DECISION([lock implementation method])
  @@ -153,24 +178,9 @@
   procpthreadser="0"
   fi
   
  -AC_SUBST(flockser)
  -AC_SUBST(sysvser)
  -AC_SUBST(fcntlser)
  -AC_SUBST(procpthreadser)
  -
  -pthreadser="0"
  -AC_CHECK_LIB(pthread, pthread_mutex_init, [
  -AC_DEFINE(USE_PTHREAD_SERIALIZE)
  -pthreadser="1" ])
  -AC_CHECK_LIB(c_r, pthread_mutex_init, [ 
  -AC_DEFINE(USE_PTHREAD_SERIALIZE)
  -pthreadser="1"])
  -AC_SUBST(pthreadser)
  -
   ac_cv_define_READDIR_IS_THREAD_SAFE=no
   AC_CHECK_LIB(c_r, readdir, AC_DEFINE(READDIR_IS_THREAD_SAFE))
   
  -
   case "$OS" in
  *-os2*)
  CFLAGS="$CFLAGS -DOS2 -Zmt&quo

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

1999-12-21 Thread rbb
rbb 99/12/21 14:05:05

  Modified:src/lib/apr Makefile.in
  Log:
  Cleanup the Makefile for APR a bit.  Get rid of some of the echos, and
  just display the commands as they are executed.
  
  Revision  ChangesPath
  1.14  +2 -6  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.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Makefile.in   1999/12/21 16:04:52 1.13
  +++ Makefile.in   1999/12/21 22:05:04 1.14
  @@ -42,12 +42,8 @@
@rm -Rf objs
@mkdir objs
@rm -f @[EMAIL PROTECTED]
  - @echo "===> Copying object files to objs directory"
  - @for i in $(SUBDIRS); do cp $$i/*.o objs ; done;
  - @echo "<=== Done Copying files"
  - @echo "===> Creating unified library"
  - @$(AR) cr @[EMAIL PROTECTED] objs/*.o
  - @echo "<=== Library built"
  + for i in $(SUBDIRS); do cp $$i/*.o objs ; done;
  + $(AR) cr @[EMAIL PROTECTED] objs/*.o
   
   clean: subdirs_clean
$(RM) -f *.o *.a *.so objs/*.o
  
  
  


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

1999-12-21 Thread rbb
rbb 99/12/21 13:41:55

  Modified:src  configure.in
   src/include httpd.h util_date.h
   src/main config.h.stub util.c util_date.c
   src/modules/standard mod_log_config.c
  Log:
  Remove a bunch of functions that are being replaced by functions in APR.
  Also finished porting Apache to use APR in most cases.
  
  Revision  ChangesPath
  1.14  +0 -1  apache-2.0/src/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- configure.in  1999/12/20 05:03:01 1.13
  +++ configure.in  1999/12/21 21:41:40 1.14
  @@ -83,7 +83,6 @@
   strerror \
   initgroups \
   waitpid \
  -difftime \
   gettimeofday \
   memmove \
   bzero \
  
  
  
  1.16  +0 -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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- httpd.h   1999/12/20 16:38:32 1.15
  +++ httpd.h   1999/12/21 21:41:43 1.16
  @@ -914,7 +914,6 @@
*/
   
   /* Time */
  -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz);
   API_EXPORT(char *) ap_get_time(void);
   API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype);
   API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t *t, const char 
*fmt, int gmt);
  
  
  
  1.5   +0 -1  apache-2.0/src/include/util_date.h
  
  Index: util_date.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/util_date.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- util_date.h   1999/12/20 16:38:33 1.4
  +++ util_date.h   1999/12/21 21:41:43 1.5
  @@ -76,7 +76,6 @@
   #define BAD_DATE (time_t)0
   
   API_EXPORT(int) ap_checkmask(const char *data, const char *mask);
  -API_EXPORT(time_t) ap_tm2sec(const struct tm *t);
   API_EXPORT(ap_time_t *) ap_parseHTTPdate(const char *date, ap_context_t 
*cont);
   
   #ifdef __cplusplus
  
  
  
  1.4   +0 -3  apache-2.0/src/main/Attic/config.h.stub
  
  
  
  
  1.21  +6 -43 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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- util.c1999/12/20 16:38:35 1.20
  +++ util.c1999/12/21 21:41:48 1.21
  @@ -94,12 +94,13 @@
   
   API_EXPORT(char *) ap_get_time()
   {
  -time_t t;
  -char *time_string;
  +ap_time_t *t = NULL;
  +char *time_string = NULL;
   
  -t = time(NULL);
  -time_string = ctime(&t);
  -time_string[strlen(time_string) - 1] = '\0';
  +ap_make_time(&t, NULL);
  +ap_current_time(t);
  +
  +ap_timestr(&time_string, t, APR_LOCALTIME, NULL);
   return (time_string);
   }
   
  @@ -174,37 +175,6 @@
   return ap_pstrdup(p, ts);
   }
   
  -/* What a pain in the ass. */
  -#if defined(HAVE_GMTOFF)
  -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz)
  -{
  -time_t tt = time(NULL);
  -struct tm *t;
  -
  -t = localtime(&tt);
  -*tz = (int) (t->tm_gmtoff / 60);
  -return t;
  -}
  -#else
  -API_EXPORT(struct tm *) ap_get_gmtoff(int *tz)
  -{
  -time_t tt = time(NULL);
  -struct tm gmt;
  -struct tm *t;
  -int days, hours, minutes;
  -
  -/* Assume we are never more than 24 hours away. */
  -gmt = *gmtime(&tt);  /* remember gmtime/localtime return ptr 
to static */
  -t = localtime(&tt);  /* buffer... so be careful */
  -days = t->tm_yday - gmt.tm_yday;
  -hours = ((days < -1 ? 24 : 1 < days ? -24 : days * 24)
  -  + t->tm_hour - gmt.tm_hour);
  -minutes = hours * 60 + t->tm_min - gmt.tm_min;
  -*tz = minutes;
  -return t;
  -}
  -#endif
  -
   /* Roy owes Rob beer. */
   /* Rob owes Roy dinner. */
   
  @@ -2044,13 +2014,6 @@
   
   p = sys_errlist[err];
   return (p);
  -}
  -#endif
  -
  -#ifndef HAVE_DIFFTIME
  -double difftime(time_t time1, time_t time0)
  -{
  -return (time1 - time0);
   }
   #endif
   
  
  
  
  1.7   +0 -42 apache-2.0/src/main/util_date.c
  
  Index: util_date.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util_date.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- util_date.c   1999/12/20 16:38:35 1.6
  +++ util_date.c   1999/12/21 21:41:48 1.7
  @@ -126,48 +126,6 @@
   }
   
   /*
  - * tm2sec converts a GMT tm structure into the number of seconds since
  - * 1st January 1970 U

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

1999-12-21 Thread rbb
rbb 99/12/21 13:16:20

  Modified:src/lib/apr acconfig.h aclocal.m4 configure.in
   src/lib/apr/include apr_time.h
   src/lib/apr/time/unix access.c
  Log:
  A couple of new functions for APR's time library.
  
  Revision  ChangesPath
  1.17  +2 -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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- acconfig.h1999/12/06 15:47:42 1.16
  +++ acconfig.h1999/12/21 21:16:14 1.17
  @@ -44,6 +44,8 @@
   #undef NEED_RLIM_T
   #undef USEBCOPY
   
  +#undef HAVE_GMTOFF
  +
   #undef SIZEOF_SSIZE_T
   
   @BOTTOM@
  
  
  
  1.7   +0 -1  apache-2.0/src/lib/apr/aclocal.m4
  
  Index: aclocal.m4
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/aclocal.m4,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- aclocal.m41999/11/13 00:07:04 1.6
  +++ aclocal.m41999/12/21 21:16:17 1.7
  @@ -161,4 +161,3 @@
   undefine([AC_CV_NAME])dnl
   ])
   
  -
  
  
  
  1.37  +8 -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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- configure.in  1999/12/19 18:09:59 1.36
  +++ configure.in  1999/12/21 21:16:17 1.37
  @@ -367,6 +367,14 @@
   AC_SUBST(sys_typesh)
   AC_SUBST(sys_uioh)
   
  +AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
  +[AC_TRY_COMPILE([#include 
  +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
  +  ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
  +
  +if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
  +AC_DEFINE(HAVE_GMTOFF)
  +fi
   
   MAKEFILE1="Makefile lib/Makefile "
   SUBDIRS="lib "
  
  
  
  1.6   +2 -0  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr_time.h1999/12/21 16:21:41 1.5
  +++ apr_time.h1999/12/21 21:16:19 1.6
  @@ -101,6 +101,8 @@
   ap_status_t ap_set_wday(ap_time_t *, ap_int32_t);
   ap_status_t ap_timecmp(ap_time_t *a, ap_time_t *b);
   
  +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont);
  +
   ap_status_t ap_get_timedata(ap_time_t *, char *, void *);
   ap_status_t ap_set_timedata(ap_time_t *, void *, char *,
   ap_status_t (*cleanup) (void *));
  
  
  
  1.9   +37 -0 apache-2.0/src/lib/apr/time/unix/access.c
  
  Index: access.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/access.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- access.c  1999/12/20 16:10:15 1.8
  +++ access.c  1999/12/21 21:16:19 1.9
  @@ -383,3 +383,40 @@
   }
   }
   
  +#if defined(HAVE_GMTOFF)
  +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont)
  +{
  +if (tt->currtime == NULL) {
  +tt->currtime = ap_pcalloc(cont, sizeof(struct timeval));
  +}
  +tt->currtime->tv_sec = time(NULL);
  +tt->explodedtime = localtime(&tt->currtime->tv_sec);
  +*tz = (int) (tt->explodedtime->tm_gmtoff / 60);
  +return APR_SUCCESS;
  +}
  +#else
  +ap_status_t ap_get_gmtoff(int *tz, ap_time_t *tt, ap_context_t *cont)
  +{
  +struct tm gmt;
  +int days, hours, minutes;
  +
  +if (tt->currtime == NULL) {
  +tt->currtime = ap_pcalloc(cont, sizeof(struct timeval));
  +}
  +tt->currtime->tv_sec = time(NULL);
  +
  +/* Assume we are never more than 24 hours away. */
  +/* remember gmtime/localtime return ptr to static */
  +/* buffer... so be careful */
  +gmt = *gmtime(&tt->currtime->tv_sec); 
  +tt->explodedtime = localtime(&tt->currtime->tv_sec);
  +days = tt->explodedtime->tm_yday - gmt.tm_yday;
  +hours = ((days < -1 ? 24 : 1 < days ? -24 : days * 24)
  + + tt->explodedtime->tm_hour - gmt.tm_hour);
  +minutes = hours * 60 + tt->explodedtime->tm_min - gmt.tm_min;
  +*tz = minutes;
  +return APR_SUCCESS;
  +}
  +#endif
  +
  +
  
  
  


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

1999-12-21 Thread rbb
rbb 99/12/21 08:21:44

  Modified:src/lib/apr/include apr_time.h
   src/lib/apr/time/unix timestr.c
   src/main http_protocol.c
  Log:
  Change ap_gm_timestr_822 to ap_timestr.  Now, one function can be used to get
  a timestr for GMT and Localtimes.
  
  Revision  ChangesPath
  1.5   +1 -1  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_time.h1999/12/20 16:10:11 1.4
  +++ apr_time.h1999/12/21 16:21:41 1.5
  @@ -76,7 +76,7 @@
   ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e);
   ap_status_t ap_implode_time(ap_time_t *);
   
  -ap_status_t ap_gm_timestr_822(char **date_str, struct atime_t *t, 
ap_context_t *p);
  +ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e 
type, ap_context_t *p);
   ap_status_t ap_strftime(char *s, ap_size_t max, const char *format, 
ap_time_t *tm);
   
   /* accessor functions */
  
  
  
  1.2   +8 -8  apache-2.0/src/lib/apr/time/unix/timestr.c
  
  Index: timestr.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/timestr.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- timestr.c 1999/12/20 16:10:16 1.1
  +++ timestr.c 1999/12/21 16:21:43 1.2
  @@ -65,7 +65,7 @@
   "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
   };
   
  -ap_status_t ap_gm_timestr_822(char **date_str, struct atime_t *t, 
ap_context_t *p)
  +ap_status_t ap_timestr(char **date_str, struct atime_t *t, ap_timetype_e 
type, ap_context_t *p)
   {
   struct tm *tms;
   char *date_str_ptr;
  @@ -74,9 +74,7 @@
   (*date_str) = ap_palloc(p, 48 * sizeof(char));
   date_str_ptr = (*date_str);
   
  -if (t->time_ex == 0) {
  -ap_explode_time(t, APR_UTCTIME);
  -}
  +ap_explode_time(t, type);
   
   /* Assumption: this is always 3 */
   /* i = strlen(ap_day_snames[tms->tm_wday]); */
  @@ -107,10 +105,12 @@
   *date_str_ptr++ = ':';
   *date_str_ptr++ = t->explodedtime->tm_sec / 10 + '0';
   *date_str_ptr++ = t->explodedtime->tm_sec % 10 + '0';
  -*date_str_ptr++ = ' ';
  -*date_str_ptr++ = 'G';
  -*date_str_ptr++ = 'M';
  -*date_str_ptr++ = 'T';
  +if (type == APR_UTCTIME) {
  +*date_str_ptr++ = ' ';
  +*date_str_ptr++ = 'G';
  +*date_str_ptr++ = 'M';
  +*date_str_ptr++ = 'T';
  +}
   *date_str_ptr = '\0';

   return APR_SUCCESS;
   /* RFC date format; as strftime '%a, %d %b %Y %T GMT' */
  
  
  
  1.44  +3 -3  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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- http_protocol.c   1999/12/21 11:33:22 1.43
  +++ http_protocol.c   1999/12/21 16:21:44 1.44
  @@ -605,7 +605,7 @@
   {
   ap_time_t *mod_time = ap_rationalize_mtime(r, r->mtime);
   char *datestr;
  -ap_gm_timestr_822(&datestr, mod_time, r->pool);
  +ap_timestr(&datestr, mod_time, APR_UTCTIME, r->pool);
   ap_table_setn(r->headers_out, "Last-Modified", datestr);
   }
   
  @@ -1362,7 +1362,7 @@
   
   ap_rvputs(r, protocol, " ", r->status_line, "\015\012", NULL);
   
  -ap_gm_timestr_822(&date, r->request_time, r->pool);
  +ap_timestr(&date, r->request_time, APR_UTCTIME, r->pool);
   ap_send_header_field(r, "Date", date);
   ap_send_header_field(r, "Server", ap_get_server_version());
   
  @@ -1645,7 +1645,7 @@
* some other part of the server configuration.
*/
   if (r->no_cache && !ap_table_get(r->headers_out, "Expires")) {
  -ap_gm_timestr_822(&date, r->request_time, r->pool);
  +ap_timestr(&date, r->request_time, APR_UTCTIME, r->pool);
   ap_table_addn(r->headers_out, "Expires", date);
   }
   
  
  
  


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

1999-12-21 Thread rbb
rbb 99/12/21 08:04:52

  Modified:src/lib/apr Makefile.in
  Log:
  Insert some output messages when creating the library.
  
  Revision  ChangesPath
  1.13  +4 -0  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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Makefile.in   1999/10/24 04:22:22 1.12
  +++ Makefile.in   1999/12/21 16:04:52 1.13
  @@ -42,8 +42,12 @@
@rm -Rf objs
@mkdir objs
@rm -f @[EMAIL PROTECTED]
  + @echo "===> Copying object files to objs directory"
@for i in $(SUBDIRS); do cp $$i/*.o objs ; done;
  + @echo "<=== Done Copying files"
  + @echo "===> Creating unified library"
@$(AR) cr @[EMAIL PROTECTED] objs/*.o
  + @echo "<=== Library built"
   
   clean: subdirs_clean
$(RM) -f *.o *.a *.so objs/*.o
  
  
  


Re: cvs commit: apache-2.0 STATUS

1999-12-21 Thread rbb

>
>Release:
>   -
>   -2.0: In pre-alpha development
>   -

When did we get out of pre-alpha development?  Last time I checked, we
hadn't released an alpha, and that means this is still pre-alpha code.  I
would like this put back, because there are still some changes that need
to be made before we "officially" release an alpha.

It isn't so much functionality, as it is making the code use APR all over
the place, but if we make the change after the alpha release, we make it
much harder for people to port modules.

>   -Plan:
>
>   -* Vague goal of an alpha or beta release in 1999. Commit-then-review
>   -  is active.
>   +Assuming more features aren't demanded for the 2.0 release
>   +2.0a1/b1: January 2000
>   +2.0 : Early 2000

I guess I'm wondering when this was decided.  I would like to see an alpha
in January, a beta in February, and a release when it is ready.  We
released 7 beta's for 1.3, I expect almost as many if not more for 2.0.  I
don't want to make grand plans to release 2.0 in "early 2000" if we can't
meet it.

Ryan

___
Ryan Bloom  [EMAIL PROTECTED]
6209 H Shanda Dr.
Raleigh, NC 27609   Ryan Bloom -- thinker, adventurer, artist,
 writer, but mostly, friend.
---



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

1999-12-20 Thread rbb
rbb 99/12/20 12:03:20

  Modified:src/lib/apr/file_io/unix Makefile.in
   src/lib/apr/lib Makefile.in
   src/lib/apr/locks/unix Makefile.in
   src/lib/apr/misc/unix Makefile.in
   src/lib/apr/mmap/unix Makefile.in
   src/lib/apr/network_io/unix Makefile.in
   src/lib/apr/threadproc/unix Makefile.in
   src/lib/apr/time/unix Makefile.in
  Log:
  Fix the build process for APR.  There is no reason to build each library
  individually if we are just going to combine them into one library later.
  I am just commenting out those lines we don't need anymore.  They will
  probably go away very soon, but I want to think about it a bit more.
  
  Revision  ChangesPath
  1.7   +8 -9  apache-2.0/src/lib/apr/file_io/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/Makefile.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.in   1999/12/03 15:18:22 1.6
  +++ Makefile.in   1999/12/20 20:02:22 1.7
  @@ -9,11 +9,10 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
  -INCDIR1=../../include
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
  +INCDIR=../../include
  +INCLUDES=-I$(INCDIR) -I.
   
  -LIB=libfile.a
  +#LIB=libfile.a
   
   OBJS=dir.o \
fileacc.o \
  @@ -27,7 +26,7 @@
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
   
  -all: $(LIB)
  +all: $(OBJS)
   
   clean:
$(RM) -f *.o *.a *.so
  @@ -37,10 +36,10 @@
   
   $(OBJS): Makefile
   
  -$(LIB): $(OBJS)
  - $(RM) -f $@
  - $(AR) cr $@ $(OBJS)
  - $(RANLIB) $@
  +#$(LIB): $(OBJS)
  +#$(RM) -f $@
  +#$(AR) cr $@ $(OBJS)
  +#$(RANLIB) $@
   
   #
   # We really don't expect end users to use this rule.  It works only with
  
  
  
  1.9   +6 -6  apache-2.0/src/lib/apr/lib/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/Makefile.in,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Makefile.in   1999/12/19 18:10:01 1.8
  +++ Makefile.in   1999/12/20 20:02:30 1.9
  @@ -14,7 +14,7 @@
   INCDIR1=../misc/@OSDIR@
   INCLUDES=-I$(INCDIR) -I$(INCDIR1)
   
  [EMAIL PROTECTED]@apr.a
  [EMAIL PROTECTED]@apr.a
   
   OBJS=apr_cpystrn.o \
apr_fnmatch.o \
  @@ -30,7 +30,7 @@
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
   
  -all: $(LIB)
  +all: $(OBJS)
   
   clean:
$(RM) -f *.o *.a *.so
  @@ -40,10 +40,10 @@
   
   $(OBJS): Makefile
   
  -$(LIB): $(OBJS)
  - $(RM) -f $@
  - $(AR) cr $@ $(OBJS)
  - $(RANLIB) $@
  +#$(LIB): $(OBJS)
  +#$(RM) -f $@
  +#$(AR) cr $@ $(OBJS)
  +#$(RANLIB) $@
   
   #
   # We really don't expect end users to use this rule.  It works only with
  
  
  
  1.6   +7 -8  apache-2.0/src/lib/apr/locks/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/12/03 15:18:26 1.5
  +++ Makefile.in   1999/12/20 20:02:38 1.6
  @@ -9,12 +9,11 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
   INCDIR1=../../include
   INCDIR2=../../file_io/unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) -I.
  +INCLUDES=-I$(INCDIR1) -I$(INCDIR2) -I.
   
  -LIB=liblock.a
  +#LIB=liblock.a
   
   OBJS=locks.o \
crossproc.o \
  @@ -23,7 +22,7 @@
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
   
  -all: $(LIB)
  +all: $(OBJS)
   
   clean:
$(RM) -f *.o *.a *.so
  @@ -33,10 +32,10 @@
   
   $(OBJS): Makefile
   
  -$(LIB): $(OBJS)
  - $(RM) -f $@
  - $(AR) cr $@ $(OBJS)
  - $(RANLIB) $@
  +#$(LIB): $(OBJS)
  +#$(RM) -f $@
  +#$(AR) cr $@ $(OBJS)
  +#$(RANLIB) $@
   
   #
   # We really don't expect end users to use this rule.  It works only with
  
  
  
  1.8   +7 -8  apache-2.0/src/lib/apr/misc/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/Makefile.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.in   1999/12/03 15:18:29 1.7
  +++ Makefile.in   1999/12/20 20:02:45 1.8
  @@ -9,19 +9,18 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
   INCDIR1=../../include
   INCDIR2=../../file_io/unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) -I.
  +INCLUDES=-I$(INCDIR1) -I$(INCDIR2) -I.
   
  -LI

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

1999-12-20 Thread rbb
rbb 99/12/20 11:44:48

  Modified:src/lib/apr/test htdigest.c
  Log:
  Remove the apr_config.h include line and the ifdefs that require it.  This
  file will need to be updated when it is moved back into the Apache tree to
  check for system headers again, but right now, it can't check because we
  don't have a header file for it to use.
  
  Revision  ChangesPath
  1.11  +0 -9  apache-2.0/src/lib/apr/test/htdigest.c
  
  Index: htdigest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/htdigest.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- htdigest.c1999/12/15 12:20:40 1.10
  +++ htdigest.c1999/12/20 19:44:42 1.11
  @@ -66,21 +66,12 @@
* by Alexei Kosut, based on htpasswd.c, by Rob McCool
*/
   
  -#include "apr_config.h"
   #include "apr_lib.h"
   #include "apr_md5.h"
  -#ifdef HAVE_SYS_TYPES_H
   #include 
  -#endif
  -#ifdef HAVE_SYS_SIGNAL_H
   #include 
  -#endif
  -#ifdef HAVE_SIGNAL_H
   #include 
  -#endif
  -#ifdef HAVE_STDLIB_H
   #include 
  -#endif
   
   #ifdef WIN32
   #include 
  
  
  


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

1999-12-20 Thread rbb
rbb 99/12/20 08:38:41

  Modified:src/include http_protocol.h http_request.h httpd.h
util_date.h
   src/main http_core.c http_protocol.c http_request.c util.c
util_date.c util_script.c
   src/modules/standard mod_include.c mod_log_config.c
mod_negotiation.c
  Log:
  First step in getting Apache to use APR's time libraries.  This gets a good
  number of them, but I think there are more time values still in the Apache
  code.  This works under Linux, but has not been tested anywhere else.
  
  Revision  ChangesPath
  1.9   +1 -1  apache-2.0/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/http_protocol.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_protocol.h   1999/11/20 11:56:11 1.8
  +++ http_protocol.h   1999/12/20 16:38:31 1.9
  @@ -118,7 +118,7 @@
   
   API_EXPORT(int) ap_set_content_length(request_rec *r, long length);
   API_EXPORT(int) ap_set_keepalive(request_rec *r);
  -API_EXPORT(time_t) ap_rationalize_mtime(request_rec *r, time_t mtime);
  +API_EXPORT(ap_time_t *) ap_rationalize_mtime(request_rec *r, ap_time_t 
*mtime);
   API_EXPORT(char *) ap_make_etag(request_rec *r, int force_weak);
   API_EXPORT(void) ap_set_etag(request_rec *r);
   API_EXPORT(void) ap_set_last_modified(request_rec *r);
  
  
  
  1.4   +1 -1  apache-2.0/src/include/http_request.h
  
  Index: http_request.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/http_request.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- http_request.h1999/08/31 05:32:19 1.3
  +++ http_request.h1999/12/20 16:38:31 1.4
  @@ -104,7 +104,7 @@
   API_EXPORT(void) ap_internal_redirect_handler(const char *new_uri, 
request_rec *);
   API_EXPORT(int) ap_some_auth_required(request_rec *r);
   API_EXPORT(int) ap_is_initial_req(request_rec *r);
  -API_EXPORT(time_t) ap_update_mtime(request_rec *r, time_t dependency_mtime);
  +API_EXPORT(ap_time_t *) ap_update_mtime(request_rec *r, ap_time_t 
*dependency_mtime);
   
   #ifdef CORE_PRIVATE
   /* Function called by main.c to handle first-level request */
  
  
  
  1.15  +4 -7  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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- httpd.h   1999/12/08 00:14:03 1.14
  +++ httpd.h   1999/12/20 16:38:32 1.15
  @@ -71,6 +71,7 @@
   #include "ap_config.h"
   #include "apr_general.h"
   #include "apr_lib.h"
  +#include "apr_time.h"
   #include "buff.h"
   #include "ap.h"
   
  @@ -667,7 +668,7 @@
   int proto_num;   /* Number version of protocol; 1.1 = 1001 */
   const char *hostname;/* Host, as set by full URI or Host: */
   
  -time_t request_time; /* When the request started */
  +ap_time_t *request_time; /* When the request started */
   
   const char *status_line; /* Status line, if set by script */
   int status;  /* In any case */
  @@ -703,7 +704,7 @@
   
   int sent_bodyct; /* byte count in stream is for body */
   long bytes_sent; /* body byte count, for easy access */
  -time_t mtime;/* Time the resource was last modified */
  +ap_time_t *mtime;/* Time the resource was last modified 
*/
   
   /* HTTP/1.1 connection-level features */
   
  @@ -913,14 +914,10 @@
*/
   
   /* Time */
  -extern API_VAR_EXPORT const char ap_month_snames[12][4];
  -extern API_VAR_EXPORT const char ap_day_snames[7][4];
  -
   API_EXPORT(struct tm *) ap_get_gmtoff(int *tz);
   API_EXPORT(char *) ap_get_time(void);
   API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype);
  -API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, 
int gmt);
  -API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t t);
  +API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t *t, const char 
*fmt, int gmt);
   
   /* String handling. The *_nc variants allow you to use non-const char **s as
  arguments (unfortunately C won't automatically convert a char ** to a 
const
  
  
  
  1.4   +2 -1  apache-2.0/src/include/util_date.h
  
  Index: util_date.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/util_date.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- util_date.h   1999/08/27 22:18:45 1.3
  +++ util_date.h   1999/12/20 16:38:33 1.4
  @@ -71,12

cvs commit: apache-2.0/src/lib/apr/time/unix timestr.c Makefile.in access.c atime.h time.c

1999-12-20 Thread rbb
rbb 99/12/20 08:10:19

  Modified:src/lib/apr/include apr.h.in apr_errno.h apr_time.h
   src/lib/apr/time/unix Makefile.in access.c atime.h time.c
  Added:   src/lib/apr/time/unix timestr.c
  Log:
  A bunch more time functions for use in Apache.  This is really the first cut
  at making the time library usable in an actual program.
  
  Revision  ChangesPath
  1.7   +1 -0  apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr.h.in  1999/12/06 18:19:33 1.6
  +++ apr.h.in  1999/12/20 16:10:10 1.7
  @@ -70,6 +70,7 @@
   #define API_EXPORT(type) type
   #define API_EXPORT_NONSTD(type)  type
   #define API_VAR_IMPORT   extern
  +#define API_VAR_EXPORT   
   
   
   #endif /* APR_H */
  
  
  
  1.12  +3 -0  apache-2.0/src/lib/apr/include/apr_errno.h
  
  Index: apr_errno.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_errno.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr_errno.h   1999/12/09 21:00:20 1.11
  +++ apr_errno.h   1999/12/20 16:10:11 1.12
  @@ -124,6 +124,9 @@
   #define APR_BADARG (APR_OS_START_STATUS + 13)
   #define APR_EOF(APR_OS_START_STATUS + 14)
   #define APR_NOTFOUND   (APR_OS_START_STATUS + 15)
  +#define APR_LESS   (APR_OS_START_STATUS + 16)
  +#define APR_EQUAL  (APR_OS_START_STATUS + 17)
  +#define APR_MORE   (APR_OS_START_STATUS + 18)
   
   /* A simple value to be used to initialze a status variable. */
   #define APR_EINIT  (APR_OS_START_STATUS + 16)  
  
  
  
  1.4   +8 -0  apache-2.0/src/lib/apr/include/apr_time.h
  
  Index: apr_time.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_time.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_time.h1999/10/04 16:36:55 1.3
  +++ apr_time.h1999/12/20 16:10:11 1.4
  @@ -67,12 +67,18 @@
   
   typedef struct atime_t   ap_time_t;
   
  +API_VAR_IMPORT const char ap_month_snames[12][4];
  +API_VAR_IMPORT const char ap_day_snames[7][4];
  +
   /* Function Definitions */
   ap_status_t ap_make_time(ap_time_t **, ap_context_t *);
   ap_status_t ap_current_time(ap_time_t *);
   ap_status_t ap_explode_time(ap_time_t *, ap_timetype_e);
   ap_status_t ap_implode_time(ap_time_t *);
   
  +ap_status_t ap_gm_timestr_822(char **date_str, struct atime_t *t, 
ap_context_t *p);
  +ap_status_t ap_strftime(char *s, ap_size_t max, const char *format, 
ap_time_t *tm);
  +
   /* accessor functions */
   ap_status_t ap_get_curtime(ap_time_t *, ap_int64_t *);
   ap_status_t ap_timediff(ap_time_t *, ap_time_t *, ap_int32_t *);
  @@ -85,6 +91,7 @@
   ap_status_t ap_get_year(ap_time_t *, ap_int32_t *);
   ap_status_t ap_get_wday(ap_time_t *, ap_int32_t *);
   
  +ap_status_t ap_set_curtime(ap_time_t *, ap_int64_t);
   ap_status_t ap_set_sec(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_min(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_hour(ap_time_t *, ap_int32_t);
  @@ -92,6 +99,7 @@
   ap_status_t ap_set_mon(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_year(ap_time_t *, ap_int32_t);
   ap_status_t ap_set_wday(ap_time_t *, ap_int32_t);
  +ap_status_t ap_timecmp(ap_time_t *a, ap_time_t *b);
   
   ap_status_t ap_get_timedata(ap_time_t *, char *, void *);
   ap_status_t ap_set_timedata(ap_time_t *, void *, char *,
  
  
  
  1.8   +11 -4 apache-2.0/src/lib/apr/time/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/Makefile.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.in   1999/12/19 18:10:05 1.7
  +++ Makefile.in   1999/12/20 16:10:15 1.8
  @@ -15,7 +15,8 @@
   LIB=libtime.a
   
   OBJS=time.o \
  - access.o
  + access.o \
  + timestr.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
  @@ -53,10 +54,16 @@
   access.o: access.c atime.h ../../include/apr_config.h \
../../include/apr_time.h ../../include/apr_general.h \
../../include/apr.h ../../include/apr_errno.h ../../include/apr_lib.h \
  - ../../include/apr_file_io.h
  + ../../include/apr_file_io.h ../../include/apr_thread_proc.h
   time.o: time.c atime.h ../../include/apr_config.h \
../../include/apr_time.h ../../include/apr_general.h \
../../include/apr.h ../../include/apr_errno.h ../../include/apr_lib.h \
  - ../../include/apr_file_io.h ../../include/apr_portable.h \
  - ../../include/apr_thread_proc.h ../../include/apr_network_i

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

1999-12-17 Thread rbb
rbb 99/12/17 07:14:07

  Modified:src/lib/apr/file_io/win32 open.c
  Log:
  With this change, error loggin on Win32 works again.
  
  Revision  ChangesPath
  1.15  +0 -1  apache-2.0/src/lib/apr/file_io/win32/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/open.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- open.c1999/12/15 18:06:32 1.14
  +++ open.c1999/12/17 15:14:06 1.15
  @@ -211,7 +211,6 @@
   (*thefile)->filehand = GetStdHandle(STD_ERROR_HANDLE);
   (*thefile)->cntxt = cont;
   (*thefile)->fname = NULL;
  -(*thefile)->filehand = NULL;
   (*thefile)->stated = 0;
   (*thefile)->buffered = 0;
   (*thefile)->eof_hit = 0;
  
  
  


cvs commit: apache-2.0/src/lib/apr/test ab_apr.dsp client.dsp server.dsp test.dsw testarg.dsp testfile.dsp testproc.dsp testsock.dsp testthread.dsp timetest.dsp

1999-12-17 Thread rbb
rbb 99/12/17 04:41:43

  Modified:src/lib/apr/test ab_apr.dsp client.dsp server.dsp test.dsw
testarg.dsp testfile.dsp testproc.dsp testsock.dsp
testthread.dsp timetest.dsp
  Log:
  New project files for all of the APR test programs.  With these changes,
  APR on windows just got a lot easier to maintain.
  Submitted by:   Allan Edwards
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.2   +2 -2  apache-2.0/src/lib/apr/test/ab_apr.dsp
  
  Index: ab_apr.dsp
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/ab_apr.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ab_apr.dsp1999/08/17 15:59:48 1.1
  +++ ab_apr.dsp1999/12/17 12:41:27 1.2
  @@ -49,7 +49,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
  -# ADD LINK32 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib 
..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib 
..\time\win32\Debug\time.lib ..\locks\win32\Debug\locks.lib 
..\network_io\win32\Debug\network_io.lib ..\signal\win32\Debug\signal.lib 
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo 
/subsystem:console /machine:I386
  +# ADD LINK32 ..\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 
/out:"..\Release\ab_apr.exe"
   
   !ELSEIF  "$(CFG)" == "ab_apr - Win32 Debug"
   
  @@ -74,7 +74,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 
/pdbtype:sept
  -# ADD LINK32 ..\lib\Debug\lib.lib ..\misc\win32\Debug\misc.lib 
..\threadproc\win32\Debug\threadproc.lib ..\file_io\win32\Debug\file_io.lib 
..\time\win32\Debug\time.lib ..\locks\win32\Debug\locks.lib 
..\network_io\win32\Debug\network_io.lib ..\signal\win32\Debug\signal.lib 
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib 
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo 
/subsystem:console /debug /machine:I386 /out:"ab_apr\ab.exe" /pdbtype:sept
  +# ADD LINK32 ..\Debug\aprlib.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug 
/machine:I386 /out:"..\Debug\ab_apr.exe" /pdbtype:sept
   
   !ENDIF 
   
  
  
  
  1.2   +2 -2  apache-2.0/src/lib/apr/test/client.dsp
  
  Index: client.dsp
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/client.dsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- client.dsp1999/08/17 15:59:47 1.1
  +++ client.dsp1999/12/17 12:41:30 1.2
  @@ -49,7 +49,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
  -# ADD LINK32 ..\network_io\win32\Debug\network_io.lib ..\lib\Debug\lib.lib 
..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib 
..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib 
..\locks\win32\Debug\locks.lib ..\signal\win32\Debug\signal.lib kernel32.lib 
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib 
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo 
/subsystem:console /machine:I386
  +# ADD LINK32 ..\Release\aprlib.lib kernel32.lib user32.lib gdi32.lib 
winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 
/out:"..\Release\client.exe"
   
   !ELSEIF  "$(CFG)" == "client - Win32 Debug"
   
  @@ -74,7 +74,7 @@
   # ADD BSC32 /nologo
   LINK32=link.exe
   # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib 
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib 
odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 
/pdbtype:sept
  -# ADD LINK32 ..\locks\win32\debug\locks.lib ..\lib\Debug\lib.lib 
..\misc\win32\Debug\misc.lib ..\threadproc\win32\Debug\threadproc.lib 
..\file_io\win32\Debug\file_io.lib ..\time\win32\Debug\time.lib 
..\locks

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

1999-12-17 Thread rbb
rbb 99/12/17 04:32:16

  Modified:src/lib/apr/test ab_apr.c testproc.c
   src/lib/apr/include apr_win.h
   src/lib/apr/network_io/win32 sockets.c
  Log:
  Various fixes for Win32 APR.  The test cases all almost work again on
  windows.  The 1 second sleep that has been added to testproc is so that
  Windows has time to notice the update to the file system.
  Submitted by:   Allan Edwards
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.13  +15 -15apache-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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ab_apr.c  1999/12/03 16:12:25 1.12
  +++ ab_apr.c  1999/12/17 12:32:13 1.13
  @@ -1,4 +1,4 @@
  -/* 
  + /* 
* Copyright (c) 1998-1999 The Apache Group.  All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
  @@ -146,8 +146,8 @@
   #define ap_max(a,b) ((a)>(b))?(a):(b)
   
   /* - GLOBALS  */
  -API_VAR_IMPORT char *optarg;/* argument associated 
with option */
  -API_VAR_IMPORT int optind;
  +API_VAR_IMPORT char *ap_optarg;/* argument 
associated with option */
  +API_VAR_IMPORT int ap_optind;
   
   int verbosity = 0;   /* no verbosity by default */
   int posting = 0; /* GET by default */
  @@ -900,11 +900,11 @@
   ap_make_time(&start, cntxt);
   ap_make_time(&endtime, cntxt);
   
  -optind = 1;
  +ap_optind = 1;
   while (ap_getopt(cntxt, argc, argv, "n:c:t:T:p:v:kVhwx:y:z:", &c) == 
APR_SUCCESS) {
   switch (c) {
   case 'n':
  -requests = atoi(optarg);
  +requests = atoi(ap_optarg);
   if (!requests) {
err("Invalid number of requests\n");
   }
  @@ -913,10 +913,10 @@
   keepalive = 1;
   break;
   case 'c':
  -concurrency = atoi(optarg);
  +concurrency = atoi(ap_optarg);
   break;
   case 'p':
  -if (0 == (r = open_postfile(optarg))) {
  +if (0 == (r = open_postfile(ap_optarg))) {
posting = 1;
   }
   else if (postdata) {
  @@ -924,14 +924,14 @@
   }
   break;
   case 'v':
  -verbosity = atoi(optarg);
  +verbosity = atoi(ap_optarg);
   break;
   case 't':
  -tlimit = atoi(optarg);
  +tlimit = atoi(ap_optarg);
   requests = MAX_REQUESTS; /* need to size data array on something 
*/
   break;
   case 'T':
  -strcpy(content_type, optarg);
  +strcpy(content_type, ap_optarg);
   break;
   case 'V':
   copyright();
  @@ -943,15 +943,15 @@
   /* if any of the following three are used, turn on html output 
automatically  */
   case 'x':
   use_html = 1;
  -tablestring = optarg;
  +tablestring = ap_optarg;
   break;
   case 'y':
   use_html = 1;
  -trstring = optarg;
  +trstring = ap_optarg;
   break;
   case 'z':
   use_html = 1;
  -tdstring = optarg;
  +tdstring = ap_optarg;
   break;
   case 'h':
   usage(argv[0]);
  @@ -962,12 +962,12 @@
   break;
   }
   }
  -if (optind != argc - 1) {
  +if (ap_optind != argc - 1) {
   fprintf(stderr, "%s: wrong number of arguments\n", argv[0]);
   usage(argv[0]);
   }
   
  -if (parse_url(argv[optind++])) {
  +if (parse_url(argv[ap_optind++])) {
   fprintf(stderr, "%s: invalid URL\n", argv[0]);
   usage(argv[0]);
   }
  
  
  
  1.7   +1 -0  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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- testproc.c1999/12/03 15:18:36 1.6
  +++ testproc.c1999/12/17 12:32:14 1.7
  @@ -168,6 +168,7 @@
   }
   else fprintf(stderr, "Read failed.\n");
   
  +Sleep(1000);
   fprintf(stdout, "Removing directory...");
   if (ap_remove_dir("pro

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

1999-12-16 Thread rbb
rbb 99/12/16 11:58:08

  Modified:src/modules/standard mod_include.c
  Log:
  After a few hours of thorough testing, this patch makes CGI's through SSI's
  work properly on Linux.  We will be testing this change on Win32 momentarily,
  but because we are relying on APR for the dirty work, I have no fears.  :-)
  
  Revision  ChangesPath
  1.12  +16 -12apache-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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_include.c 1999/12/16 15:41:28 1.11
  +++ mod_include.c 1999/12/16 19:58:00 1.12
  @@ -780,7 +780,7 @@
   const char *args = r->args;
   
   if (!args || !args[0] || strchr(args, '=')) {
  -   *argv = NULL;
  +   numwords = 1;
   }
   else {
   /* count the number of keywords */
  @@ -789,18 +789,21 @@
   ++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;
   }
  +/* Everything is - 1 to account for the first parameter which is the
  + * program name.  We didn't used to have to do this, but APR wants it.
  + */
  +if (numwords > APACHE_ARG_MAX - 1) {
  +numwords = APACHE_ARG_MAX - 1;   /* Truncate args to prevent 
overrun */
  +}
  +*argv = (char **) ap_palloc(p, (numwords + 2) * sizeof(char *));
  + 
  +for (x = 1, idx = 1; 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;
   }
  @@ -861,6 +864,7 @@
   }
   else {
   build_argv_list(&argv, r, r->pool);
  +argv[0] = ap_pstrdup(r->pool, s);
   rc = ap_create_process(&procnew, s, argv, 
ap_create_environment(r->pool, env), procattr, r->pool);
   
   if (rc != APR_SUCCESS) {
  
  
  


cvs commit: apache-2.0/src/os/win32 modules.c

1999-12-16 Thread rbb
rbb 99/12/16 07:46:18

  Modified:src  ApacheCore.dsp ApacheCore.mak
   src/os/win32 modules.c
  Log:
  Include mod_include and mod_so in the Windows build.
  Submitted by:   Allan Edwards
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.9   +8 -0  apache-2.0/src/ApacheCore.dsp
  
  Index: ApacheCore.dsp
  ===
  RCS file: /home/cvs/apache-2.0/src/ApacheCore.dsp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ApacheCore.dsp1999/12/15 19:32:23 1.8
  +++ ApacheCore.dsp1999/12/16 15:46:14 1.9
  @@ -190,6 +190,10 @@
   # End Source File
   # Begin Source File
   
  +SOURCE=.\modules\standard\mod_include.c
  +# End Source File
  +# Begin Source File
  +
   SOURCE=.\modules\standard\mod_log_config.c
   # End Source File
   # Begin Source File
  @@ -203,6 +207,10 @@
   # Begin Source File
   
   SOURCE=.\modules\standard\mod_setenvif.c
  +# End Source File
  +# Begin Source File
  +
  +SOURCE=.\modules\standard\mod_so.c
   # End Source File
   # Begin Source File
   
  
  
  
  1.10  +190 -821  apache-2.0/src/ApacheCore.mak
  
  Index: ApacheCore.mak
  ===
  RCS file: /home/cvs/apache-2.0/src/ApacheCore.mak,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ApacheCore.mak1999/12/15 19:32:24 1.9
  +++ ApacheCore.mak1999/12/16 15:46:14 1.10
  @@ -74,10 +74,12 @@
[EMAIL PROTECTED] "$(INTDIR)\mod_dir.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_env.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_imap.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_include.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_log_config.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_mime.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_negotiation.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_setenvif.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_so.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_userdir.obj"
[EMAIL PROTECTED] "$(INTDIR)\modules.obj"
[EMAIL PROTECTED] "$(INTDIR)\rfc1413.obj"
  @@ -139,10 +141,12 @@
"$(INTDIR)\mod_dir.obj" \
"$(INTDIR)\mod_env.obj" \
"$(INTDIR)\mod_imap.obj" \
  + "$(INTDIR)\mod_include.obj" \
"$(INTDIR)\mod_log_config.obj" \
"$(INTDIR)\mod_mime.obj" \
"$(INTDIR)\mod_negotiation.obj" \
"$(INTDIR)\mod_setenvif.obj" \
  + "$(INTDIR)\mod_so.obj" \
"$(INTDIR)\mod_userdir.obj" \
"$(INTDIR)\modules.obj" \
"$(INTDIR)\rfc1413.obj" \
  @@ -224,6 +228,8 @@
[EMAIL PROTECTED] "$(INTDIR)\mod_env.sbr"
[EMAIL PROTECTED] "$(INTDIR)\mod_imap.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_imap.sbr"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_include.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_include.sbr"
[EMAIL PROTECTED] "$(INTDIR)\mod_log_config.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_log_config.sbr"
[EMAIL PROTECTED] "$(INTDIR)\mod_mime.obj"
  @@ -232,6 +238,8 @@
[EMAIL PROTECTED] "$(INTDIR)\mod_negotiation.sbr"
[EMAIL PROTECTED] "$(INTDIR)\mod_setenvif.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_setenvif.sbr"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_so.obj"
  + [EMAIL PROTECTED] "$(INTDIR)\mod_so.sbr"
[EMAIL PROTECTED] "$(INTDIR)\mod_userdir.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_userdir.sbr"
[EMAIL PROTECTED] "$(INTDIR)\modules.obj"
  @@ -296,10 +304,12 @@
"$(INTDIR)\mod_dir.sbr" \
"$(INTDIR)\mod_env.sbr" \
"$(INTDIR)\mod_imap.sbr" \
  + "$(INTDIR)\mod_include.sbr" \
"$(INTDIR)\mod_log_config.sbr" \
"$(INTDIR)\mod_mime.sbr" \
"$(INTDIR)\mod_negotiation.sbr" \
"$(INTDIR)\mod_setenvif.sbr" \
  + "$(INTDIR)\mod_so.sbr" \
"$(INTDIR)\mod_userdir.sbr" \
"$(INTDIR)\modules.sbr" \
"$(INTDIR)\rfc1413.sbr" \
  @@ -349,10 +359,12 @@
"$(INTDIR)\mod_dir.obj" \
"$(INTDIR)\mod_env.obj" \
"$(INTDIR)\mod_imap.obj" \
  + "$(INTDIR)\mod_include.obj" \
"$(INTDIR)\mod_log_config.obj" \
"$(INTDIR)\mod_mime.obj" \
"$(INTDIR)\mod_negotiation.obj" \
"$(INTDIR)\mod_setenvif.obj" \
  + "$(INTDIR)\mod_so.obj" \
"$(INTDIR)\mod_user

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

1999-12-16 Thread rbb
rbb 99/12/16 07:41:29

  Modified:src/modules/standard mod_include.c
  Log:
  Fix mod_include so it works.  Both people came up with very similar patches at
  about the same time.  Since the work was duplicated, I am putting both names
  on the patch.
  Submitted by:   Allan Edwards and Paul Reder
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.11  +4 -4  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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_include.c 1999/12/13 20:52:28 1.10
  +++ mod_include.c 1999/12/16 15:41:28 1.11
  @@ -853,20 +853,20 @@
   (ap_setprocattr_io(procattr, APR_NO_PIPE, 
  APR_FULL_BLOCK, APR_NO_PIPE) != APR_SUCCESS) ||
   (ap_setprocattr_dir(procattr, ap_make_dirstr_parent(r->pool, 
r->filename)) != APR_SUCCESS) ||
  -(ap_setprocattr_cmdtype(procattr, APR_PROGRAM) != APR_SUCCESS)) {
  +(ap_setprocattr_cmdtype(procattr, APR_SHELLCMD) != APR_SUCCESS)) {
   /* Something bad happened, tell the world. */
ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
  -   "couldn't create child process: %s", r->filename);
  +"couldn't initialize proc attributes: %s %s", r->filename, s);
   rc = !APR_SUCCESS;
   }
   else {
   build_argv_list(&argv, r, r->pool);
  -rc = ap_create_process(&procnew, r->filename, argv, 
ap_create_environment(r->pool, env), procattr, r->pool);
  +rc = ap_create_process(&procnew, s, argv, 
ap_create_environment(r->pool, env), procattr, r->pool);
   
   if (rc != APR_SUCCESS) {
   /* Bad things happened. Everyone should have cleaned up. */
   ap_log_rerror(APLOG_MARK, APLOG_ERR, errno, r,
  -"couldn't create child process: %d: %s", rc, 
r->filename);
  +"couldn't create child process: %d: %s", rc, s);
   }
   else {
   ap_note_subprocess(r->pool, procnew, kill_after_timeout);
  
  
  


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

1999-12-16 Thread rbb
rbb 99/12/16 05:14:57

  Modified:src/lib/apr/threadproc/win32 proc.c
  Log:
  Fix create_process on Win32.i  CGI's work now.
  Submitted by:  Allan Edwards
  Reviewed by:   Ryan Bloom
  
  Revision  ChangesPath
  1.14  +17 -2 apache-2.0/src/lib/apr/threadproc/win32/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/win32/proc.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- proc.c1999/12/15 01:15:30 1.13
  +++ proc.c1999/12/16 13:14:56 1.14
  @@ -154,7 +154,7 @@
   char path[MAX_PATH];
   int length;
   
  -if (dir[0] != '\\' && dir[1] != ':') { 
  +if (dir[0] != '\\' && dir[0] != '/' && dir[1] != ':') { 
   length = GetCurrentDirectory(MAX_PATH, path);
   
   if (length == 0 || length + strlen(dir) + 1 >= MAX_PATH)
  @@ -229,11 +229,26 @@
   }
   
   if (attr->cmdtype == APR_PROGRAM) {
  -if (attr->currdir == NULL) {
  +char *ptr = progname;
  +
  +if (*ptr =='"') {
  +ptr++;
  +}
  +
  +if (*ptr == '\\' || *++ptr == ':') {
  +cmdline = ap_pstrdup(cont, progname);
  +}
  +else if (attr->currdir == NULL) {
   cmdline = ap_pstrdup(cont, progname);
   }
   else {
  +char lastchar = attr->currdir[strlen(attr->currdir)-1];
  +if ( lastchar == '\\' || lastchar == '/') {
  +cmdline = ap_pstrcat(cont, attr->currdir, progname, NULL);
  +}
  +else {
   cmdline = ap_pstrcat(cont, attr->currdir, "\\", progname, NULL);
  +}
   }
   }
   else {
  
  
  


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

1999-12-15 Thread rbb
rbb 99/12/15 13:39:11

  Modified:src/modules/mpm/prefork prefork.c scoreboard.h
  Log:
  Getting rid of more warnings in the prefork mpm.
  
  Revision  ChangesPath
  1.60  +1 -6  apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- prefork.c 1999/12/14 20:02:50 1.59
  +++ prefork.c 1999/12/15 21:39:08 1.60
  @@ -90,6 +90,7 @@
   #include "apr_portable.h"
   #include "httpd.h"
   #include "mpm_default.h"
  +#include "mpm_status.h"
   #include "http_main.h"
   #include "http_log.h"
   #include "http_config.h"
  @@ -1935,12 +1936,6 @@
   static ap_socket_t *csd;
   static int requests_this_child;
   static fd_set main_fds;
  -
  -API_EXPORT(void) ap_child_terminate(request_rec *r)
  -{
  -r->connection->keepalive = 0;
  -requests_this_child = ap_max_requests_per_child = 1;
  -}
   
   int ap_graceful_stop_signalled(void)
   {
  
  
  
  1.4   +3 -0  apache-2.0/src/modules/mpm/prefork/scoreboard.h
  
  Index: scoreboard.h
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/scoreboard.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- scoreboard.h  1999/11/30 03:52:47 1.3
  +++ scoreboard.h  1999/12/15 21:39:09 1.4
  @@ -203,6 +203,9 @@
   #define START_PREQUEST 1
   #define STOP_PREQUEST  2
   
  +int ap_update_child_status(int child_num, int status, request_rec *r);
  +void ap_time_process_request(int child_num, int status);
  +
   #ifdef __cplusplus
   }
   #endif
  
  
  


cvs commit: apache-2.0/src/os/win32 readdir.c readdir.h

1999-12-15 Thread rbb
rbb 99/12/15 11:32:37

  Modified:src  ApacheCore.dsp ApacheCore.mak
  Removed: src/os/win32 readdir.c readdir.h
  Log:
  Remove the readdir files from os/win32.  These are taken care of by APR now,
  and they have been bothering me.  This is my first attempt at generating a
  Makefile for Windows, but it seems to have worked for me.
  
  Revision  ChangesPath
  1.8   +0 -8  apache-2.0/src/ApacheCore.dsp
  
  Index: ApacheCore.dsp
  ===
  RCS file: /home/cvs/apache-2.0/src/ApacheCore.dsp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ApacheCore.dsp1999/12/08 22:32:57 1.7
  +++ ApacheCore.dsp1999/12/15 19:32:23 1.8
  @@ -214,10 +214,6 @@
   # End Source File
   # Begin Source File
   
  -SOURCE=.\os\win32\readdir.c
  -# End Source File
  -# Begin Source File
  -
   SOURCE=.\main\rfc1413.c
   # End Source File
   # Begin Source File
  @@ -347,10 +343,6 @@
   # Begin Source File
   
   SOURCE=.\os\win32\os.h
  -# End Source File
  -# Begin Source File
  -
  -SOURCE=.\os\win32\readdir.h
   # End Source File
   # Begin Source File
   
  
  
  
  1.9   +1034 -211 apache-2.0/src/ApacheCore.mak
  
  Index: ApacheCore.mak
  ===
  RCS file: /home/cvs/apache-2.0/src/ApacheCore.mak,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ApacheCore.mak1999/12/08 22:33:09 1.8
  +++ ApacheCore.mak1999/12/15 19:32:24 1.9
  @@ -80,7 +80,6 @@
[EMAIL PROTECTED] "$(INTDIR)\mod_setenvif.obj"
[EMAIL PROTECTED] "$(INTDIR)\mod_userdir.obj"
[EMAIL PROTECTED] "$(INTDIR)\modules.obj"
  - [EMAIL PROTECTED] "$(INTDIR)\readdir.obj"
[EMAIL PROTECTED] "$(INTDIR)\rfc1413.obj"
[EMAIL PROTECTED] "$(INTDIR)\util.obj"
[EMAIL PROTECTED] "$(INTDIR)\util_date.obj"
  @@ -146,7 +145,6 @@
"$(INTDIR)\mod_setenvif.obj" \
"$(INTDIR)\mod_userdir.obj" \
"$(INTDIR)\modules.obj" \
  - "$(INTDIR)\readdir.obj" \
"$(INTDIR)\rfc1413.obj" \
"$(INTDIR)\util.obj" \
"$(INTDIR)\util_date.obj" \
  @@ -238,8 +236,6 @@
[EMAIL PROTECTED] "$(INTDIR)\mod_userdir.sbr"
[EMAIL PROTECTED] "$(INTDIR)\modules.obj"
[EMAIL PROTECTED] "$(INTDIR)\modules.sbr"
  - [EMAIL PROTECTED] "$(INTDIR)\readdir.obj"
  - [EMAIL PROTECTED] "$(INTDIR)\readdir.sbr"
[EMAIL PROTECTED] "$(INTDIR)\rfc1413.obj"
[EMAIL PROTECTED] "$(INTDIR)\rfc1413.sbr"
[EMAIL PROTECTED] "$(INTDIR)\util.obj"
  @@ -306,7 +302,6 @@
"$(INTDIR)\mod_setenvif.sbr" \
"$(INTDIR)\mod_userdir.sbr" \
"$(INTDIR)\modules.sbr" \
  - "$(INTDIR)\readdir.sbr" \
"$(INTDIR)\rfc1413.sbr" \
"$(INTDIR)\util.sbr" \
"$(INTDIR)\util_date.sbr" \
  @@ -360,7 +355,6 @@
"$(INTDIR)\mod_setenvif.obj" \
"$(INTDIR)\mod_userdir.obj" \
"$(INTDIR)\modules.obj" \
  - "$(INTDIR)\readdir.obj" \
"$(INTDIR)\rfc1413.obj" \
"$(INTDIR)\util.obj" \
"$(INTDIR)\util_date.obj" \
  @@ -411,8 +405,12 @@
   !IF "$(CFG)" == "ApacheCore - Win32 Release" || "$(CFG)" ==\
"ApacheCore - Win32 Debug"
   SOURCE=.\main\buff.c
  +
  +!IF  "$(CFG)" == "ApacheCore - Win32 Release"
  +
   DEP_CPP_BUFF_=\
".\include\ap.h"\
  + ".\include\ap_ac_config.h"\
".\include\ap_config.h"\
".\include\ap_ctype.h"\
".\include\ap_iol.h"\
  @@ -423,11 +421,11 @@
".\include\http_main.h"\
".\include\httpd.h"\
".\include\util_uri.h"\
  - ".\lib\apr\file_io\win32\readdir.h"\
".\lib\apr\include\apr_errno.h"\
".\lib\apr\include\apr_file_io.h"\
".\lib\apr\include\apr_general.h"\
".\lib\apr\include\apr_lib.h"\
  + ".\lib\apr\include\apr_thread_proc.h"\
".\lib\apr\include\apr_win.h"\
".\os\win32\iol_socket.h"\
".\os\win32\os.h"\
  @@ -436,20 +434,40 @@

   NODEP_CPP_BUFF_=\
".\include\ap_config_auto.h"\
  + ".\include\ap_config_win32.h"\
  + ".\include\apr.h"\
".\include\ebcdic.h"\
".\include\os.h"\
  - ".\lib\apr\include\apr_config.h"\
  + ".\lib\apr\include\apr.h"

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

1999-12-15 Thread rbb
rbb 99/12/15 10:06:35

  Modified:src/lib/apr/file_io/win32 filedup.c open.c
  Log:
  Fix ap_dupfile on Win32.  We need to actually duplicate the file, not
  just assign the old handle to the new ap_file_t.
  
  Revision  ChangesPath
  1.4   +4 -2  apache-2.0/src/lib/apr/file_io/win32/filedup.c
  
  Index: filedup.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/filedup.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- filedup.c 1999/10/12 06:14:43 1.3
  +++ filedup.c 1999/12/15 18:06:31 1.4
  @@ -61,14 +61,16 @@
   
   ap_status_t ap_dupfile(struct file_t **new_file, struct file_t *old_file)
   {
  +HANDLE hCurrentProcess = GetCurrentProcess();
   (*new_file) = (struct file_t *)ap_palloc(old_file->cntxt,
  sizeof(struct file_t));
   
   if ((*new_file) == NULL) {
   return APR_ENOMEM;
   }
  -(*new_file)->cntxt = old_file->cntxt; 
  -(*new_file)->filehand = old_file->filehand; 
  +(*new_file)->cntxt = old_file->cntxt;
  +DuplicateHandle(hCurrentProcess, old_file->filehand, hCurrentProcess, 
  +   &(*new_file)->filehand, 0, FALSE, DUPLICATE_SAME_ACCESS); 
   (*new_file)->fname = ap_pstrdup(old_file->cntxt, old_file->fname);
   (*new_file)->demonfname = ap_pstrdup(old_file->cntxt, 
old_file->demonfname);
   (*new_file)->lowerdemonfname = ap_pstrdup(old_file->cntxt, 
old_file->lowerdemonfname);
  
  
  
  1.14  +2 -1  apache-2.0/src/lib/apr/file_io/win32/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/open.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- open.c1999/12/14 18:25:48 1.13
  +++ open.c1999/12/15 18:06:32 1.14
  @@ -61,6 +61,7 @@
   #include "apr_lib.h"
   #include "apr_portable.h"
   #include 
  +#include 
   #include 
   #include 
   
  @@ -202,7 +203,7 @@
   
   ap_status_t ap_open_stderr(struct file_t **thefile, ap_context_t *cont)
   {
  -(*thefile) = ap_pcalloc(cont, sizeof(ap_os_file_t *));
  +(*thefile) = ap_pcalloc(cont, sizeof(struct file_t *));
   if ((*thefile) == NULL) {
   return APR_ENOMEM;
   }
  
  
  


cvs commit: apache-2.0/src/lib/apr/file_io/win32 file_io.def

1999-12-15 Thread rbb
rbb 99/12/14 17:53:31

  Modified:src/lib/apr aprlib.def
   src/lib/apr/file_io/win32 file_io.def
  Log:
  It took me a while, but I found the aprlib.def file, and now Apache builds
  again on Windows.
  
  Revision  ChangesPath
  1.7   +1 -0  apache-2.0/src/lib/apr/aprlib.def
  
  Index: aprlib.def
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/aprlib.def,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- aprlib.def1999/11/29 23:29:11 1.6
  +++ aprlib.def1999/12/15 01:53:27 1.7
  @@ -221,4 +221,5 @@
ap_set_local_port @213
ap_get_remote_port @214
ap_set_remote_port @215
  +  ap_open_stderr @216
   
  
  
  
  1.7   +2 -1  apache-2.0/src/lib/apr/file_io/win32/file_io.def
  
  Index: file_io.def
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/file_io.def,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- file_io.def   1999/12/15 00:40:11 1.6
  +++ file_io.def   1999/12/15 01:53:29 1.7
  @@ -43,4 +43,5 @@
   ap_eof   @36
ap_get_filetype @37
ap_writev @38
  -ap_open_stderr   @39
  \ No newline at end of file
  +ap_open_stderr  @39
  +
  
  
  


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

1999-12-15 Thread rbb
rbb 99/12/14 17:15:31

  Modified:src/lib/apr/threadproc/win32 proc.c
  Log:
  Fix process creation on Windows.  We need to pretty much always provide 
absolute
  paths instead of relative paths when we want to specify a new directory.
  Submitted by: Allan Edwards
  Reviewed by:  Ryan Bloom
  
  Revision  ChangesPath
  1.13  +47 -3 apache-2.0/src/lib/apr/threadproc/win32/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/win32/proc.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- proc.c1999/11/01 20:02:37 1.12
  +++ proc.c1999/12/15 01:15:30 1.13
  @@ -151,7 +151,21 @@
   ap_status_t ap_setprocattr_dir(struct procattr_t *attr, 
  const char *dir) 
   {
  -attr->currdir = ap_pstrdup(attr->cntxt, dir);
  +char path[MAX_PATH];
  +int length;
  +
  +if (dir[0] != '\\' && dir[1] != ':') { 
  +length = GetCurrentDirectory(MAX_PATH, path);
  +
  +if (length == 0 || length + strlen(dir) + 1 >= MAX_PATH)
  +return APR_ENOMEM;
  +
  +attr->currdir = ap_pstrcat(attr->cntxt, path, "\\", dir, NULL);
  +}
  +else {
  +attr->currdir = ap_pstrdup(attr->cntxt, dir);
  +}
  +
   if (attr->currdir) {
   return APR_SUCCESS;
   }
  @@ -212,9 +226,39 @@
   if (attr->child_err) {
   attr->si.hStdError = attr->child_err->filehand;
   }
  +}
  +
  +if (attr->cmdtype == APR_PROGRAM) {
  +if (attr->currdir == NULL) {
  +cmdline = ap_pstrdup(cont, progname);
  +}
  +else {
  +cmdline = ap_pstrcat(cont, attr->currdir, "\\", progname, NULL);
  +}
   }
  -cmdline = ap_pstrdup(cont, progname);
  -i = 0;
  +else {
  +char * shell_cmd;
  +OSVERSIONINFO osver;
  +osver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
  +
  +/*
  + * Use CMD.EXE for NT, COMMAND.COM for WIN95
  + */
  +if (GetVersionEx(&osver)) {
  +if (osver.dwPlatformId != VER_PLATFORM_WIN32_NT) {
  +shell_cmd = ap_pstrdup(cont, "COMMAND.COM /C ");
  + }
  + else {
  +shell_cmd = ap_pstrdup(cont, "CMD.EXE /C ");
  +  }
  +   }
  +   else {
  +  shell_cmd = ap_pstrdup(cont, "CMD.EXE /C ");
  +   }
  +   cmdline = ap_pstrcat(cont, shell_cmd, progname, NULL);
  +}
  +
  +i = 1;
   while (args && args[i]) {
   cmdline = ap_pstrcat(cont, cmdline, " ", args[i], NULL);
   i++;
  
  
  


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

1999-12-15 Thread rbb
rbb 99/12/14 17:00:08

  Modified:src/main http_vhost.c
   src/os/win32 iol_socket.c
  Log:
  Cleanup the Windows build a bit by getting rid of more platform dependant
  code.  Still won't compile cleanly, but we are closer.  I am hoping for a
  clean Windows compile by Friday.
  
  Revision  ChangesPath
  1.9   +1 -3  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- http_vhost.c  1999/11/17 21:39:26 1.8
  +++ http_vhost.c  1999/12/15 00:59:56 1.9
  @@ -647,10 +647,8 @@
   dump_iphash_statistics(main_s);
   #endif
   if (getenv("DUMP_VHOSTS")) {
  -int errfileno = STDERR_FILENO;
   ap_file_t *thefile = NULL;
  -
  -ap_put_os_file(&thefile, &errfileno, p);
  +ap_open_stderr(&thefile, p);
dump_vhost_config(thefile);
   }
   }
  
  
  
  1.8   +1 -0  apache-2.0/src/os/win32/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/win32/iol_socket.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- iol_socket.c  1999/11/02 14:30:24 1.7
  +++ iol_socket.c  1999/12/15 01:00:03 1.8
  @@ -59,6 +59,7 @@
   #include "httpd.h"
   #include "ap_iol.h"
   #include "iol_socket.h"
  +#include "apr_portable.h"
   
   typedef struct {
   ap_iol iol;
  
  
  


cvs commit: apache-2.0/src/lib/apr/misc/win32 misc.def

1999-12-15 Thread rbb
rbb 99/12/14 16:40:25

  Modified:src/lib/apr/file_io/win32 file_io.def
   src/lib/apr/include apr_win.h
   src/lib/apr/misc/win32 misc.def
  Log:
  Fix some build issues with APR on Windows.  I am still getting some warnings,
  but at least Apache itself will almost build again.
  
  Revision  ChangesPath
  1.6   +9 -8  apache-2.0/src/lib/apr/file_io/win32/file_io.def
  
  Index: file_io.def
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/win32/file_io.def,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- file_io.def   1999/10/05 01:16:19 1.5
  +++ file_io.def   1999/12/15 00:40:11 1.6
  @@ -29,17 +29,18 @@
ap_read   @22
ap_write   @23
ap_seek   @24
  - ap_get_filedata   @25
  - ap_set_filedata   @26
  - ap_get_os_file   @27
  +ap_get_filedata   @25
  +ap_set_filedata   @26
  +ap_get_os_file   @27
ap_put_os_file @28
  - ap_get_os_dir   @29
  - ap_putc   @30
  - ap_getc   @31
  +ap_get_os_dir   @29
  +ap_putc   @30
  +ap_getc   @31
ap_puts @32
ap_fgets @33
ap_flush @34
  - ap_fprintf   @35
  - ap_eof   @36
  +ap_fprintf   @35
  +ap_eof   @36
ap_get_filetype @37
ap_writev @38
  +ap_open_stderr   @39
  \ No newline at end of file
  
  
  
  1.8   +0 -2  apache-2.0/src/lib/apr/include/apr_win.h
  
  Index: apr_win.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_win.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_win.h 1999/12/09 21:00:25 1.7
  +++ apr_win.h 1999/12/15 00:40:15 1.8
  @@ -127,8 +127,6 @@
   #define API_EXPORT_NONSTD(type)  type
   #define API_VAR_IMPORT   extern _declspec(dllimport)
   
  -
  -
   /* struct iovec is needed to emulate Unix writev */
   struct iovec {
   char* iov_base;
  
  
  
  1.3   +8 -8  apache-2.0/src/lib/apr/misc/win32/misc.def
  
  Index: misc.def
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/win32/misc.def,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- misc.def  1999/09/22 14:00:07 1.2
  +++ misc.def  1999/12/15 00:40:19 1.3
  @@ -11,12 +11,12 @@
ap_destroy_context   @6
WinTimeToUnixTime   @7
ap_get_oslevel   @8
  - ap_get_userdata   @9
  - ap_set_userdata   @10
  - ap_initialize   @11
  +ap_get_userdata   @9
  +ap_set_userdata   @10
  +ap_initialize   @11
ap_getopt@12
  - opterr   @13 DATA
  - optind   @14 DATA
  - optopt   @15 DATA
  - optreset   @16 DATA
  - optarg   @17 DATA
  + ap_opterr   @13 DATA
  + ap_optind   @14 DATA
  + ap_optopt   @15 DATA
  + ap_optreset   @16 DATA
  + ap_optarg   @17 DATA
  
  
  


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

1999-12-14 Thread rbb
rbb 99/12/14 12:37:59

  Modified:src/modules/standard mod_cgi.c
  Log:
  Make CGI's work correctly in Apache 2.0.  APR wants the first element in the
  argument list to be the program name.  This is exactly what POSIX requires,
  and what Windows wants, but Apache 1.3 would create the arg list, and then
  have another function squeeze the program name in later.  This patch fixes
  that by having mod_cgi put the program name the correct place.
  
  Revision  ChangesPath
  1.21  +19 -15apache-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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_cgi.c 1999/12/13 20:52:28 1.20
  +++ mod_cgi.c 1999/12/14 20:37:58 1.21
  @@ -376,32 +376,35 @@
   const char *args = r->args;
   
   if (!args || !args[0] || strchr(args, '=')) {
  -   *argv = NULL;
  +numwords = 1;
   }
   else {
   /* count the number of keywords */
  -for (x = 0, numwords = 1; args[x]; x++) {
  +for (x = 0, numwords = 2; 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;
   }
  +/* Everything is - 1 to account for the first parameter which is the
  + * program name.  We didn't used to have to do this, but APR wants it.
  + */ 
  +if (numwords > APACHE_ARG_MAX - 1) {
  +numwords = APACHE_ARG_MAX - 1;   /* Truncate args to prevent 
overrun */
  +}
  +*argv = (char **) ap_palloc(p, (numwords + 2) * sizeof(char *));
  + 
  +for (x = 1, idx = 1; 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 ap_status_t build_command_line(char **c, request_rec *r, ap_context_t 
*p) 
  +static ap_status_t build_command_line(char **c, request_rec *r, ap_context_t 
*p)
   {
   #ifdef WIN32
   char *quoted_filename = NULL;
  @@ -522,8 +525,9 @@
 "couldn't spawn child process: %s", r->filename);
   return HTTP_INTERNAL_SERVER_ERROR;
   }
  +argv[0] = ap_pstrdup(p, command);
   /* run the script in its own process */
  -else if (run_cgi_child(&script_out, &script_in, &script_err, command, 
argv, r, p) != APR_SUCCESS) {
  +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/modules/mpm/prefork prefork.c

1999-12-14 Thread rbb
rbb 99/12/14 12:02:52

  Modified:src/modules/mpm/prefork prefork.c
  Log:
  Make prefork compile.
  
  Revision  ChangesPath
  1.59  +5 -1  apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- prefork.c 1999/12/03 22:11:31 1.58
  +++ prefork.c 1999/12/14 20:02:50 1.59
  @@ -1954,7 +1954,11 @@
   
   static void child_main(int child_num_arg)
   {
  -NET_SIZE_T clen;
  +/* XXX replace int with NET_SIZE_T, this is defined in ap_config.h which
  +   has macros we can't make visible to this file, but it is the original 
  +   type for clen.
  +*/
  +int clen;
   struct sockaddr sa_server;
   struct sockaddr sa_client;
   ap_listen_rec *lr;
  
  
  


  1   2   3   4   5   6   7   >