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

2000-02-10 Thread dreid
dreid   00/02/10 05:24:15

  Modified:src/main util.c
   src/modules/standard mod_autoindex.c mod_log_config.c
  Log:
  Small changes to remove some compiler complaints.
  
  Revision  ChangesPath
  1.30  +1 -1  apache-2.0/src/main/util.c
  
  Index: util.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- util.c2000/01/28 18:01:35 1.29
  +++ util.c2000/02/10 13:24:11 1.30
  @@ -117,7 +117,7 @@
   
   API_EXPORT(char *) ap_ht_time(ap_context_t *p, ap_time_t t, const char *fmt, 
int gmt)
   {
  -ap_int32_t retcode;
  +ap_size_t retcode;
   char ts[MAX_STRING_LEN];
   char tf[MAX_STRING_LEN];
   ap_exploded_time_t xt;
  
  
  
  1.23  +2 -1  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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_autoindex.c   2000/01/19 02:41:53 1.22
  +++ mod_autoindex.c   2000/02/10 13:24:13 1.23
  @@ -1277,7 +1277,8 @@
   autoindex_config_rec *d, request_rec *r,
   int autoindex_opts, char keyid, char direction)
   {
  -int x, rv;
  +int x;
  +ap_size_t rv;
   char *name = r->uri;
   char *tp;
   int static_columns = (autoindex_opts & SUPPRESS_COLSORT);
  
  
  
  1.15  +1 -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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- mod_log_config.c  2000/01/19 02:42:07 1.14
  +++ mod_log_config.c  2000/02/10 13:24:13 1.15
  @@ -384,7 +384,7 @@
   static const char *log_request_time(request_rec *r, char *a)
   {
   ap_exploded_time_t xt;
  -ap_status_t retcode;
  +ap_size_t retcode;
   char tstr[MAX_STRING_LEN];
   
   /*
  
  
  


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

2000-02-10 Thread dreid
dreid   00/02/10 05:20:34

  Added:   src/os/beos Makefile.in config.m4
  Log:
  Add the rest of the files to allow BeOS to use the buildconf stuff.
  Forgot to add these last time.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/os/beos/Makefile.in
  
  Index: Makefile.in
  ===
  
  DEPTH = ../..
  topsrcdir = @topsrcdir@
  srcdir= @srcdir@
  VPATH = @srcdir@
  
  LTLIBRARY_NAME= libos.la
  LTLIBRARY_SOURCES = os.c os-inline.c beosd.c iol_socket.c
  
  include $(topsrcdir)/build/ltlib.mk
  
  
  
  1.1  apache-2.0/src/os/beos/config.m4
  
  Index: config.m4
  ===
  if test "$OS" = "beos" ; then
  CFLAGS="$CFLAGS -DBEOS"
  fi
  
  
  


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

2000-02-07 Thread dreid
dreid   00/02/07 09:17:01

  Modified:src/build build.mk
  Log:
  This changes build.mk to use the PrintPath utility in helpers to
  try and keep as much portability as possible.
  
  Revision  ChangesPath
  1.4   +2 -2  apache-2.0/src/build/build.mk
  
  Index: build.mk
  ===
  RCS file: /home/cvs/apache-2.0/src/build/build.mk,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build.mk  2000/01/16 17:18:13 1.3
  +++ build.mk  2000/02/07 17:16:57 1.4
  @@ -21,7 +21,7 @@
   # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   #
   
##
  -# $Id: build.mk,v 1.3 2000/01/16 17:18:13 sascha Exp $ 
  +# $Id: build.mk,v 1.4 2000/02/07 17:16:57 dreid Exp $ 
   #
   # Makefile to generate build tools
   #
  @@ -33,7 +33,7 @@
   
   generated_lists:
@echo config_m4_files = `find . -name config.m4` > $@
  - @n=`which libtool`; echo libtool_prefix = `dirname $$n`/.. >> $@
  + @n=`helpers/PrintPath libtool`; echo libtool_prefix = `dirname $$n`/.. 
>> $@
   
   $(STAMP): build/buildcheck.sh
@build/buildcheck.sh && touch $(STAMP)
  
  
  


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

2000-02-07 Thread dreid
dreid   00/02/07 04:05:23

  Modified:src/modules/mpm config.m4
  Log:
  These changes allow the MPM to be selected based on platform.  At present it
  works for BeOS but adding others shouldn't be hard.  Also added the OS2
  MPM to the list.
  
  Revision  ChangesPath
  1.11  +5 -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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- config.m4 2000/01/26 07:47:34 1.10
  +++ config.m4 2000/02/07 12:05:22 1.11
  @@ -1,10 +1,14 @@
   AC_MSG_CHECKING(which MPM to use)
   AC_ARG_WITH(mpm,
   [  --with-mpm=MPM  Choose the process model for Apache to use.
  -  MPM={dexter,mpmt_beos,mpmt_pthread,prefork}],[
  +  
MPM={dexter,mpmt_beos,mpmt_pthread,prefork,spmt_os2}],[
 APACHE_MPM=$withval
   ],[
 APACHE_MPM=mpmt_pthread
  +  case "`uname -sr`" in
  +"BeOS"*)
  +  APACHE_MPM=mpmt_beos;;
  +  esac 
   ])
   AC_MSG_RESULT($APACHE_MPM)
   
  
  
  


cvs commit: apache-2.0/src/modules/mpm/mpmt_beos Makefile.in config.m4 mpmt_beos.c

2000-02-07 Thread dreid
dreid   00/02/07 04:03:15

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
  Added:   src/modules/mpm/mpmt_beos Makefile.in config.m4
  Log:
  These changes allow BeOS to use the new buildconf configuration.
  
  Revision  ChangesPath
  1.14  +0 -1  apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mpmt_beos.c   1999/12/01 00:44:55 1.13
  +++ mpmt_beos.c   2000/02/07 12:02:59 1.14
  @@ -1213,7 +1213,6 @@
   ap_daemons_limit = HARD_SERVER_LIMIT;
   ap_threads_per_child = DEFAULT_THREADS_PER_CHILD;
   ap_pid_fname = DEFAULT_PIDLOG;
  -ap_scoreboard_fname = DEFAULT_SCOREBOARD;
   ap_max_requests_per_child = DEFAULT_MAX_REQUESTS_PER_CHILD;
   ap_mpmt_beos_set_maintain_connection_status(1);
   
  
  
  
  1.1  apache-2.0/src/modules/mpm/mpmt_beos/Makefile.in
  
  Index: Makefile.in
  ===
  
  DEPTH = ../../..
  topsrcdir = @topsrcdir@
  srcdir= @srcdir@
  VPATH = @srcdir@
  
  LTLIBRARY_NAME= libmpmt_beos.la
  LTLIBRARY_SOURCES = mpmt_beos.c scoreboard.c acceptlock.c mutex.c poll.c
  
  include $(topsrcdir)/build/ltlib.mk
  
  
  
  1.1  apache-2.0/src/modules/mpm/mpmt_beos/config.m4
  
  Index: config.m4
  ===
  dnl ## XXX - Need a more thorough check of the proper flags to use
  
  if test "$MPM_NAME" = "mpmt_beos" ; then
  ac_cv_enable_threads="yes"
  AC_CACHE_SAVE
  
  APACHE_FAST_OUTPUT(modules/mpm/$MPM_NAME/Makefile)
  fi
  
  
  


cvs commit: apache-2.0/src/lib/apr/shmem/unix/mm configure.in mm.h mm_conf.h.in mm_core.c

2000-02-05 Thread dreid
dreid   00/02/05 04:07:39

  Modified:src/lib/apr/shmem/unix/mm configure.in mm.h mm_conf.h.in
mm_core.c
  Log:
  This commit gets mm running on BeOS.  With this BeOS APR once more
  compiles and builds cleanly.  Not sure if this is how to update mm, but
  it gets things working again.
  
  Revision  ChangesPath
  1.3   +12 -0 apache-2.0/src/lib/apr/shmem/unix/mm/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/mm/configure.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- configure.in  1999/09/27 07:42:04 1.2
  +++ configure.in  2000/02/05 12:07:37 1.3
  @@ -93,12 +93,16 @@
   AC_HAVE_HEADERS(unistd.h)
   AC_HAVE_FUNCS(getpagesize sysconf)
   AC_CHECK_DEFINE(_SC_PAGESIZE, unistd.h)
  +AC_HAVE_HEADERS(kernel/OS.h)
  +AC_CHECK_DEFINE(B_PAGE_SIZE, kernel/OS.h)
   
   AC_BEGIN_DECISION([memory page size determination])
   AC_IFALLYES(header:unistd.h func:getpagesize, 
   AC_DECIDE(MM_VMPS_GETPAGESIZE, [4.2BSD getpagesize()]))
   AC_IFALLYES(header:unistd.h func:sysconf define:_SC_PAGESIZE, 
   AC_DECIDE(MM_VMPS_SYSCONF, [POSIX.1 sysconf(_SC_PAGESIZE)]))
  +AC_IFALLYES(header:kernel/OS.h define:B_PAGE_SIZE,
  +AC_DECIDE(MM_VMPS_BEOS, [BeOS B_PAGE_SIZE])) 
   AC_END_DECISION
   AC_DEFINE_UNQUOTED($ac_decision)
   
  @@ -114,6 +118,8 @@
   AC_TEST_FILE(/dev/zero)
   AC_HAVE_HEADERS(sys/ipc.h sys/shm.h sys/file.h)
   AC_HAVE_FUNCS(shmget shmat shmdt shmctl)
  +AC_HAVE_HEADERS(kernel/OS.h)
  +AC_HAVE_FUNCS(create_area)
   
   AC_BEGIN_DECISION([shared memory allocation method])
   AC_IFALLYES(header:sys/mman.h func:mmap func:munmap, 
  @@ -127,6 +133,8 @@
   AC_DECIDE(MM_SHMT_IPCSHM, [SysV IPC shmget()]))
   AC_IFALLYES(header:sys/mman.h func:mmap func:munmap define:MAP_ANON, 
   AC_DECIDE(MM_SHMT_MMANON, [4.4BSD-style mmap() via MAP_ANON]))
  +AC_IFALLYES(header:kernel/OS.h func:create_area,
  +   AC_DECIDE(MM_SHMT_BEOS, [BeOS areas]))
   case $PLATFORM in
   *-*-linux* ) 
   #   Linux has problems with MM_SHMT_MMANON
  @@ -155,6 +163,8 @@
   AC_CHECK_DEFINE(F_SETLK, fcntl.h)
   AC_CHECK_DEFINE(IPC_PRIVATE, sys/ipc.h)
   AC_CHECK_DEFINE(SEM_UNDO, sys/sem.h)
  +AC_HAVE_HEADERS(kernel/OS.h)
  +AC_CHECK_FUNCS(create_sem, kernel/OS.h)
   
   AC_MSG_CHECKING(whether union semun is defined in sys/sem.h)
   AC_TRY_COMPILE([
  @@ -178,6 +188,8 @@
   AC_DECIDE(MM_SEMT_IPCSEM, [SysV IPC semget()]))
   AC_IFALLYES(header:fcntl.h define:F_SETLK, 
   AC_DECIDE(MM_SEMT_FCNTL, [SVR4-style fcntl() on temporary file]))
  +AC_IFALLYES(header:kernel/OS.h func:create_sem,
  +AC_DECIDE(MM_SEMT_BEOS, [BeOS semaphores/benaphores]))
   AC_ARG_WITH(sem,dnl
   [  --with-sem=TYPE force semaphore type: FLOCK FCNTL IPCSEM],
   AC_DECISION_FORCE(MM_SEMT_$withval)
  
  
  
  1.3   +11 -0 apache-2.0/src/lib/apr/shmem/unix/mm/mm.h
  
  Index: mm.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/mm/mm.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mm.h  1999/09/27 07:42:08 1.2
  +++ mm.h  2000/02/05 12:07:37 1.3
  @@ -187,6 +187,10 @@
   #include 
   #endif
   
  +#ifdef MM_SHMT_BEOS
  +#include 
  +#endif
  +
   #define MM_ALLOC_MINSIZE (1024*8) 
   #define MM_CORE_FILEMODE (S_IRUSR|S_IWUSR)
   #define MM_CORE_DEFAULT_PAGESIZE (1024*8)
  @@ -262,6 +266,13 @@
  int  mc_fdmem;
   #if defined(MM_SHMT_MMFILE)
  char mc_fnmem[MM_MAXPATH];
  +#endif
  +#if defined(MM_SHMT_BEOS)
  +area_id mc_areaid;
  +#endif
  +#if defined(MM_SEMT_BEOS)
  +sem_id  mc_semid;
  +int32   mc_ben;
   #endif
   #if !defined(MM_SEMT_FLOCK)
  int  mc_fdsem;
  
  
  
  1.2   +3 -0  apache-2.0/src/lib/apr/shmem/unix/mm/mm_conf.h.in
  
  Index: mm_conf.h.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/mm/mm_conf.h.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mm_conf.h.in  1999/08/17 15:59:45 1.1
  +++ mm_conf.h.in  2000/02/05 12:07:38 1.2
  @@ -8,6 +8,7 @@
   /* VM Page Size Determination */
   #undef MM_VMPS_GETPAGESIZE
   #undef MM_VMPS_SYSCONF
  +#undef MM_VMPS_BEOS
   
   /* Shared Memory Type */
   #undef MM_SHMT_MMANON
  @@ -15,6 +16,7 @@
   #undef MM_SHMT_MMZERO
   #undef MM_SHMT_MMFILE
   #undef MM_SHMT_IPCSHM
  +#undef MM_SHMT_BEOS
   
   /* Shared Memory Maximum Segment Size */
   #define MM_SHM_MAXSEGSIZE @MM_SHM_MAXSEGSIZE@
  @@ -23,6 +25,7 @@
   #undef MM_SEMT_FLOCK
   #undef MM_SEMT_FCNTL
   #undef MM_SEMT_IPCSEM
  +#undef MM_SEMT_BEOS
   
   /* Debugging */
   #undef MM_DEBUG

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

2000-02-05 Thread dreid
dreid   00/02/05 04:05:06

  Modified:src/lib/apr/file_io/beos readwrite.c
  Log:
  Remove the stated lines from readwrite.c to bring BeOS back in line
  and get it building again.
  
  Revision  ChangesPath
  1.6   +0 -9  apache-2.0/src/lib/apr/file_io/beos/readwrite.c
  
  Index: readwrite.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/beos/readwrite.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- readwrite.c   1999/12/12 17:08:43 1.5
  +++ readwrite.c   2000/02/05 12:05:06 1.6
  @@ -119,7 +119,6 @@
   rv = write(thefile->filedes, buf, *nbytes);
   }
   
  -thefile->stated = 0;
   *nbytes = rv;
   if (rv == -1) {
   return errno;
  @@ -160,7 +159,6 @@
   }
   else {
   *iocnt = bytes;
  -thefile->stated = 0;
   return APR_SUCCESS;
   }
   }
  @@ -176,7 +174,6 @@
   {
   if (thefile->buffered) {
   if (fputc(ch, thefile->filehand) == ch) {
  -thefile->stated = 0;
   return APR_SUCCESS;
   }
   return errno;
  @@ -184,7 +181,6 @@
   if (write(thefile->filedes, &ch, 1) != 1) {
   return errno;
   }
  -thefile->stated = 0;
   return APR_SUCCESS; 
   }
   
  @@ -198,13 +194,11 @@
   {
   if (thefile->buffered) {
   if (ungetc(ch, thefile->filehand) == ch) {
  -thefile->stated = 0;
   return APR_SUCCESS;
   }
   return errno;
   }
   /* Not sure what to do in this case.  For now, return SUCCESS. */
  -thefile->stated = 0;
   return APR_SUCCESS; 
   }
   
  @@ -256,7 +250,6 @@
   
   if (thefile->buffered) {
   if (fputs(str, thefile->filehand)) {
  -thefile->stated = 0;
   return APR_SUCCESS;
   }
   return errno;
  @@ -266,7 +259,6 @@
   if (rv != len) {
   return errno;
   }
  -thefile->stated = 0;
   return APR_SUCCESS; 
   }
   
  @@ -279,7 +271,6 @@
   {
   if (thefile->buffered) {
   if (!fflush(thefile->filehand)) {
  -thefile->stated = 0;
   return APR_SUCCESS;
   }
   return errno;
  
  
  


cvs commit: apache-2.0/htdocs/manual/user mpm.html

2000-01-15 Thread dreid
dreid   00/01/15 12:15:08

  Added:   htdocs/manual/user mpm.html
  Log:
  Missed this file!  So here it is...
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/manual/user/mpm.html
  
  Index: mpm.html
  ===
  
  
  
  Available MPM's for Apache 2.0
  
  
  
  
  Apache 2.0 - Available MPM's
  Dated 15th January 2000
  Apache 2.0 has a new architecture that moves the processing of requests 
from the code server into a MultiProcessing Module (MPM).  By selecting the MPM 
to use you can alter the way the server behaves.  Additionally the introduction 
of the MPM's has led to platforms developing their own optimised modules.  On 
some platforms there is no choice, whilst on others there are different 
options, each with differing processing models.  This list aims to help you 
select a suitable MPM for your system.
  
  Platforms
  
  Unix
  Windows
  OS/2
  BeOS
  
  Unix
  
  
  MPM
  Description
  Maintainer
  
  
  prefork
  The prefork MPM reproduces the behaviour of Apache 1.3.
  ??
  
  
  mpmt_pthread
  This MPM uses a multi-process, multi-threaded model to provide good 
scability and stability.
  Manoj?
  
  
  dexter
  This is Manoj's plaything.  It has a number of hybrid features that Manoj 
has been looking at to improve performance.
  mailto:[EMAIL PROTECTED]">Manoj
  
  
  
  Windows
  
  
  MPM
  Description
  Maintainer
  
  
  winnt
  The Windows MPM.  This is mainly aimed at Windows NT.
  mailto:[EMAIL PROTECTED]">Bill Stoddard
  
  
  
  OS/2
  
  
  MPM
  Description
  Maintainer
  
  
  spmt_os2
  Single process, multiple thread MPM for OS2.
  mailto:[EMAIL PROTECTED]">Brian Havard
  
  
  
  BeOS
  
  
  MPM
  Description
  Maintainer
  
  
  mpmt_beos
  Multi-threaded MPM for BeOS.  This follows the mpmt_pthread model.
  mailto:[EMAIL PROTECTED]">David Reid
  
  
  
  
  David Reid, 15th January 2000
  
  
  
  
  
  


cvs commit: apache-2.0/htdocs/manual/developer hooks.html modules.html

2000-01-15 Thread dreid
dreid   00/01/15 12:13:51

  Added:   htdocs/manual/developer hooks.html modules.html
  Log:
  The remaining files for the new documentation.
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/manual/developer/hooks.html
  
  Index: hooks.html
  ===
  
  
  
  Apache 2.0 Hook Functions
  
  
  
  
  
  Apache Hook Functions
  
  In general, a hook function is one that Apache will call at some
  point during the processing of a request. Modules can provide
  functions that are called, and specify when they get called in
  comparison to other modules.
  
  Creating a hook function
  
  In order to create a new hook, four things need to be done:
  
  Declare the hook function
  
  Use the DECLARE_HOOK macro, which needs to be given the name of the
  hook, the return type of the hook function and the arguments. For
  example, if the hook returns an int and takes a
  request_rec * and an int and is called
  "do_something", then declare it like this:
  
  DECLARE_HOOK(int,do_something,(request_rec *r,int n))
  
  This should go in a header which modules will include if they want
  to use the hook.
  
  Create the hook structure
  
  Each source file that exports a hook has a private structure which
  is used to record the module functions that use the hook. This is
  declared as follows:
  
  
  HOOK_STRUCT(
  HOOK_LINK(do_something)
  ...
 )
  
  
  Implement the hook caller
  
  The source file that exports the hook has to implement a function
  that will call the hook. There are currently three possible ways to do
  this. In all cases, the calling function is called
  ap_run_hookname().
  
  Void hooks
  
  If the return value of a hook is void, then all the hooks are
  called, and the caller is implemented like this:
  
  IMPLEMENT_HOOK_VOID(do_something,(request_rec *r,int
  n),(r,n))
  
  The second and third arguments are the dummy argument declaration and
  the dummy arguments as they will be used when calling the hook. In
  other words, this macro expands to something like this:
  
  
  void ap_run_do_something(request_rec *r,int n)
  {
  ...
  do_something(r,n);
  }
  
  
  Hooks that return a value
  
  If the hook returns a value, then it can either be run until the first
  hook that does something interesting, like so:
  
  IMPLEMENT_HOOK_RUN_FIRST(int,do_something,(request_rec *r,int 
n),(r,n),DECLINED)
  
  The first hook that doesn't return DECLINED stops
  the loop and its return value is returned from the hook caller. Note
  that DECLINED is the tradition Apache hook return meaning "I
  didn't do anything", but it can be whatever suits you.
  
  Alternatively, all hooks can be run until an error occurs. This
  boils down to permitting two return values, one of which means
  "I did something, and it was OK" and the other meaning "I did
  nothing". The first function that returns a value other than one of
  those two stops the loop, and its return is the return value. Declare
  these like so:
  
  IMPLEMENT_HOOK_RUN_ALL(int,do_something,(request_rec *r,int
  n),(r,n),OK,DECLINED)
  
  Again, OK and DECLINED are the traditional
  values. You can use what you want.
  
  Call the hook callers
  
  At appropriate moments in the code, call the hook caller, like
  so:
  
  
  int n,ret;
  request_rec *r;
  
  ret=ap_run_do_something(r,n);
  
  
  Hooking the hook
  
  A module that wants a hook to be called needs to do two
  things.
  
  Implement the hook function
  
  Include the appropriate header, and define a static function of the
  correct type:
  
  
  static int my_something_doer(request_rec *r,int n)
  {
  ...
  return OK;
  }
  
  
  Add a hook registering function
  
  During initialisation, Apache will call each modules hook
  registering function, which is included in the module structure:
  
  
  static void my_register_hooks()
  {
  ap_hook_do_something(my_something_doer,NULL,NULL,HOOK_MIDDLE);
  }
  
  mode MODULE_VAR_EXPORT my_module =
  {
  ...
  my_register_hooks   /* register hooks */
  };
  
  
  Controlling hook calling order
  
  In the example above, we didn't use the three arguments in the hook
  registration function that control calling order. There are two
  mechanisms for doing this. The first, rather crude, method, allows us
  to specify roughly where the hook is run relative to other
  modules. The final argument control this. There are three possible
  values:
  
  
  HOOK_FIRST
  HOOK_MIDDLE
  HOOK_LAST
  
  
  All modules using any particular value may be run in any order
  relative to each other, but, of course, all modules using
  HOOK_FIRST will be run before HOOK_MIDDLE which are
  before HOOK_LAST. Modules that don't care when they are run
  should use HOOK_MIDDLE. (I spaced these out so people
  could do stuff like HOOK_FIRST-2 to g

cvs commit: apache-2.0/htdocs/manual/developer index.html

2000-01-15 Thread dreid
dreid   00/01/15 10:35:04

  Added:   htdocs/manual/developer index.html
  Log:
  Another file for the documentation.
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/manual/developer/index.html
  
  Index: index.html
  ===
  
  
  
  Apache-2.0 Developer Documentation
  
  
  
  Developer Documentation for Apache-2.0
  Apache Hook Functions
  Converting Apache 1.3 Modules to Apache 2.0
  MPM listing
  
  
  
  
  


cvs commit: apache-2.0/htdocs/manual/user index.html

2000-01-15 Thread dreid
dreid   00/01/15 10:34:15

  Added:   htdocs/manual index.html
   htdocs/manual/user index.html
  Log:
  This attempts to make more sense of the documentation along the lines of my
  suggestion about a week ago.  Now when I figure out how to move files...
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/manual/index.html
  
  Index: index.html
  ===
  
  
  
  Apache-2.0 Documentation
  
  
  
  Manual Index for Apache-2.0
  The documentation has been split into 2 sections.  One is for people 
installing and configuring an Apache server, the other is for those who are 
developing the server.
  Where do you want to go today?
  
  
  
  I'm configuring/installing a server
  
  
  I'm a developer
  
  
  
  
  David Reid, 15th January 2000
  
  
  
  
  
  
  1.1  apache-2.0/htdocs/manual/user/index.html
  
  Index: index.html
  ===
  
  
  
  Apache-2.0 Administrator Documentation
  
  
  
  Administrator Documentation for Apache-2.0
  MPM listing
  
  
  
  
  


cvs commit: apache-2.0/htdocs/manual/user - New directory

2000-01-15 Thread dreid
dreid   00/01/15 10:32:47

  apache-2.0/htdocs/manual/user - New directory


cvs commit: apache-2.0/htdocs/manual/developer - New directory

2000-01-15 Thread dreid
dreid   00/01/15 10:32:34

  apache-2.0/htdocs/manual/developer - New directory


cvs commit: apache-2.0/htdocs/manual - New directory

2000-01-15 Thread dreid
dreid   00/01/15 10:32:06

  apache-2.0/htdocs/manual - New directory


cvs commit: apache-2.0/htdocs mpm.html

2000-01-15 Thread dreid
dreid   00/01/15 09:25:18

  Added:   htdocs   mpm.html
  Log:
  This is the first pass at a file to give people an idea of which MPM's are
  available.
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/mpm.html
  
  Index: mpm.html
  ===
  
  
  
  Available MPM's for Apache 2.0
  
  
  
  
  Apache 2.0 - Available MPM's
  Dated 15th January 2000
  Apache 2.0 has a new architecture that may allow you to select the model 
used for processing requests.  These are built as modules and   On some 
platforms there is no choice, whilst on others there are different options, 
each with differing processing models.  This list aims to help you select a 
suitable MPM for your system.
  
  Platforms
  
  Unix
  Windows
  OS/2
  BeOS
  
  Unix
  
  
  MPM
  Description
  Maintainer
  
  
  prefork
  The prefork MPM reproduces the behaviour of Apache 1.3.
  ??
  
  
  mpmt_pthread
  This MPM uses a multi-process, multi-threaded model to provide good 
scability and stability.
  Manoj?
  
  
  dexter
  This is Manoj's plaything.  It has a number of hybrid features that Manoj 
has been looking at to improve performance.
  mailto:[EMAIL PROTECTED]">Manoj
  
  
  
  Windows
  
  
  MPM
  Description
  Maintainer
  
  
  winnt
  The Windows MPM.  This is mainly aimed at Windows NT.
  mailto:[EMAIL PROTECTED]">Bill Stoddard
  
  
  
  OS/2
  
  
  MPM
  Description
  Maintainer
  
  
  spmt_os2
  Single process, multiple thread MPM for OS2.
  mailto:[EMAIL PROTECTED]">Brian Havard
  
  
  
  BeOS
  
  
  MPM
  Description
  Maintainer
  
  
  mpmt_beos
  Multi-threaded MPM for BeOS.  This follows the mpmt_pthread model.
  mailto:[EMAIL PROTECTED]">David Reid
  
  
  
  
  David Reid, 15th January 2000
  
  
  
  
  
  


cvs commit: apache-2.0/htdocs hooks.html index.html

2000-01-04 Thread dreid
dreid   00/01/04 09:26:02

  Modified:htdocs   hooks.html index.html
  Log:
  A few minor changes to the simple page provided with Apache 2.0 to allow
  links to the other 2 documents.  No doubt this will get more involved
  but at least this is a start.
  
  Revision  ChangesPath
  1.2   +19 -2 apache-2.0/htdocs/hooks.html
  
  Index: hooks.html
  ===
  RCS file: /home/cvs/apache-2.0/htdocs/hooks.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- hooks.html1999/08/15 13:50:26 1.1
  +++ hooks.html2000/01/04 17:26:01 1.2
  @@ -1,5 +1,20 @@
  -Apache Hook Functions
  +
  +
  +
  +Apache 2.0 Hook Functions
  +
  +
  +
  +
   
  +Apache Hook Functions
  +
   In general, a hook function is one that Apache will call at some
   point during the processing of a request. Modules can provide
   functions that are called, and specify when they get called in
  @@ -182,4 +197,6 @@
   by HOOK_ORDER is preserved, as far as is
   possible.
   
  -Ben Laurie, 15th August 1999
  \ No newline at end of file
  +Ben Laurie, 15th August 1999
  +
  +
  
  
  
  1.2   +3 -1  apache-2.0/htdocs/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-2.0/htdocs/index.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.html1999/07/04 09:26:07 1.1
  +++ index.html2000/01/04 17:26:01 1.2
  @@ -3,6 +3,8 @@
   Simple Page for Apache-MPM
   
   
  -Simple Page for Apache-MPM
  +Simple Page for Apache-MPM
  +Apache Hook Functions
  +Converting Apache 1.3 Modules to Apache 2.0
   
   
  
  
  


cvs commit: apache-2.0/htdocs modules.html

2000-01-04 Thread dreid
dreid   00/01/04 09:14:00

  Added:   htdocs   modules.html
  Log:
  HTML doc outlining how to convert a module from 1.3 to 2.0.
  
  Not complete but at least it's a start.
  
  Revision  ChangesPath
  1.1  apache-2.0/htdocs/modules.html
  
  Index: modules.html
  ===
  
  
  
  Converting Modules from Apache 1.3 to Apache 2.0
  
  
  
  
  
  From Apache 1.3 to Apache 2.0Modules
  
  
  This is a first attempt at writing the lessons I learned when trying to 
convert the mod_mmap_static module to Apache 2.0.  It's by no means definitive 
and probably won't even be correct in some ways, but it's a start.
  
  
  The easier changes...
  
  
  Cleanup Routines
  
  These now need to be of type ap_status_t and return a value of that type.  
Normally the return value will be APR_SUCCESS unless there is some need to 
signal an error in the cleanup.  Be aware that even though you signal an error 
not all code yet checks and acts upon the error.
  
  
  Initialisation Routines
  
  
  These should now be renamed to better signify where they sit in the overall 
process.  So the name gets a small change from mmap_init to mmap_post_config.  
The arguments passed have undergone a radical change and now look like
  
  
  ap_context_t *p,
  ap_context_t *plog,
  ap_context_t *ptemp,
  server_rec *s
  
  
  Throughout Apache the old pools have been replced by the ap_context_t, though 
their use remains remarkably similar.
  
  
  Data Types
  
  A lot of the data types have been moved into the APR.  This means that some 
have had a name change, such as the one shown above.  The following is a brief 
list of some of the changes that you are likely to have to make.
  
  pool becomes ap_context_t
  table becomes ap_table_t
  
  
  
  
  The messier changes...
  
  Register Hooks
  
  The new architecture uses a series of hooks to provide for calling your 
functions.  These you'll need to add to your module by way of a new function, 
static void register_hooks(void).  The function is really reasonably 
straightforward once you understand what needs to be done.  Each function that 
needs calling at some stage in the processing of a request needs to be 
registered, handlers do not.  There are a number of phases where functions can 
be added, and for each you can specify with a high degree of control the 
relative order that the function will be called in.
  
  
  This is the code that was added to mod_mmap_static
  
  
  static void register_hooks(void)
  {
  static const char * const aszPre[]={ "http_core.c",NULL };
  ap_hook_post_config(mmap_post_config,NULL,NULL,HOOK_MIDDLE);
  ap_hook_translate_name(mmap_static_xlat,aszPre,NULL,HOOK_LAST);
  };
  
  
  This registers 2 functions that need to be called, one in the post_config 
stage (virtually every module will need this one) and one for the 
translate_name phase.  note that while there are different function names the 
format of each is identical.  So what is the format?
  
  
  ap_hook_[phase_name](function_name, predecessors, successors, position);
  
  
  There are 3 hook positions defined...
  
  
  HOOK_FIRST
  HOOK_MIDDLE
  HOOK_LAST
  
  
  To define the position you use the position and then modify it with the 
predecessors and successors.  each of the modifiers can be a list of functions 
that should be called, either before the function is run (predecessors) or 
after the function has run (successors).
  
  
  In the mod_mmap_static case I didn't care about the post_config stage, but 
the mmap_static_xlat MUST be called after the core module had done it's name 
translation, hence the use of the aszPre to define a modifier to the position 
HOOK_LAST.
  
  Module Definition
  
  
  There are now a lot fewer stages to worry about when creating your module 
definition.  The old defintion looked like
  
  
  module MODULE_VAR_EXPORT [module_name]_module =
  {
  STANDARD_MODULE_STUFF,
  /* initializer */
  /* dir config creater */
  /* dir merger --- default is to override */
  /* server config */
  /* merge server config */
  /* command handlers */
  /* handlers */
  /* filename translation */
  /* check_user_id */
  /* check auth */
  /* check access */
  /* type_checker */
  /* fixups */
  /* logger */
  /* header parser */
  /* child_init */
  /* child_exit */
  /* post read-request */
  };
  
  
  The new structure is a great deal simpler...
  
  
  module MODULE_VAR_EXPORT [module_name]_module =
  {
  STANDARD20_MODULE_STUFF,
  /* create per-directory config structures */
  /* merge per-directory config structures  */
  /* create per-server config structures*/
  /* merge per-server config structures */
  /* command handlers */
  /* handlers */
  /* register hooks */
   };
  
  
  Some of these r

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

1999-12-20 Thread dreid
dreid   99/12/20 08:04:16

  Modified:src/lib/apr/locks/beos Makefile.in
  Log:
  Missed this one when I did the others.  As there isn't an inc directory
  I guess the other platforms should do this as well?
  
  Revision  ChangesPath
  1.4   +3 -4  apache-2.0/src/lib/apr/locks/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/11/02 11:30:36 1.3
  +++ Makefile.in   1999/12/20 16:04:15 1.4
  @@ -8,10 +8,9 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
  -INCDIR1=../../include
  -INCDIR2=../../file_io/unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) -I.
  +INCDIR=../../include
  +INCDIR1=../../file_io/unix
  +INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
   
   LIB=liblock.a
   
  
  
  


cvs commit: apache-2.0/src Configure

1999-12-19 Thread dreid
dreid   99/12/19 10:18:11

  Modified:src  Configure
  Log:
  Continuing the work to overcome the PowerPC BeOS autoconf is this little
  patch that allows Apache to be built at long last on PowerPC BeOS.
  
  Revision  ChangesPath
  1.18  +12 -2 apache-2.0/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/src/Configure,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Configure 1999/12/19 10:05:04 1.17
  +++ Configure 1999/12/19 18:18:10 1.18
  @@ -758,13 +758,23 @@
MAKE="make"
DEF_WANTHSREGEX=yes
;;
  -*-BeOS*)
  +BePC-*-BeOS*)
OS='BeOS';
CFLAGS="$CFLAGS -DBEOS"
DEF_WANTHSREGEX=yes
OSDIR='os/beos'
DEF_MPM_METHOD=mpmt_beos
  -   ;;
  + ;;
  +BeMac-*-BeOS*)
  +OS='BeOS'
  +CFLAGS="$CFLAGS -DBEOS"
  +DEF_WANTHSREGEX=yes
  +OSDIR='os/beos'
  +CPP="mwcc -E"
  +CC="mwcc"
  +AR="ar"
  +DEF_MPM_METHOD=mpmt_beos
  +;;
   4850-*.*)
OS='NCR MP/RAS'
CFLAGS="$CFLAGS -DSVR4 -DMPRAS"
  
  
  


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

1999-12-19 Thread dreid
dreid   99/12/19 10:10:05

  Modified:src/lib/apr configure.in
   src/lib/apr/file_io/beos Makefile.in
   src/lib/apr/lib Makefile.in apr_md5.c
   src/lib/apr/misc/beos Makefile.in
   src/lib/apr/mmap/beos Makefile.in
   src/lib/apr/network_io/beos Makefile.in
   src/lib/apr/test Makefile.in
   src/lib/apr/threadproc/beos Makefile.in
   src/lib/apr/time/unix Makefile.in
  Log:
  The compiler for PowerPC versions of BeOS is about as pedantic as
  I've ever seen so this set of patches gets it working with no
  niggles.  The autoconf also gives answers that don't work so these
  are set to get around this problem.
  
  Revision  ChangesPath
  1.36  +5 -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.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- configure.in  1999/12/14 18:11:06 1.35
  +++ configure.in  1999/12/19 18:09:59 1.36
  @@ -35,6 +35,11 @@
   dnl # combinations
   case "$OS:$CC" in
   *-hp-hpux*:cc ) CFLAGS="$CFLAGS -Ae +DAportable" ;;
  +powerpc-*-beos:mwcc* )
  +CPP="mwcc -E"
  +CC="mwcc"
  +AR="ar"
  +;;
   esac
   
   
  
  
  
  1.8   +2 -3  apache-2.0/src/lib/apr/file_io/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/beos/Makefile.in,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.in   1999/12/12 17:08:42 1.7
  +++ Makefile.in   1999/12/19 18:10:00 1.8
  @@ -9,9 +9,8 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
  -INCDIR1=../../include -I../unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
  +INCDIR=../../include -I../unix
  +INCLUDES=-I$(INCDIR) -I.
   
   LIB=libfile.a
   
  
  
  
  1.8   +3 -4  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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Makefile.in   1999/12/03 15:18:26 1.7
  +++ Makefile.in   1999/12/19 18:10:01 1.8
  @@ -10,10 +10,9 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../inc
  -INCDIR1=../include
  -INCDIR2=../misc/@OSDIR@
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2)
  +INCDIR=../include
  +INCDIR1=../misc/@OSDIR@
  +INCLUDES=-I$(INCDIR) -I$(INCDIR1)
   
   [EMAIL PROTECTED]@apr.a
   
  
  
  
  1.6   +1 -1  apache-2.0/src/lib/apr/lib/apr_md5.c
  
  Index: apr_md5.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_md5.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- apr_md5.c 1999/12/02 17:05:39 1.5
  +++ apr_md5.c 1999/12/19 18:10:01 1.6
  @@ -606,7 +606,7 @@
/*
 * It's not our algorithm, so feed it to crypt() if possible.
 */
  -#ifdef WIN32
  +#if defined(WIN32) || defined(BEOS)
ap_cpystrn(sample, passwd, sizeof(sample) - 1);
   #else
crypt_pw = crypt(passwd, hash);
  
  
  
  1.6   +3 -4  apache-2.0/src/lib/apr/misc/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/Makefile.in,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Makefile.in   1999/12/12 17:08:44 1.5
  +++ Makefile.in   1999/12/19 18:10:02 1.6
  @@ -8,10 +8,9 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
  -INCDIR1=../../include
  -INCDIR2=../../file_io/unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) -I.
  +INCDIR=../../include
  +INCDIR1=../../file_io/unix
  +INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
   
   LIB=libmisc.a
   
  
  
  
  1.5   +2 -3  apache-2.0/src/lib/apr/mmap/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/12/12 17:08:47 1.4
  +++ Makefile.in   1999/12/19 18:10:02 1.5
  @@ -9,9 +9,8 @@
   [EMAIL PROTECTED]@ @OPTIM@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
  -INCDIR=../../inc
  -INCDIR1=../../include -I../../file_io/unix
  -INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
  +INCDIR=../../include -I..

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

1999-12-19 Thread dreid
dreid   99/12/19 02:05:17

  Modified:src  Configure
   src/main buff.c http_protocol.c util_md5.c
   src/modules/standard mod_echo.c
  Log:
  Remove some nuisance warnings by changing int to ap_ssize_t.
  Also add a default MPM_METHOD for BeOS.
  
  Revision  ChangesPath
  1.17  +1 -0  apache-2.0/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/src/Configure,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Configure 1999/11/02 05:08:51 1.16
  +++ Configure 1999/12/19 10:05:04 1.17
  @@ -763,6 +763,7 @@
CFLAGS="$CFLAGS -DBEOS"
DEF_WANTHSREGEX=yes
OSDIR='os/beos'
  + DEF_MPM_METHOD=mpmt_beos
  ;;
   4850-*.*)
OS='NCR MP/RAS'
  
  
  
  1.26  +8 -4  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.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- buff.c1999/11/07 05:58:24 1.25
  +++ buff.c1999/12/19 10:05:08 1.26
  @@ -337,7 +337,8 @@
   API_EXPORT(ap_status_t) ap_bread(BUFF *fb, void *buf, ap_size_t nbyte,
ap_ssize_t *bytes_read)
   {
  -int i, nrd;
  +int nrd;
  +ap_ssize_t i;
   ap_status_t rv;
   
   if (fb->flags & B_RDERR) {
  @@ -441,7 +442,8 @@
*/
   API_EXPORT(int) ap_bgets(char *buff, int n, BUFF *fb)
   {
  -int i, ch, ct;
  +int ch, ct;
  +ap_ssize_t i;
   ap_status_t rv;
   
   /* Can't do bgets on an unbuffered stream */
  @@ -876,7 +878,8 @@
   API_EXPORT(int) ap_bputs(const char *x, BUFF *fb)
   {
   ap_status_t rv;
  -int i, j = strlen(x);
  +int j = strlen(x);
  +ap_ssize_t i;
   rv = ap_bwrite(fb, x, j, &i);
   if (i != j) {
   fb->berrno = rv;
  @@ -891,7 +894,8 @@
*/
   API_EXPORT_NONSTD(int) ap_bvputs(BUFF *fb,...)
   {
  -int i, j, k;
  +int j, k;
  +ap_ssize_t i;
   va_list v;
   const char *x;
   
  
  
  
  1.41  +2 -1  apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- http_protocol.c   1999/12/09 21:47:45 1.40
  +++ http_protocol.c   1999/12/19 10:05:09 1.41
  @@ -2337,7 +2337,8 @@
   API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r,...)
   {
   va_list args;
  -int i, j, k;
  +ap_ssize_t i;
  +int j, k;
   const char *x;
   BUFF *fb = r->connection->client;
   ap_status_t rv;
  
  
  
  1.7   +1 -1  apache-2.0/src/main/util_md5.c
  
  Index: util_md5.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/util_md5.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- util_md5.c1999/12/11 00:13:19 1.6
  +++ util_md5.c1999/12/19 10:05:10 1.7
  @@ -217,7 +217,7 @@
   AP_MD5_CTX context;
   unsigned char buf[1000];
   long length = 0;
  -int nbytes;
  +ap_ssize_t nbytes;
   
   ap_MD5Init(&context);
   nbytes = sizeof(buf);
  
  
  
  1.14  +1 -2  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
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- mod_echo.c1999/10/30 05:25:32 1.13
  +++ mod_echo.c1999/12/19 10:05:15 1.14
  @@ -38,8 +38,7 @@
   
   for( ; ; )
{
  - int w;
  - int r;
  + ap_ssize_t r, w;
   (void) ap_bread(c->client,buf,sizeof buf,&r);
if(r <= 0)
break;
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/beos proc.c procsup.c signals.c thread.c threadcancel.c threadpriv.c threadproc.h

1999-12-15 Thread dreid
dreid   99/12/15 05:07:33

  Modified:src/lib/apr/file_io/unix pipe.c
   src/lib/apr/locks/beos crossproc.c intraproc.c locks.c
locks.h
   src/lib/apr/mmap/beos mmap.c mmap_h.h
   src/lib/apr/network_io/beos inet_aton.c networkio.h poll.c
sendrecv.c sockaddr.c sockets.c sockopt.c
   src/lib/apr/threadproc/beos proc.c procsup.c signals.c
thread.c threadcancel.c threadpriv.c threadproc.h
  Log:
  Update the BeOS files to use a single header.
  BeOS can't use the same non-blocking code as Unix for pipes, so
  until I can add the appropriate code I'm commenting it out for BeOS.
  
  Revision  ChangesPath
  1.9   +6 -2  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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- pipe.c1999/12/03 15:18:23 1.8
  +++ pipe.c1999/12/15 13:07:21 1.9
  @@ -57,6 +57,7 @@
   
   static ap_status_t pipenonblock(struct file_t *thefile)
   {
  +#ifndef BEOS /* this code won't work on BeOS */
   int fd_flags;
   
   fd_flags = fcntl(thefile->filedes, F_GETFL, 0);
  @@ -66,13 +67,14 @@
   fd_flags |= O_NDELAY;
   #elif defined(FNDELAY)
   fd_flags |= O_FNDELAY;
  -#else
  +#else */
   /* : this breaks things, but an alternative isn't obvious...*/
   return -1;
   #endif
   if (fcntl(thefile->filedes, F_SETFL, fd_flags) == -1) {
   return errno;
   }
  +#endif /* !BeOS */
   return APR_SUCCESS;
   }
   
  @@ -153,6 +155,7 @@
   
   ap_status_t ap_block_pipe(ap_file_t *thefile)
   {
  +#ifndef BEOS /* this code won't work on BeOS */
   int fd_flags;
   
   fd_flags = fcntl(thefile->filedes, F_GETFL, 0);
  @@ -162,13 +165,14 @@
   fd_flags &= ~O_NDELAY;
   #elif defined(FNDELAY)
   fd_flags &= ~O_FNDELAY;
  -#else
  +#else 
   /* : this breaks things, but an alternative isn't obvious...*/
   return -1;
   #endif
   if (fcntl(thefile->filedes, F_SETFL, fd_flags) == -1) {
   return errno;
   }
  +#endif /* !BeOS */
   return APR_SUCCESS;
   }
   
  
  
  
  1.4   +0 -3  apache-2.0/src/lib/apr/locks/beos/crossproc.c
  
  Index: crossproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/crossproc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- crossproc.c   1999/10/13 22:49:51 1.3
  +++ crossproc.c   1999/12/15 13:07:22 1.4
  @@ -53,9 +53,6 @@
*
*/
   
  -#include "apr_lock.h"
  -#include "apr_general.h"
  -#include "apr_lib.h"
   #include "locks.h"
   
   ap_status_t lock_inter_cleanup(void * data)
  
  
  
  1.4   +0 -3  apache-2.0/src/lib/apr/locks/beos/intraproc.c
  
  Index: intraproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/intraproc.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- intraproc.c   1999/10/13 22:49:52 1.3
  +++ intraproc.c   1999/12/15 13:07:22 1.4
  @@ -53,10 +53,7 @@
*
*/
   
  -#include "apr_lock.h"
  -#include "apr_general.h"
   #include "locks.h"
  -#include "apr_lib.h"
   
   ap_status_t lock_intra_cleanup(void *data)
   {
  
  
  
  1.7   +0 -4  apache-2.0/src/lib/apr/locks/beos/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- locks.c   1999/11/05 21:26:13 1.6
  +++ locks.c   1999/12/15 13:07:22 1.7
  @@ -53,11 +53,7 @@
*
*/
   
  -#include "apr_lock.h"
  -#include "apr_general.h"
   #include "locks.h"
  -#include 
  -#include 
   
   ap_status_t ap_create_lock(struct lock_t **lock, ap_locktype_e type, 
  ap_lockscope_e scope, char *fname, 
  
  
  
  1.2   +2 -0  apache-2.0/src/lib/apr/locks/beos/locks.h
  
  Index: locks.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- locks.h   1999/08/17 15:59:42 1.1
  +++ locks.h   1999/12/15 13:07:22 1.2
  @@ -58,6 +58,8 @@
   #include 
   #include "apr_lock.h"
   #include "apr_file_io.h"
  +#include "apr_general.h"
  +#include "apr_lib.h"
   
   struct lock_t {
   ap_context_t *

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

1999-12-15 Thread dreid
dreid   99/12/15 04:35:16

  Modified:src/lib/apr/threadproc/beos proc.c
  Log:
  Update the proc routines for BeOS.  CGI is still hosed though :-(
  
  Revision  ChangesPath
  1.13  +50 -16apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- proc.c1999/11/05 21:26:29 1.12
  +++ proc.c1999/12/15 12:35:15 1.13
  @@ -93,26 +93,53 @@
   ap_status_t ap_setprocattr_io(struct procattr_t *attr, ap_int32_t in, 
ap_int32_t out, ap_int32_t err)
   {
  -ap_status_t stat;
  -if (in) {
  -if ((stat = ap_create_pipe(&attr->child_in, &attr->parent_in,
  -attr->cntxt)) != APR_SUCCESS) {
  -return stat;
  +ap_status_t status;
  +if (in != 0) {
  +if ((status = ap_create_pipe(&attr->child_in, &attr->parent_in, 
  +   attr->cntxt)) != APR_SUCCESS) {
  +return status;
   }
  +switch (in) {
  +case APR_FULL_BLOCK:
  +ap_block_pipe(attr->child_in);
  +ap_block_pipe(attr->parent_in);
  +case APR_PARENT_BLOCK:
  +ap_block_pipe(attr->parent_in);
  +case APR_CHILD_BLOCK:
  +ap_block_pipe(attr->child_in);
  +}
   } 
   if (out) {
  -if ((stat = ap_create_pipe(&attr->parent_out, &attr->child_out,
  - attr->cntxt)) != APR_SUCCESS) {
  -return stat;
  +if ((status = ap_create_pipe(&attr->parent_out, &attr->child_out, 
  +   attr->cntxt)) != APR_SUCCESS) {
  +return status;
  +}
  +switch (out) {
  +case APR_FULL_BLOCK:
  +ap_block_pipe(attr->child_out);
  +ap_block_pipe(attr->parent_out);
  +case APR_PARENT_BLOCK:
  +ap_block_pipe(attr->parent_out);
  +case APR_CHILD_BLOCK:
  +ap_block_pipe(attr->child_out);
   }
   } 
   if (err) {
  -if ((stat = ap_create_pipe(&attr->parent_err, &attr->child_err,
  -  attr->cntxt)) != APR_SUCCESS) {
  -return stat;
  +if ((status = ap_create_pipe(&attr->parent_err, &attr->child_err, 
  +   attr->cntxt)) != APR_SUCCESS) {
  +return status;
  +}
  +switch (err) {
  +case APR_FULL_BLOCK:
  +ap_block_pipe(attr->child_err);
  +ap_block_pipe(attr->parent_err);
  +case APR_PARENT_BLOCK:
  +ap_block_pipe(attr->parent_err);
  +case APR_CHILD_BLOCK:
  +ap_block_pipe(attr->child_err);
   }
   } 
  - return APR_SUCCESS;
  +return APR_SUCCESS;
   }
   
   ap_status_t ap_setprocattr_dir(struct procattr_t *attr, 
  @@ -224,10 +251,17 @@
   return errno;
   }
   resume_thread(newproc);
  -ap_close (attr->child_in);
  -ap_close (attr->child_out);
  -ap_close (attr->child_err);
  -
  +
  +if (attr->child_in) {
  +ap_close(attr->child_in);
  +}
  +if (attr->child_out) {
  +ap_close(attr->child_out);
  +}
  +if (attr->child_err) {
  +ap_close(attr->child_err);
  +}
  +
   send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
   (*new)->tid = newproc;
   
  
  
  


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

1999-12-15 Thread dreid
dreid   99/12/15 04:20:41

  Modified:src/lib/apr/test htdigest.c testmmap.c
  Log:
  Get the mmap test working again and tidy up in htdigest.
  
  Revision  ChangesPath
  1.10  +9 -0  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- htdigest.c1999/12/03 16:12:27 1.9
  +++ htdigest.c1999/12/15 12:20:40 1.10
  @@ -66,12 +66,21 @@
* 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 
  
  
  
  1.4   +11 -8 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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- testmmap.c1999/12/03 15:18:36 1.3
  +++ testmmap.c1999/12/15 12:20:40 1.4
  @@ -73,6 +73,7 @@
   ap_file_t *thefile;
   ap_int32_t flag = APR_READ;
   char *file1;
  +ap_ssize_t filesize;
   
   fprintf (stdout,"APR MMAP Test\n*\n\n");
   
  @@ -87,13 +88,6 @@
   getcwd(file1, PATH_LEN);
   strncat(file1,"/testmmap.c",11);  
   
  -fprintf(stdout,"Trying to delete the mmap file..");
  -if (ap_mmap_delete(themmap) != APR_SUCCESS) {
  -fprintf(stderr,"Failed!\n");
  -exit (-1);
  -}
  -fprintf(stdout,"OK\n\n");
  -
   fprintf(stdout, "Opening file");
   if (ap_open(&thefile, file1, flag, APR_UREAD | APR_GREAD, context) != 
APR_SUCCESS) {
   perror("Didn't open file");
  @@ -102,9 +96,18 @@
   else {
   fprintf(stdout, "OK\n");
   }
  +
  +fprintf(stderr, "Getting file size...");
  +if (ap_get_filesize(&filesize, thefile) != APR_SUCCESS) {
  +perror("Didn't open file");
  +exit(-1);
  +}
  +else {
  +fprintf(stdout, "%d bytes\n", filesize);
  +}  
   
   fprintf(stdout,"Trying to mmap the open file");
  -if (ap_mmap_create(&themmap, thefile, 0, 0, context) != APR_SUCCESS) {
  +if (ap_mmap_create(&themmap, thefile, 0, filesize, context) != 
APR_SUCCESS) {
   fprintf(stderr,"Failed!\n");
   exit(-1);
   }
  
  
  


cvs commit: apache-2.0/src/os/beos beosd.c

1999-12-15 Thread dreid
dreid   99/12/15 03:54:36

  Modified:src/os/beos beosd.c
  Log:
  A small change to allow Apache to run on the most recent versions
  of BeOS.
  
  Revision  ChangesPath
  1.8   +3 -0  apache-2.0/src/os/beos/beosd.c
  
  Index: beosd.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/beosd.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- beosd.c   1999/11/24 16:46:03 1.7
  +++ beosd.c   1999/12/15 11:54:35 1.8
  @@ -109,6 +109,8 @@
   
   static int set_group_privs(void)
   {
  +#if B_BEOS_VERSION < 0x0460
  +
   if (!geteuid()) {
char *name;
   
  @@ -147,6 +149,7 @@
return -1;
}
   }
  +#endif
   return 0;
   }
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/beos sockaddr.c

1999-12-12 Thread dreid
dreid   99/12/12 09:18:58

  Modified:src/lib/apr/network_io/beos sockaddr.c
  Log:
  The final stage of getting apache to build and run OK on BeOS.
  
  Revision  ChangesPath
  1.2   +0 -2  apache-2.0/src/lib/apr/network_io/beos/sockaddr.c
  
  Index: sockaddr.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockaddr.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sockaddr.c1999/10/24 12:27:33 1.1
  +++ sockaddr.c1999/12/12 17:18:57 1.2
  @@ -136,7 +136,6 @@
   }
   
   
  -#if HAVE_NETINET_IN_H
   ap_status_t ap_get_local_name(struct sockaddr_in **name, const struct 
socket_t *sock)
   {
   *name = sock->local_addr;
  @@ -148,4 +147,3 @@
   *name = sock->remote_addr;
   return APR_SUCCESS;
   }
  -#endif
  
  
  


cvs commit: apache-2.0/src/lib/apr/mmap/beos mmap_common.c Makefile.in common.c

1999-12-12 Thread dreid
dreid   99/12/12 09:08:48

  Modified:src/lib/apr/misc/beos Makefile.in getopt.c misc.h start.c
   src/lib/apr/mmap/beos Makefile.in
  Added:   src/lib/apr/file_io/beos Makefile.in file_io_common.c
readwrite.c
   src/lib/apr/mmap/beos mmap_common.c
  Removed: src/lib/apr/mmap/beos common.c
  Log:
  This change gets APR compiling on BeOS again.  Some filename changes
  to accomodate having multiple common.c files.
  
  Revision  ChangesPath
  1.7   +13 -55apache-2.0/src/lib/apr/file_io/beos/Makefile.in
  
  
  
  
  1.1  apache-2.0/src/lib/apr/file_io/beos/file_io_common.c
  
  Index: file_io_common.c
  ===
  /* 
   * 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/>.
   *
   */
  
  /* common.c */
  
  /* The code used in readwrite.c in the Unix directory won't work on
 BeOS so I've moved to using a common.c file for all the common
 code. */
 
  #include "../unix/dir.c"
  
  #include "../unix/fileacc.c"
  
  #include "../unix/filedup.c"
  
  #include "../unix/filestat.c"
  
  #include "../unix/open.c"
  
  #include "../unix/pipe.c"
  
  #include "../unix/seek.c"
  
  
  
  1.5   +187 -36   apache-2.0/src/lib/apr/file_io/beos/readwrite.c
  
  
  
  
  1.5   +10 -7 apache-2.0/src/lib/apr/misc/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/11/02 11:30:37 1.4
  +++ Makefile.in   1999/12/12 17:08:44 1.5
  @@ -50,10 +50,13 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  -getopt.o: getopt.c misc.h ../../include/apr_general.h \
  - ../../include/apr_config.h ../../include/apr_errno.h \
  - ../../include/apr_file_io.h
  -start.o: start.c ../../include/apr_config.h \
  - ../../include/apr_general.h ../../include/apr_errno.h \
  - $(INCDIR)/apr_pools.h ../../incl

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

1999-12-07 Thread dreid
dreid   99/12/07 07:09:23

  Modified:src/lib/apr/misc/beos misc.h
  Log:
  Add apr_abort to BeOS.
  
  Revision  ChangesPath
  1.5   +1 -0  apache-2.0/src/lib/apr/misc/beos/misc.h
  
  Index: misc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/misc.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- misc.h1999/11/20 22:05:07 1.4
  +++ misc.h1999/12/07 15:09:20 1.5
  @@ -71,6 +71,7 @@
   struct context_t {
   struct ap_pool_t *pool;
   void *prog_data;
  +int (*apr_abort)(int retcode);
   };
   
   #endif  /* ! MISC_H */
  
  
  


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

1999-12-06 Thread dreid
dreid   99/12/06 14:37:25

  Modified:src/lib/apr/lib apr_pools.c
  Log:
  Tidy up a small copy/paste error in the headers.
  
  Revision  ChangesPath
  1.27  +1 -1  apache-2.0/src/lib/apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- apr_pools.c   1999/12/06 15:47:45 1.26
  +++ apr_pools.c   1999/12/06 22:37:22 1.27
  @@ -80,7 +80,7 @@
   #include 
   #endif
   #ifdef HAVE_SIGNAL_H
  -#include 
  +#include 
   #endif
   #ifdef HAVE_SYS_WAIT_H
   #include 
  
  
  


cvs commit: apache-2.0/src/os/beos beosd.c

1999-11-24 Thread dreid
dreid   99/11/24 08:46:06

  Modified:src/os/beos beosd.c
  Log:
  Clean up some code that BeOS doesn't use.
  
  Revision  ChangesPath
  1.7   +0 -16 apache-2.0/src/os/beos/beosd.c
  
  Index: beosd.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/beosd.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- beosd.c   1999/11/19 18:49:09 1.6
  +++ beosd.c   1999/11/24 16:46:03 1.7
  @@ -65,26 +65,10 @@
   
   void beosd_detach(void)
   {
  -/*int x;  This isn't needed due to the fork() issue */
   pid_t pgrp;
   
   chdir("/");
   
  -/* 
  - * fork() is evil if we're also doing spawn_thread...so we don't use it.
  - * This means that it won't detach properly, so we'll have to find a way
  - * round this. 
  - */
  -/*
  -if ((x = fork()) > 0)
  - exit(0);
  -else if (x == -1) {
  - perror("fork");
  - ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  - "%s: unable to fork new process", ap_server_argv0);
  - exit(1);
  -}
  -*/
   RAISE_SIGSTOP(DETACH);
   
   if ((pgrp = setsid()) == -1) {
  
  
  


cvs commit: apache-2.0/src/modules/experimental Makefile.tmpl mod_mmap_static.c

1999-11-20 Thread dreid
dreid   99/11/20 04:55:27

  Modified:src/modules/experimental Makefile.tmpl mod_mmap_static.c
  Log:
  This brings mod_mmap_static into Apache 2.0 using APR.
  
  Tested on BeOS.
  
  Revision  ChangesPath
  1.5   +5 -4  apache-2.0/src/modules/experimental/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/experimental/Makefile.tmpl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.tmpl 1999/11/19 18:46:00 1.4
  +++ Makefile.tmpl 1999/11/20 12:55:26 1.5
  @@ -7,12 +7,12 @@
   mod_mmap_static.o: mod_mmap_static.c $(INCDIR)/httpd.h \
$(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
$(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
  - $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
  - $(INCDIR)/hsregex.h ../../lib/apr/include/apr_general.h \
  + $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
  + ../../lib/apr/include/apr_general.h \
../../lib/apr/include/apr_config.h ../../lib/apr/include/apr_errno.h \
../../lib/apr/include/apr_lib.h ../../lib/apr/include/apr_file_io.h \
$(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/util_uri.h \
  + $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
$(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
$(INCDIR)/http_log.h $(INCDIR)/http_protocol.h \
../../lib/apr/include/apr_portable.h \
  @@ -20,4 +20,5 @@
../../lib/apr/include/apr_win.h \
../../lib/apr/include/apr_network_io.h \
../../lib/apr/include/apr_lock.h ../../lib/apr/include/apr_time.h \
  - $(INCDIR)/http_request.h $(INCDIR)/http_core.h
  + ../../lib/apr/include/apr_mmap.h $(INCDIR)/http_request.h \
  + $(INCDIR)/http_core.h
  
  
  
  1.5   +49 -56apache-2.0/src/modules/experimental/mod_mmap_static.c
  
  Index: mod_mmap_static.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/experimental/mod_mmap_static.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_mmap_static.c 1999/08/31 21:37:08 1.4
  +++ mod_mmap_static.c 1999/11/20 12:55:26 1.5
  @@ -111,7 +111,6 @@
   #include 
   #include 
   #include 
  -#include 
   
   #define CORE_PRIVATE
   
  @@ -121,14 +120,16 @@
   #include "http_protocol.h"
   #include "http_request.h"
   #include "http_core.h"
  +#include "apr_mmap.h"
   
   module MODULE_VAR_EXPORT mmap_static_module;
   
   typedef struct {
  +ap_mmap_t *mm;
   char *filename;
  -void *mm;
   struct stat finfo;
   } a_file;
  +ap_context_t *context;
   
   typedef struct {
   ap_array_header_t *files;
  @@ -145,7 +146,7 @@
   return sconf;
   }
   
  -static void cleanup_mmap(void *sconfv)
  +ap_status_t cleanup_mmap(void *sconfv)
   {
   a_server_config *sconf = sconfv;
   size_t n;
  @@ -154,10 +155,11 @@
   n = sconf->files->nelts;
   file = (a_file *)sconf->files->elts;
   while(n) {
  - munmap(file->mm, file->finfo.st_size);
  - ++file;
  - --n;
  + ap_mmap_delete(file->mm);
  + ++file;
  + --n;
   }
  +return APR_SUCCESS;
   }
   
   static const char *mmapfile(cmd_parms *cmd, void *dummy, char *filename)
  @@ -165,36 +167,33 @@
   a_server_config *sconf;
   a_file *new_file;
   a_file tmp;
  -int fd;
  +ap_file_t *fd;
   caddr_t mm;
   
   if (stat(filename, &tmp.finfo) == -1) {
  - ap_log_error(APLOG_MARK, APLOG_WARNING, cmd->server,
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mmap_static: unable to stat(%s), skipping", filename);
return NULL;
   }
   if ((tmp.finfo.st_mode & S_IFMT) != S_IFREG) {
  - ap_log_error(APLOG_MARK, APLOG_WARNING, cmd->server,
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mmap_static: %s isn't a regular file, skipping", filename);
return NULL;
   }
  -fd = open(filename, O_RDONLY, 0);
  -if (fd == -1) {
  - ap_log_error(APLOG_MARK, APLOG_WARNING, cmd->server,
  +if (ap_open(&fd, filename, APR_READ, APR_OS_DEFAULT, context) != 
APR_SUCCESS) {
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mmap_static: unable to open(%s, O_RDONLY), skipping", filename);
return NULL;
   }
  -mm = mmap(NULL, tmp.finfo.st_size, PROT_READ, MAP_SHARED, fd, 0);
  -if (mm == (caddr_t)-1) {
  +if (ap_mmap_create(&tmp.mm, fd, 0, tmp.finfo.st_size, context) != 
APR_SUCCESS) {
int save_errno = errno;
  - close(fd);
  + ap_close(fd);
errno = save_errno;
  - ap_log_error(APLOG_MARK, APLOG_WARNING, cmd->server,
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, cmd->server,
"mmap_static: unable t

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

1999-11-20 Thread dreid
dreid   99/11/20 03:56:15

  Modified:src/include http_protocol.h
   src/main http_core.c http_protocol.c
  Log:
  Next stage of ap_mmap support.  Tested on FreeBSD and BeOS.
  
  Revision  ChangesPath
  1.8   +2 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- http_protocol.h   1999/11/05 15:45:03 1.7
  +++ http_protocol.h   1999/11/20 11:56:11 1.8
  @@ -60,6 +60,7 @@
   
   #include "ap_hooks.h"
   #include "apr_portable.h"
  +#include "apr_mmap.h"
   
   #ifdef __cplusplus
   extern "C" {
  @@ -140,7 +141,7 @@
   API_EXPORT(long) ap_send_fb(BUFF *f, request_rec *r);
   API_EXPORT(long) ap_send_fb_length(BUFF *f, request_rec *r, long length);
   
  -API_EXPORT(size_t) ap_send_mmap(void *mm, request_rec *r, size_t offset,
  +API_EXPORT(size_t) ap_send_mmap(ap_mmap_t *mm, request_rec *r, size_t offset,
size_t length);
   
   /* Hmmm... could macrofy these for now, and maybe forever, though the
  
  
  
  1.25  +17 -40apache-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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- http_core.c   1999/11/18 23:07:15 1.24
  +++ http_core.c   1999/11/20 11:56:12 1.25
  @@ -70,8 +70,9 @@
   #include "fnmatch.h"
   #include "http_connection.h"
   
  +/* Allow Apache to use ap_mmap */
   #ifdef USE_MMAP_FILES
  -#include 
  +#include "apr_mmap.h"
   
   /* mmap support for static files based on ideas from John Heidemann's
* patch against 1.0.5.  See
  @@ -83,16 +84,16 @@
* the benefit for small files.  It shouldn't be set lower than 1.
*/
   #ifndef MMAP_THRESHOLD
  -#ifdef SUNOS4
  -#define MMAP_THRESHOLD   (8*1024)
  -#else
  -#define MMAP_THRESHOLD   1
  -#endif
  -#endif
  -#endif
  +  #ifdef SUNOS4
  +  #define MMAP_THRESHOLD (8*1024)
  +  #else
  +  #define MMAP_THRESHOLD 1
  +  #endif /* SUNOS4 */
  +#endif /* MMAP_THRESHOLD */
   #ifndef MMAP_LIMIT
   #define MMAP_LIMIT  (4*1024*1024)
   #endif
  +#endif /* USE_MMAP_FILES */
   
   /* Server core module... This module provides support for really basic
* server operations, including options and commands which control the
  @@ -2440,25 +2441,6 @@
   
   static int do_nothing(request_rec *r) { return OK; }
   
  -#ifdef USE_MMAP_FILES
  -struct mmap_rec {
  -void *mm;
  -size_t length;
  -};
  -
  -static ap_status_t mmap_cleanup(void *mmv)
  -{
  -struct mmap_rec *mmd = mmv;
  -
  -if (munmap(mmd->mm, mmd->length) == -1) {
  -ap_log_error(APLOG_MARK, APLOG_ERR, errno, NULL,
  - "Failed to munmap memory of length %ld at 0x%lx",
  - (long) mmd->length, (long) mmd->mm);
  -}
  -return APR_SUCCESS;
  -}
  -#endif
  -
   /*
* Default handler for MIME types without other handlers.  Only GET
* and OPTIONS at this point... anyone who wants to write a generic
  @@ -2476,7 +2458,7 @@
   ap_os_file_t fd_os;
   ap_status_t status;
   #ifdef USE_MMAP_FILES
  -caddr_t mm;
  +ap_mmap_t *mm = NULL;
   #endif
   #ifdef CHARSET_EBCDIC
   /* To make serving of "raw ASCII text" files easy (they serve faster
  @@ -2544,18 +2526,17 @@
&& (!r->header_only || (d->content_md5 & 1))) {
/* we need to protect ourselves in case we die while we've got the
 * file mmapped */
  - mm = mmap(NULL, r->finfo.st_size, PROT_READ, MAP_PRIVATE,
  -   fd_os, 0);
  - if (mm == (caddr_t)-1) {
  +if (ap_mmap_create(&mm, fd, 0, r->finfo.st_size, r->pool) != 
APR_SUCCESS){
ap_log_rerror(APLOG_MARK, APLOG_CRIT, errno, r,
 "default_handler: mmap failed: %s", r->filename);
  + mm = NULL;
}
   }
   else {
  - mm = (caddr_t)-1;
  + mm = NULL;
   }
   
  -if (mm == (caddr_t)-1) {
  +if (mm == NULL) {
   #endif
   
   #ifdef CHARSET_EBCDIC
  @@ -2597,18 +2578,14 @@
   #ifdef USE_MMAP_FILES
   }
   else {
  - struct mmap_rec *mmd;
  -
  - mmd = ap_palloc(r->pool, sizeof(*mmd));
  - mmd->mm = mm;
  - mmd->length = r->finfo.st_size;
  - ap_register_cleanup(r->pool, (void *)mmd, mmap_cleanup, mmap_cleanup);
  + char *addr;
  +ap_mmap_offset((void**)&addr, mm ,0);
   
if (d->content_md5 & 1) {
AP_MD5_CTX context;

ap_MD5Init(&

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

1999-11-13 Thread dreid
dreid   99/11/12 16:07:26

  Modified:src/lib/apr aclocal.m4 configure.in
   src/lib/apr/include apr_mmap.h
   src/lib/apr/mmap/beos mmap.c mmap_h.h
   src/lib/apr/mmap/unix common.c mmap.c mmap_h.h
  Log:
  hange the way that we test for the size of ssize_t, using code suggested by
  Ralf after I found that the test failed on FreeBSD.
  
  Update the mmap code to use a much simpler API than previously.  I'll
  add documentation as well as support for this in http_core.c over the
  weekend.
  
  Revision  ChangesPath
  1.6   +27 -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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- aclocal.m41999/11/10 18:27:02 1.5
  +++ aclocal.m41999/11/13 00:07:04 1.6
  @@ -133,6 +133,32 @@
   ])dnl
   fi
   rm -fr conftest*])
  -
  +dnl A variant of AC_CHECK_SIZEOF which allows the checking of
  +dnl sizes of non-builtin types
  +dnl AC_CHECK_SIZEOF_EXTENDED(INCLUDES, TYPE [, CROSS_SIZE])
  +AC_DEFUN(AC_CHECK_SIZEOF_EXTENDED,
  +[changequote(<<,>>)dnl
  +dnl The name to #define
  +define(<>, translit(sizeof_$2, [a-z *], [A-Z_P]))dnl
  +dnl The cache variable
  +define(<>, translit(ac_cv_sizeof_$2, [ *],[]))dnl
  +changequote([, ])dnl
  +AC_MSG_CHECKING(size of $2)
  +AC_CACHE_VAL(AC_CV_NAME,
  +[AC_TRY_RUN([#include 
  +$1
  +main()
  +{
  +  FILE *f=fopen("conftestval","w");
  +  if (!f) exit(1);
  +  fprintf(f, "%d\n", sizeof($2));
  +  exit(0);
  +}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$3],,,
  +AC_CV_NAME=$3))])dnl
  +AC_MSG_RESULT($AC_CV_NAME)
  +AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
  +undefine([AC_TYPE_NAME])dnl
  +undefine([AC_CV_NAME])dnl
  +])
   
   
  
  
  
  1.25  +1 -12 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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- configure.in  1999/11/10 13:40:51 1.24
  +++ configure.in  1999/11/13 00:07:05 1.25
  @@ -57,18 +57,7 @@
   AC_CHECK_SIZEOF(long double, 12)
   AC_CHECK_SIZEOF(long long, 8)
   
  -MY_TRY_RUN([
  -#include  
  -#include  
  -#include 
  -
  -int main() {
  -return(sizeof(ssize_t));
  -} 
  -],
  -AC_DEFINE(SIZEOF_SSIZE_T, 4), 
  -AC_DEFINE_UNQUOTED(SIZEOF_SSIZE_T, $?),
  -AC_DEFINE(SIZEOF_SSIZE_T, 4))
  +AC_CHECK_SIZEOF_EXTENDED([#include ], ssize_t, 8)
   
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
   if test ".$SH" = . -a -f /bin/sh; then
  
  
  
  1.4   +3 -9  apache-2.0/src/lib/apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_mmap.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_mmap.h1999/11/04 12:33:39 1.3
  +++ apr_mmap.h1999/11/13 00:07:12 1.4
  @@ -71,19 +71,13 @@
   /*   Function definitions */
   
   /* creation */
  -ap_status_t ap_mmap_create(ap_mmap_t ** newmmap, const char *fname, 
ap_context_t *cntxt);
  -ap_status_t ap_mmap_open_create(ap_mmap_t **newmmap, ap_file_t *file, 
ap_context_t *cntxt);
  -ap_status_t ap_mmap_size_create(ap_mmap_t **newmmap, ap_file_t *file, 
ap_size_t size,
  -ap_context_t *cntxt);
  +ap_status_t ap_mmap_create(ap_mmap_t ** newmmap, ap_file_t *file, ap_off_t 
offset,
  + ap_size_t size, ap_context_t *cntxt);
   
   /* destruction */
   ap_status_t ap_mmap_delete(ap_mmap_t *mmap);
   
  -/* These are designed to be used in qsort, bsearch etc */
  -ap_int32_t ap_mmap_inode_compare(const void *m1, const void *m2);
  -ap_int32_t ap_mmap_filename_compare(const void *m1, const void *m2);
  -
  -ap_status_t ap_mmap_offset(void **addr, ap_mmap_t *mmap, ap_size_t offset);
  +ap_status_t ap_mmap_offset(void **addr, ap_mmap_t *mmap, ap_off_t offset);
   
   #ifdef __cplusplus
   }
  
  
  
  1.5   +13 -126   apache-2.0/src/lib/apr/mmap/beos/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/mmap.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mmap.c1999/11/04 12:33:40 1.4
  +++ mmap.c1999/11/13 00:07:16 1.5
  @@ -79,151 +79,38 @@
   return errno;
   }
   
  -ap_status_t ap_mmap_create(struct mmap_t **new, const char *fname,
  - ap_context_t *cont)
  +ap_status_t ap_mmap_create(struct mmap_t **new, ap_file_t *file, ap_off_t 
offset, ap_size_t size,
  +ap_context_t *cont)
   {
  -  

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

1999-11-04 Thread dreid
dreid   99/11/04 04:33:43

  Modified:src/lib/apr/include apr_mmap.h
   src/lib/apr/mmap/beos common.c mmap.c mmap_h.h
   src/lib/apr/mmap/unix common.c mmap.c mmap_h.h
  Log:
  This adds a new mmap function for both BeOS and unix.
  
  Also a couple of small corrections to previous code.
  
  Revision  ChangesPath
  1.3   +2 -0  apache-2.0/src/lib/apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_mmap.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_mmap.h1999/11/03 12:33:32 1.2
  +++ apr_mmap.h1999/11/04 12:33:39 1.3
  @@ -73,6 +73,8 @@
   /* creation */
   ap_status_t ap_mmap_create(ap_mmap_t ** newmmap, const char *fname, 
ap_context_t *cntxt);
   ap_status_t ap_mmap_open_create(ap_mmap_t **newmmap, ap_file_t *file, 
ap_context_t *cntxt);
  +ap_status_t ap_mmap_size_create(ap_mmap_t **newmmap, ap_file_t *file, 
ap_size_t size,
  +ap_context_t *cntxt);
   
   /* destruction */
   ap_status_t ap_mmap_delete(ap_mmap_t *mmap);
  
  
  
  1.2   +0 -1  apache-2.0/src/lib/apr/mmap/beos/common.c
  
  Index: common.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/common.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- common.c  1999/11/03 12:30:55 1.1
  +++ common.c  1999/11/04 12:33:40 1.2
  @@ -1,3 +1,2 @@
   #include "../unix/common.c"
   
  -
  
  
  
  1.4   +45 -2 apache-2.0/src/lib/apr/mmap/beos/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/mmap.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mmap.c1999/11/03 12:30:55 1.3
  +++ mmap.c1999/11/04 12:33:40 1.4
  @@ -123,7 +123,8 @@
   (*new)->size = st.st_size;
   (*new)->area = aid;
   (*new)->cntxt = cont;
  -   
  +(*new)->statted = 1;
  +   
   /* register the cleanup... */ 
   ap_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
ap_null_cleanup);
  @@ -145,7 +146,7 @@
   if (file->filedes == -1)
   /* there isn't a file handle so how can we mmap?? */
   return APR_EBADF;
  -(*new) = (struct mmap_t*)ap_palloc(file->cntxt, sizeof(struct mmap_t));
  +(*new) = (struct mmap_t*)ap_palloc(cont, sizeof(struct mmap_t));
   
   if (!file->stated) {
   /* h... we need to stat the file now */
  @@ -180,6 +181,48 @@
   (*new)->size = file->size;
   (*new)->area = aid;
   (*new)->cntxt = cont;
  +(*new)->statted = 1;
  +
  +/* register the cleanup... */ 
  +ap_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
  + ap_null_cleanup);
  +
  +return APR_SUCCESS;
  +}
  +
  +ap_status_t ap_mmap_size_create(ap_mmap_t **new, ap_file_t *file, ap_size_t 
mmapsize,
  +ap_context_t *cont)
  +{
  +char *mm;
  +area_id aid = -1;
  +char *areaname = "apr_mmap\0";
  +uint32 size;   
  +
  +if (file->buffered)
  +return APR_EBADF;
  +if (file->filedes == -1)
  +return APR_EBADF;
  +(*new) = (struct mmap_t*)ap_palloc(cont, sizeof(struct mmap_t));
  +  
  +size = ((mmapsize -1) / B_PAGE_SIZE) + 1;
  +
  +aid = create_area(areaname, (void*)&mm, B_ANY_ADDRESS, size * 
B_PAGE_SIZE, 
  +B_FULL_LOCK, B_READ_AREA|B_WRITE_AREA);
  +free(areaname);
  +
  +if (aid < B_OK) {
  +/* we failed to get an mmap'd file... */
  +return APR_ENOMEM;
  +}  
  +if (aid >= B_OK)
  +read(file->filedes, mm, mmapsize);
  +
  +(*new)->filename = ap_pstrdup(cont, file->fname);
  +(*new)->mm = mm;
  +(*new)->size = mmapsize;
  +(*new)->area = aid;
  +(*new)->cntxt = cont;
  +(*new)->statted = 0;
   
   /* register the cleanup... */ 
   ap_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
  
  
  
  1.2   +1 -0  apache-2.0/src/lib/apr/mmap/beos/mmap_h.h
  
  Index: mmap_h.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/mmap_h.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mmap_h.h  1999/10/20 20:22:03 1.1
  +++ mmap_h.h  1999/11/04 12:33:40 1.2
  @@ -69,6 +69,7 @@
   area_id area;
   void *mm;
   size_t size;
  +ap_int32_t statted;
   };
   
   ap_status_t mmap_cleanup(void *);
  
  
  
  1.2   +5 -1  apache-2.0/src/lib/apr/mmap/unix/co

cvs commit: apache-2.0/src/lib/apr/threadproc/beos apr_proc_stub.c

1999-11-04 Thread dreid
dreid   99/11/04 03:21:53

  Modified:src/lib/apr/threadproc/beos apr_proc_stub.c
  Log:
  Now that CGI works tidy up the files that support it.
  
  Revision  ChangesPath
  1.4   +7 -17 apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c
  
  Index: apr_proc_stub.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_proc_stub.c   1999/10/22 22:06:16 1.3
  +++ apr_proc_stub.c   1999/11/04 11:21:52 1.4
  @@ -7,7 +7,6 @@
int in;
int out;
int err;
  - char ** envp;
   };
   
   int main(int argc, char *argv[]) {
  @@ -23,15 +22,9 @@
struct pipefd *pfd;
thread_id sender;
void *buffer;
  - int indes[2];
  - int outdes[2];
  - int errdes[2];
char ** newargs;
int i = 0;
  - char * readbuffer;
  - size_t readbuf = 100;

  - readbuffer = (char*)malloc(sizeof(char) * readbuf);
newargs = (char**)malloc(sizeof(char*) * (argc - 1));
 
buffer = (void*)malloc(sizeof(struct pipefd));
  @@ -40,19 +33,16 @@
pfd = (struct pipefd*)buffer;

if (pfd->in > STDERR_FILENO) {
  - if (pipe(indes) == -1)return (-1);
  - if (dup2(pfd->in, indes[0]) != indes[0]) return (-1);
  - if (dup2(indes[0], STDIN_FILENO) != STDIN_FILENO) return (-1);
  + if (dup2(pfd->in, STDIN_FILENO) != STDIN_FILENO) return (-1);
  + close (pfd->in);
}
if (pfd->out > STDERR_FILENO) {
  - if (pipe(outdes) == -1)return (-1);
  - if (dup2(pfd->out, outdes[1]) != outdes[1]) return (-1);
  - if (dup2(outdes[1], STDOUT_FILENO) != STDOUT_FILENO) return 
(-1);
  + if (dup2(pfd->out, STDOUT_FILENO) != STDOUT_FILENO) return (-1);
  + close (pfd->out);
}
if (pfd->err > STDERR_FILENO) {
  - if (pipe(errdes) == -1)return (-1);
  - if (dup2(pfd->err, errdes[1]) != errdes[1]) return (-1);
  - if (dup2(errdes[1], STDERR_FILENO) != STDERR_FILENO) return 
(-1);
  + if (dup2(pfd->err, STDERR_FILENO) != STDERR_FILENO) return (-1);
  + close (pfd->err);
}
   
for (i=3;i<=argc;i++){
  @@ -64,7 +54,7 @@
   
if (directory != NULL)
chdir(directory);
  - execve (progname, newargs, NULL);
  + execve (progname, newargs, environ);
   
return (-1);
   }
  
  
  


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

1999-11-03 Thread dreid
dreid   99/11/03 13:47:49

  Modified:src/lib/apr/threadproc/beos proc.c
  Log:
  Thanks to Manuel J Petit de Gabriel for finding the problem with
  my pipes.  This fix allows CGI to work on BeOS.
  
  Revision  ChangesPath
  1.11  +4 -0  apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- proc.c1999/11/03 16:01:53 1.10
  +++ proc.c1999/11/03 21:47:44 1.11
  @@ -223,6 +223,10 @@
   return errno;
   }
   resume_thread(newproc);
  +ap_close (attr->child_in);
  +ap_close (attr->child_out);
  +ap_close (attr->child_err);
  +
   send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
   (*new)->tid = newproc;
   
  
  
  


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

1999-11-03 Thread dreid
dreid   99/11/03 08:01:53

  Modified:src/lib/apr/threadproc/beos proc.c
  Log:
  This allows ap_create_process to work again...
  
  Revision  ChangesPath
  1.10  +4 -5  apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- proc.c1999/11/03 07:29:05 1.9
  +++ proc.c1999/11/03 16:01:53 1.10
  @@ -67,7 +67,6 @@
int in;
int out;
int err;
  - char ** envp;
   };
   
   ap_status_t ap_createprocattr_init(struct procattr_t **new, ap_context_t 
*cont)
  @@ -192,10 +191,9 @@
sp->in  = attr->child_in?attr->child_in->filedes:-1;
sp->out = attr->child_out?attr->child_out->filedes:-1;
sp->err = attr->child_err?attr->child_err->filedes:-1;
  - sp->envp = env;
  - 
  +
   i = 0;
  -while (args[i]) {
  +while (args && args[i]) {
   i++;
   }
   
  @@ -212,7 +210,8 @@
}
newargs[2] = strdup(progname);
i=0;nargs = 3;
  - while (args[i]) {
  +
  + while (args && args[i]) {
newargs[nargs] = args[i];
i++;nargs++;
}
  
  
  


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

1999-11-03 Thread dreid
dreid   99/11/03 07:50:14

  Modified:src/os/beos iol_socket.c
  Log:
  Fix a small problem with beos_writev.
  
  Revision  ChangesPath
  1.4   +3 -1  apache-2.0/src/os/beos/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/iol_socket.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- iol_socket.c  1999/11/02 12:26:42 1.3
  +++ iol_socket.c  1999/11/03 15:50:13 1.4
  @@ -98,6 +98,7 @@
   return APR_SUCCESS;
   }
   
  +
   ap_status_t beos_write(ap_iol *viol, const char* buf, ap_size_t size,
ap_ssize_t *nbytes)
   {
  @@ -108,7 +109,8 @@
   ap_status_t beos_writev(ap_iol *viol, const struct iovec *vec, int nvec,
   ap_ssize_t *nbytes)
   {
  -return ap_send(((iol_socket *)viol)->sock, vec[0].iov_base, 
vec[0].iov_len);
  +*nbytes = vec[0].iov_len;
  +return ap_send(((iol_socket *)viol)->sock, vec[0].iov_base, nbytes);
   }
   
   ap_status_t beos_read(ap_iol *viol, char* buf, ap_size_t size,
  
  
  


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

1999-11-03 Thread dreid
dreid   99/11/03 04:33:34

  Modified:src/lib/apr/include apr_mmap.h
  Log:
  Add the new functions and also argument names :-)
  
  Revision  ChangesPath
  1.2   +11 -9 apache-2.0/src/lib/apr/include/apr_mmap.h
  
  Index: apr_mmap.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_mmap.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_mmap.h1999/10/21 20:36:45 1.1
  +++ apr_mmap.h1999/11/03 12:33:32 1.2
  @@ -69,17 +69,19 @@
   typedef struct mmap_tap_mmap_t;
   
   /*   Function definitions */
  -ap_status_t ap_mmap_create(ap_mmap_t **, const char *, ap_context_t *);
  -ap_status_t ap_mmap_open_create(ap_mmap_t **, ap_file_t *, ap_context_t *);
  -ap_status_t ap_mmap_delete(ap_mmap_t *);
   
  -ap_status_t ap_read_mmap(char *, ap_ssize_t *, ap_ssize_t *, 
  -ap_ssize_t *, ap_mmap_t *, ap_context_t *);
  -ap_status_t ap_send_mmap(ap_socket_t *, ap_ssize_t *, ap_ssize_t *, 
  -ap_mmap_t *, ap_context_t *);
  +/* creation */
  +ap_status_t ap_mmap_create(ap_mmap_t ** newmmap, const char *fname, 
ap_context_t *cntxt);
  +ap_status_t ap_mmap_open_create(ap_mmap_t **newmmap, ap_file_t *file, 
ap_context_t *cntxt);
   
  -ap_status_t ap_first_mmap(struct mmap_t *, ap_context_t *);
  -ap_status_t ap_next_mmap(struct mmap_t *, struct mmap_t *, ap_context_t *);
  +/* destruction */
  +ap_status_t ap_mmap_delete(ap_mmap_t *mmap);
  +
  +/* These are designed to be used in qsort, bsearch etc */
  +ap_int32_t ap_mmap_inode_compare(const void *m1, const void *m2);
  +ap_int32_t ap_mmap_filename_compare(const void *m1, const void *m2);
  +
  +ap_status_t ap_mmap_offset(void **addr, ap_mmap_t *mmap, ap_size_t offset);
   
   #ifdef __cplusplus
   }
  
  
  


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

1999-11-03 Thread dreid
dreid   99/11/03 04:30:59

  Modified:src/lib/apr/mmap/beos Makefile.in mmap.c
   src/lib/apr/mmap/unix Makefile.in mmap.c
  Added:   src/lib/apr/mmap/beos common.c
   src/lib/apr/mmap/unix common.c
  Log:
  Add more functions to the APR mmap.
  
  Revision  ChangesPath
  1.3   +16 -1 apache-2.0/src/lib/apr/mmap/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/Makefile.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.in   1999/10/21 21:13:24 1.2
  +++ Makefile.in   1999/11/03 12:30:55 1.3
  @@ -15,7 +15,7 @@
   
   LIB=libmmap.a
   
  -OBJS=mmap.o
  +OBJS=mmap.o common.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
  @@ -50,3 +50,18 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  +common.o: common.c ../unix/common.c ../unix/../beos/mmap_h.h \
  + ../../include/apr_general.h ../../include/apr_config.h \
  + ../../include/apr_errno.h ../../include/apr_mmap.h \
  + ../../include/apr_network_io.h ../../include/apr_portable.h \
  + ../../include/apr_thread_proc.h ../../include/apr_file_io.h \
  + ../../include/apr_win.h ../../include/apr_lock.h \
  + ../../include/apr_time.h ../../file_io/unix/fileio.h \
  + ../../include/apr_lib.h
  +mmap.o: mmap.c mmap_h.h ../../include/apr_general.h \
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_mmap.h ../../include/apr_network_io.h \
  + ../../include/apr_portable.h ../../include/apr_thread_proc.h \
  + ../../include/apr_file_io.h ../../include/apr_win.h \
  + ../../include/apr_lock.h ../../include/apr_time.h \
  + ../../include/apr_lib.h ../../file_io/unix/fileio.h
  
  
  
  1.3   +4 -4  apache-2.0/src/lib/apr/mmap/beos/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/mmap.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mmap.c1999/10/21 21:13:26 1.2
  +++ mmap.c1999/11/03 12:30:55 1.3
  @@ -134,7 +134,7 @@
   ap_status_t ap_mmap_open_create(struct mmap_t **new, ap_file_t *file, 
  ap_context_t *cont)
   {
  -void *mm;
  +char *mm;
   area_id aid = -1;
   char *areaname = "apr_mmap\0";
   uint32 size;   
  @@ -164,8 +164,8 @@
   
   size = ((file->size -1) / B_PAGE_SIZE) + 1;
   
  -aid = create_area(areaname, &mm, B_ANY_ADDRESS, size * B_PAGE_SIZE, 
  -B_LAZY_LOCK, B_READ_AREA|B_WRITE_AREA);
  +aid = create_area(areaname, (void*)&mm, B_ANY_ADDRESS, size * 
B_PAGE_SIZE, 
  +B_FULL_LOCK, B_READ_AREA|B_WRITE_AREA);
   free(areaname);
   
   if (aid < B_OK) {
  @@ -180,7 +180,7 @@
   (*new)->size = file->size;
   (*new)->area = aid;
   (*new)->cntxt = cont;
  -   
  +
   /* register the cleanup... */ 
   ap_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
ap_null_cleanup);
  
  
  
  1.1  apache-2.0/src/lib/apr/mmap/beos/common.c
  
  Index: common.c
  ===
  #include "../unix/common.c"
  
  
  
  
  
  1.4   +1 -1  apache-2.0/src/lib/apr/mmap/unix/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/unix/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/10/30 05:59:24 1.3
  +++ Makefile.in   1999/11/03 12:30:58 1.4
  @@ -15,7 +15,7 @@
   
   LIB=libmmap.a
   
  -OBJS=mmap.o
  +OBJS=mmap.o common.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
  
  
  
  1.4   +1 -1  apache-2.0/src/lib/apr/mmap/unix/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/unix/mmap.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mmap.c1999/10/24 04:30:19 1.3
  +++ mmap.c1999/11/03 12:30:59 1.4
  @@ -111,7 +111,7 @@
   (*new)->sinfo = st;
   (*new)->size = st.st_size;
   (*new)->cntxt = cont;
  -   
  +
   /* register the cleanup... */
   ap_register_cleanup((*new)->cntxt, (void*)(*new), mmap_cleanup,
ap_null_cleanup);
  
  
  
  1.1  apache-2.0/src/lib/apr/mmap/unix/common.c
  
  Index: common.c
  ===
  /* 
   * Copyright (c) 1999 The Apache Group.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, w

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

1999-11-02 Thread dreid
dreid   99/11/02 09:29:32

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c mpmt_beos.h
scoreboard.c scoreboard.h
  Log:
  Add support for connection_info to BeOS.  This follows the stuff
  Manoj has added to dexter.  Also take the opportunity to clean-up some
  of the code.
  
  Revision  ChangesPath
  1.8   +75 -144   apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mpmt_beos.c   1999/11/02 12:26:41 1.7
  +++ mpmt_beos.c   1999/11/02 17:29:18 1.8
  @@ -104,6 +104,15 @@
   ap_context_t *tpool; /* "pthread" would be confusing */
   } proc_info;
   
  +#define SERVER_DEAD 0
  +#define SERVER_DYING 1
  +#define SERVER_ALIVE 2
  +
  +static struct {
  +pid_t pid;
  +unsigned char status;
  +} child_table[HARD_SERVER_LIMIT];
  +
   #if 0
   #define SAFE_ACCEPT(stmt) do {if (ap_listeners->next != NULL) {stmt;}} while 
(0)
   #else
  @@ -115,7 +124,7 @@
* to deal with MaxClients changes across SIGWINCH restarts.  We use this
* value to optimize routines that have to scan the entire scoreboard.
*/
  -static int max_daemons_limit = -1;
  +int max_daemons_limit = -1;
   static char ap_coredump_dir[MAX_STRING_LEN];
   port_id port_of_death;
   
  @@ -307,8 +316,6 @@
   other_child_rec *ocr, *nocr;
   #endif
   
  -ap_sync_scoreboard_image();
  -
   for (tries = terminate ? 4 : 1; tries <= 9; ++tries) {
/* don't want to hold up progress any more than 
 * necessary, but we need to allow children a few moments to exit.
  @@ -322,15 +329,16 @@
/* now see who is done */
not_dead_yet = 0;
for (i = 0; i < max_daemons_limit; ++i) {
  - int pid = ap_scoreboard_image->parent[i].pid;
  +int pid;
  +if (child_table[i].status == SERVER_DEAD)
  +continue;
   
  - if (pid == my_pid || pid == 0)
  - continue;
  + pid = child_table[i].pid;
   
waitret = waitpid(pid, &status, WNOHANG);
if (waitret == pid || waitret == -1) {
  - ap_scoreboard_image->parent[i].pid = 0;
  - continue;
  + child_table[i].status = SERVER_DEAD;
  + continue;
}
++not_dead_yet;
switch (tries) {
  @@ -460,7 +468,6 @@
   static int volatile shutdown_pending;
   static int volatile restart_pending;
   static int volatile is_graceful;
  -ap_generation_t volatile ap_my_generation;
   
   /*
* ap_start_shutdown() and ap_start_restart(), below, are a first stab at
  @@ -659,8 +666,6 @@
return;
   }
   
  -(void) ap_update_child_status(my_child_num, my_thread_num,  
  -   SERVER_BUSY_READ, (request_rec *) NULL);
   conn_io = ap_bcreate(p, B_RDWR);
   ap_bpush_iol(conn_io, iol);
   
  @@ -703,8 +708,6 @@
   workers_may_exit |= (ap_max_requests_per_child != 0) && 
(requests_this_child <= 0);
   if (workers_may_exit) break;
   
  -(void) ap_update_child_status(process_slot, thread_slot, 
SERVER_READY, 
  -  (request_rec *) NULL);
   SAFE_ACCEPT(intra_mutex_on(0));
   if (workers_may_exit) {
   SAFE_ACCEPT(intra_mutex_off(0));
  @@ -766,8 +769,6 @@
   }
   
   ap_destroy_pool(tpool);
  -ap_update_child_status(process_slot, thread_slot, SERVER_DEAD,
  -(request_rec *) NULL);
   be_mutex_lock(&worker_thread_count_mutex);
   worker_thread_count--;
   if (worker_thread_count == 0) {
  @@ -798,8 +799,6 @@
   ap_create_context(&pchild, pconf);
   
   /*stuff to do before we switch id's, so we have permissions.*/
  -reopen_scoreboard(pchild);
  -
   SAFE_ACCEPT(intra_mutex_init(pchild, 1));
   SAFE_ACCEPT(accept_mutex_child_init(pchild));
   
  @@ -844,8 +843,6 @@
ap_create_context(&my_info->tpool, pchild);

/* We are creating threads right now */
  - (void) ap_update_child_status(my_child_num, i, SERVER_STARTING, 
  -   (request_rec *) NULL);
   
if ((thread = spawn_thread(worker_thread, "httpd_worker_thread",
  B_NORMAL_PRIORITY, my_info)) < B_NO_ERROR) {
  @@ -885,7 +882,8 @@
   
   if (one_process) {
set_signals();
  -ap_scoreboard_image->parent[slot].pid = getpid();
  +child_table[slot].pid = getpid();
  +child_table[slot].status = SERVER_ALIVE;
//child_main(slot);
   }
   
  @@ -903,14 +901,8 @@
   }
   resume_thread(tid);
   
  -/*if (!pid) {
  -RAISE_SIGSTOP(MAKE_CHILD);
  

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

1999-11-02 Thread dreid
dreid   99/11/02 06:16:10

  Modified:src/lib/apr/network_io/beos sockets.c
  Log:
  Fix something that was missed when the context was added to the
  ap_accept call.  Thanks to Manoj for pointing this out.
  
  Revision  ChangesPath
  1.13  +0 -1  apache-2.0/src/lib/apr/network_io/beos/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockets.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- sockets.c 1999/11/02 11:30:37 1.12
  +++ sockets.c 1999/11/02 14:16:10 1.13
  @@ -147,7 +147,6 @@
sizeof(ap_socket_t)); 
   
   (*new)->cntxt = connection_context;
  -(*new)->cntxt = sock->cntxt;
   (*new)->local_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
sizeof(struct sockaddr_in));
   (*new)->remote_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
  
  
  


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

1999-11-02 Thread dreid
dreid   99/11/02 04:26:43

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
   src/os/beos iol_socket.c iol_socket.h
  Log:
  Change the BeOS iol_socket layer to use apr.  Also update mpmt_beos.c
  to reflect this change.
  
  Revision  ChangesPath
  1.7   +2 -6  apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mpmt_beos.c   1999/10/28 22:14:54 1.6
  +++ mpmt_beos.c   1999/11/02 12:26:41 1.7
  @@ -643,11 +643,7 @@
   long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
   int csd;
   
  -ap_get_os_sock(&csd, sock);
  -
  -sock_disable_nagle(csd);
  -
  -iol = beos_attach_socket(csd);
  +iol = beos_attach_socket(sock);
   if (iol == NULL) {
   if (errno == EBADF) {
   ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING, errno, 
NULL,
  @@ -659,7 +655,7 @@
   ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
   "error attaching to socket");
   }
  -closesocket(csd);
  +ap_close_socket(sock);
return;
   }
   
  
  
  
  1.3   +26 -110   apache-2.0/src/os/beos/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/iol_socket.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- iol_socket.c  1999/10/22 11:25:42 1.2
  +++ iol_socket.c  1999/11/02 12:26:42 1.3
  @@ -58,19 +58,15 @@
   
   #include "httpd.h"
   #include "ap_iol.h"
  +#include "apr_network_io.h"
  +#include "apr_file_io.h"
   #include "iol_socket.h"
   
  -#include 
  -#include 
  -#include 
  -
   #define FD_NONBLOCKING_SET   (1)
   
   typedef struct {
   ap_iol iol;
  -int fd;
  -int flags;
  -int timeout;
  +ap_socket_t *sock;
   } iol_socket;
   
   static ap_status_t beos_setopt(ap_iol *viol, ap_iol_option opt,
  @@ -80,10 +76,10 @@
   
   switch (opt) {
   case AP_IOL_TIMEOUT:
  - iol->timeout = *(const int *)value;
  - break;
  +ap_setsocketopt(iol->sock, APR_SO_TIMEOUT, *(const int*)value);
  +break;
   default:
  - return APR_EINVAL;
  + return APR_EINVAL;
   }
   return APR_SUCCESS;
   }
  @@ -94,116 +90,42 @@
   
   switch (opt) {
   case AP_IOL_TIMEOUT:
  - *(int *)value = iol->timeout;
  - break;
  + /* no-op */
  + break;
   default:
  - return APR_EINVAL;
  + return APR_EINVAL;
   }
   return APR_SUCCESS;
   }
   
  -static ap_status_t set_nonblock(int fd)
  +ap_status_t beos_write(ap_iol *viol, const char* buf, ap_size_t size,
  + ap_ssize_t *nbytes)
   {
  -int on = 1;
  -int rv;
  -rv = setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int));
  -
  -if (rv == 0)
  -return APR_SUCCESS;
  -return errno;
  +*nbytes = size;
  +return ap_send(((iol_socket *)viol)->sock, buf, nbytes);
   }
  -
  -/* the timeout code is a separate routine because it requires
  -a stack frame... and we don't want to pay that setup cost
  -on every call */
  -
  -/* this macro expands into the four basic i/o methods */
  -
  -#define method(name, args, syscall, selread, selwrite)   \
  -static ap_status_t beos_##name##_timeout args \
  -{ \
  - iol_socket *iol = (iol_socket *)viol; \
  - fd_set fdset; \
  - struct timeval tv; \
  - int rv; \
  - \
  - FD_ZERO(&fdset); \
  - FD_SET(iol->fd, &fdset); \
  - tv.tv_sec = iol->timeout; \
  - tv.tv_usec = 0; \
  - do { \
  - rv = select(iol->fd + 1, selread, selwrite, NULL, iol->timeout < 0 
? NULL : &tv); \
  - } while (rv == -1 && errno == EINTR); \
  - if (!FD_ISSET(iol->fd, &fdset)) { \
  - return APR_ETIMEDOUT; \
  - } \
  - do { \
  - rv = syscall(iol->fd, arg1, arg2, 0); \
  - } while (rv == -1 && errno == EINTR); \
  -if (rv >= 0) { \
  -*nbytes = rv; \
  -return APR_SUCCESS; \
  -} \
  - return errno; \
  - \
  -} \
  - \
  -static ap_status_t beos_##name args \
  -{ \
  - iol_socket *iol = (iol_socket *)viol; \
  - int rv; \
  - \
  -/* Present to zero until some bytes are actually written */ \
  -*nbytes = 0; \
  - if (!(iol->flags & FD_NONBLOCKING_SET)) { \
  - if (iol->timeout < 0) { \
  - rv = syscall(iol->fd, arg1, arg2, 0); \
  -if (rv >= 0) { \
  -*nbytes = rv; 

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

1999-11-02 Thread dreid
dreid   99/11/02 03:30:39

  Modified:src/lib/apr/locks/beos Makefile.in
   src/lib/apr/misc/beos Makefile.in
   src/lib/apr/network_io/beos Makefile.in sockets.c
   src/lib/apr/threadproc/beos Makefile.in
  Log:
  This primarily updates some dependancies and fixes a small problem
  with ap_null_cleanup.
  
  Revision  ChangesPath
  1.3   +8 -6  apache-2.0/src/lib/apr/locks/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/Makefile.in,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.in   1999/08/27 16:25:37 1.2
  +++ Makefile.in   1999/11/02 11:30:36 1.3
  @@ -53,11 +53,13 @@
   
   # DO NOT REMOVE
   crossproc.o: crossproc.c ../../include/apr_lock.h \
  - ../../include/apr_general.h ../../include/apr_errno.h locks.h \
  - ../../include/apr_file_io.h
  + ../../include/apr_general.h ../../include/apr_config.h \
  + ../../include/apr_errno.h ../../include/apr_lib.h \
  + ../../include/apr_file_io.h locks.h
   intraproc.o: intraproc.c ../../include/apr_lock.h \
  - ../../include/apr_general.h ../../include/apr_errno.h locks.h \
  - ../../include/apr_file_io.h
  -locks.o: locks.c ../../include/apr_lock.h \
  - ../../include/apr_general.h ../../include/apr_errno.h locks.h \
  + ../../include/apr_general.h ../../include/apr_config.h \
  + ../../include/apr_errno.h locks.h ../../include/apr_file_io.h \
  + ../../include/apr_lib.h
  +locks.o: locks.c ../../include/apr_lock.h ../../include/apr_general.h \
  + ../../include/apr_config.h ../../include/apr_errno.h locks.h \
../../include/apr_file_io.h
  
  
  
  1.4   +7 -0  apache-2.0/src/lib/apr/misc/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/09/07 13:16:43 1.3
  +++ Makefile.in   1999/11/02 11:30:37 1.4
  @@ -50,3 +50,10 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  +getopt.o: getopt.c misc.h ../../include/apr_general.h \
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_file_io.h
  +start.o: start.c ../../include/apr_config.h \
  + ../../include/apr_general.h ../../include/apr_errno.h \
  + $(INCDIR)/apr_pools.h ../../include/apr_lib.h \
  + ../../include/apr_file_io.h misc.h
  
  
  
  1.5   +19 -5 apache-2.0/src/lib/apr/network_io/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/10/25 13:21:12 1.4
  +++ Makefile.in   1999/11/02 11:30:37 1.5
  @@ -54,12 +54,26 @@
&& rm Makefile.new
   
   # DO NOT REMOVE
  +inet_aton.o: inet_aton.c networkio.h ../../include/apr_general.h \
  + ../../include/apr_config.h ../../include/apr_errno.h
   poll.o: poll.c networkio.h ../../include/apr_general.h \
  - ../../include/apr_errno.h ../../include/apr_network_io.h
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_network_io.h
   sendrecv.o: sendrecv.c networkio.h ../../include/apr_general.h \
  - ../../include/apr_errno.h ../../include/apr_network_io.h
  -socket.o: socket.c
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../file_io/unix/fileio.h ../../include/apr_file_io.h \
  + ../../include/apr_network_io.h
  +sockaddr.o: sockaddr.c networkio.h ../../include/apr_general.h \
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_network_io.h ../../include/apr_lib.h \
  + ../../include/apr_file_io.h
   sockets.o: sockets.c networkio.h ../../include/apr_general.h \
  - ../../include/apr_errno.h ../../include/apr_network_io.h
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_network_io.h ../../include/apr_portable.h \
  + ../../include/apr_thread_proc.h ../../include/apr_file_io.h \
  + ../../include/apr_win.h ../../include/apr_lock.h \
  + ../../include/apr_time.h ../../include/apr_lib.h
   sockopt.o: sockopt.c networkio.h ../../include/apr_general.h \
  - ../../include/apr_errno.h ../../include/apr_network_io.h
  + ../../include/apr_config.h ../../include/apr_errno.h \
  + ../../include/apr_network_io.h ../../include/apr_lib.h \
  + ../../include/apr_file_io.h
  
  
  
  1.12  +1 -0  apache-2.0/src/lib/apr/network_io/beos/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockets.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff 

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

1999-10-28 Thread dreid
dreid   99/10/28 15:15:03

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
  Log:
  This gets the BeOS mpm working again.  I'm still using the poll provided
  by RSE as so far the APR poll hasn't delivered enough performance.  I'll
  fix it once I've got some other problems out of the way.
  
  Revision  ChangesPath
  1.6   +8 -12 apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mpmt_beos.c   1999/10/24 13:08:28 1.5
  +++ mpmt_beos.c   1999/10/28 22:14:54 1.6
  @@ -635,20 +635,15 @@
* Child process main loop.
*/
   
  -static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int 
csd, int my_child_num, int my_thread_num)
  +static void process_socket(ap_context_t *p, ap_socket_t *sock, int 
my_child_num, int my_thread_num)
   {
  -struct sockaddr sa_server; /*  */
  -int len = sizeof(struct sockaddr);
   BUFF *conn_io;
   conn_rec *current_conn;
   ap_iol *iol;
   long conn_id = my_child_num * HARD_THREAD_LIMIT + my_thread_num;
  +int csd;
   
  -if (getsockname(csd, &sa_server, &len) < 0) { 
  - ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
  - closesocket(csd);
  - return;
  -}
  +ap_get_os_sock(&csd, sock);
   
   sock_disable_nagle(csd);
   
  @@ -673,7 +668,8 @@
   conn_io = ap_bcreate(p, B_RDWR);
   ap_bpush_iol(conn_io, iol);
   
  -current_conn = ap_new_connection(p, server_conf, conn_io, csd, conn_id);
  +current_conn = ap_new_apr_connection(p, server_conf, conn_io, sock, 
  + conn_id);
   
   ap_process_connection(current_conn);
   }
  @@ -761,16 +757,16 @@
   ap_accept(&csd, sd, ptrans);
   SAFE_ACCEPT(accept_mutex_off(0));
   SAFE_ACCEPT(intra_mutex_off(0));
  +process_socket(ptrans, csd, process_slot,
  +   thread_slot);
  +requests_this_child--;
   }
   else {
   SAFE_ACCEPT(accept_mutex_off(0));
   SAFE_ACCEPT(intra_mutex_off(0));
   break;
   }
  -ap_get_os_sock(&thesock, csd);
  -process_socket(ptrans, &sa_client, thesock, process_slot, 
thread_slot);
   ap_clear_pool(ptrans);
  -requests_this_child--;
   }
   
   ap_destroy_pool(tpool);
  
  
  


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

1999-10-25 Thread dreid
dreid   99/10/25 06:21:16

  Modified:src/lib/apr/network_io/beos Makefile.in
  Log:
  Well having added the file guess I should really include it!
  
  Revision  ChangesPath
  1.4   +2 -1  apache-2.0/src/lib/apr/network_io/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/10/02 23:11:36 1.3
  +++ Makefile.in   1999/10/25 13:21:12 1.4
  @@ -18,7 +18,8 @@
sendrecv.o \
sockets.o \
sockopt.o \
  - inet_aton.o
  + inet_aton.o \
  + sockaddr.o
   
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
  
  
  


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

1999-10-24 Thread dreid
dreid   99/10/24 05:27:35

  Modified:src/lib/apr/network_io/beos networkio.h sockets.c sockopt.c
  Added:   src/lib/apr/network_io/beos sockaddr.c
  Log:
  Bring BeOS back into line with Ben's changes to the network API.
  
  Revision  ChangesPath
  1.7   +3 -1  apache-2.0/src/lib/apr/network_io/beos/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- networkio.h   1999/10/23 14:43:43 1.6
  +++ networkio.h   1999/10/24 12:27:33 1.7
  @@ -79,9 +79,11 @@
   struct socket_t {
   ap_context_t *cntxt;
   int socketdes;
  -struct sockaddr_in * addr;
  +struct sockaddr_in *local_addr;
  +struct sockaddr_in *remote_addr;
   int addr_len;
   int timeout;
  +int connected;
   };
   
   struct pollfd_t {
  
  
  
  1.9   +27 -49apache-2.0/src/lib/apr/network_io/beos/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockets.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- sockets.c 1999/10/15 14:20:09 1.8
  +++ sockets.c 1999/10/24 12:27:33 1.9
  @@ -83,16 +83,19 @@
   }
   
   (*new)->cntxt = cont;
  - (*new)->addr = (struct sockaddr_in *) ap_palloc((*new)->cntxt,
  + (*new)->local_addr = (struct sockaddr_in *) ap_palloc((*new)->cntxt,
sizeof (struct sockaddr_in));
  -if ((*new)->addr == NULL){
  + (*new)->remote_addr = (struct sockaddr_in *) ap_palloc((*new)->cntxt,
  + sizeof (struct sockaddr_in));
  +if ((*new)->local_addr == NULL || (*new)->remote_addr==NULL){
   return APR_ENOMEM;
   }
   
   (*new)->socketdes = socket(AF_INET ,SOCK_STREAM, 0);
  - (*new)->addr->sin_family = AF_INET; 
  -(*new)->addr_len = sizeof(*(*new)->addr);
  - memset(&(*new)->addr->sin_zero, 0, sizeof((*new)->addr->sin_zero));
  + (*new)->local_addr->sin_family = AF_INET; 
  + (*new)->remote_addr->sin_family = AF_INET; 
  +(*new)->addr_len = sizeof(*(*new)->local_addr);
  + memset(&(*new)->local_addr->sin_zero, 0, 
sizeof((*new)->local_addr->sin_zero));
   
   if ((*new)->socketdes < 0) {
   return errno;
  @@ -120,42 +123,10 @@
   return socket_cleanup(thesocket);
   }
   
  -ap_status_t ap_setport(struct socket_t *sock, ap_uint32_t port) 
  -{ 
  -sock->addr->sin_port = htons((short)port); 
  -return APR_SUCCESS; 
  -} 
  -
  -ap_status_t ap_getport(ap_uint32_t *port, struct socket_t *sock)
  -{
  -*port = ntohs(sock->addr->sin_port);
  -return APR_SUCCESS;
  -}
  -
  -ap_status_t ap_setipaddr(struct socket_t *sock, const char *addr)
  -{
  -if (!strcmp(addr, APR_ANYADDR)) {
  -sock->addr->sin_addr.s_addr = htonl(INADDR_ANY);
  -return APR_SUCCESS;
  -}
  -if (inet_aton(addr, &sock->addr->sin_addr) == 0) {
  -return errno;
  -}
  -return APR_SUCCESS;
  -}
  -
  -ap_status_t ap_getipaddr(char *addr, ap_ssize_t len,
  -  const struct socket_t *sock)
  -{
  -char *temp = inet_ntoa(sock->addr->sin_addr);
  -ap_cpystrn(addr,temp,len-1);
  -return APR_SUCCESS;
  -}
  -
   ap_status_t ap_bind(struct socket_t *sock) 
   { 
  -sock->addr->sin_addr.s_addr = INADDR_ANY;
  -if (bind(sock->socketdes, (struct sockaddr *)sock->addr, sock->addr_len) 
== -1) 
  +sock->local_addr->sin_addr.s_addr = INADDR_ANY;
  +if (bind(sock->socketdes, (struct sockaddr *)sock->local_addr, 
sock->addr_len) == -1) 
   return errno; 
   else 
   return APR_SUCCESS; 
  @@ -175,11 +146,14 @@
sizeof(ap_socket_t)); 
   
   (*new)->cntxt = sock->cntxt;
  -(*new)->addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
  +(*new)->local_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
  + sizeof(struct sockaddr_in));
  +(*new)->remote_addr = (struct sockaddr_in *)ap_palloc((*new)->cntxt, 
sizeof(struct sockaddr_in));
   (*new)->addr_len = sizeof(struct sockaddr_in);
  -
  -(*new)->socketdes = accept(sock->socketdes, (struct sockaddr 
*)(*new)->addr,
  +(*new)->connected = 1;
  +
  +(*new)->socketdes = accept(sock->socketdes, (struct sockaddr 
*)(*new)->local_addr,
   &(*new)->addr_len);
   
if ((*new)->socketdes <0){
  @@ -196,21 +170,25 @@
   struct hostent *hp; 
   
   hp = gethostbyname(host

cvs commit: apache-2.0/src/lib/apr/network_io/beos networkio.h

1999-10-23 Thread dreid
dreid   99/10/23 07:43:44

  Modified:src/lib/apr/network_io/beos networkio.h
  Log:
  This small addition needs altered yet again.  This time hopefully it'll
  be totally correct.
  
  Revision  ChangesPath
  1.6   +1 -1  apache-2.0/src/lib/apr/network_io/beos/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- networkio.h   1999/10/22 11:26:54 1.5
  +++ networkio.h   1999/10/23 14:43:43 1.6
  @@ -62,7 +62,7 @@
   /* The definition of isascii was missed from the PowerPC ctype.h
*
* It will be included in the next release, but until then... */
  -#if __POWER_PC__
  +#if __POWERPC__
   #define isascii(c) (((c) & ~0x7f)==0)
   #endif
   
  
  
  


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

1999-10-22 Thread dreid
dreid   99/10/22 15:30:45

  Modified:src/lib/apr/include apr_portable.h
   src/lib/apr/threadproc/beos threadproc.h
  Log:
  The rest of the changes for BeOS the process change I made tonight.
  
  This will break some things but I'll fix them in the coming days.
  
  Revision  ChangesPath
  1.11  +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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr_portable.h1999/10/21 16:43:10 1.10
  +++ apr_portable.h1999/10/22 22:30:41 1.11
  @@ -132,7 +132,7 @@
   typedef int   ap_os_sock_t;
   typedef struct os_lock_t  ap_os_lock_t;
   typedef thread_id ap_os_thread_t;
  -typedef pid_t ap_os_proc_t;
  +typedef thread_id ap_os_proc_t;
   typedef int   ap_os_threadkey_t;
   typedef struct timevalap_os_time_t;
   
  
  
  
  1.4   +1 -0  apache-2.0/src/lib/apr/threadproc/beos/threadproc.h
  
  Index: threadproc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/threadproc.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- threadproc.h  1999/09/10 14:00:47 1.3
  +++ threadproc.h  1999/10/22 22:30:44 1.4
  @@ -118,6 +118,7 @@
   struct proc_t {
   ap_context_t *cntxt;
   pid_t pid;
  +thread_id tid;
   struct procattr_t *attr;
   };
   
  
  
  


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

1999-10-22 Thread dreid
dreid   99/10/22 15:06:17

  Modified:src/lib/apr/threadproc/beos apr_proc_stub.c proc.c
  Log:
  Fiz a small problem with the thread_id not being returned by correctly
  by ap_get_os_proc.
  
  Revision  ChangesPath
  1.3   +2 -2  apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c
  
  Index: apr_proc_stub.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- apr_proc_stub.c   1999/10/10 17:25:31 1.2
  +++ apr_proc_stub.c   1999/10/22 22:06:16 1.3
  @@ -32,7 +32,7 @@
size_t readbuf = 100;

readbuffer = (char*)malloc(sizeof(char) * readbuf);
  - *newargs = (char*)malloc(sizeof(char) * (argc - 1));
  + newargs = (char**)malloc(sizeof(char*) * (argc - 1));
 
buffer = (void*)malloc(sizeof(struct pipefd));
/* this will block until we get the data */
  @@ -64,7 +64,7 @@
   
if (directory != NULL)
chdir(directory);
  - execve (progname, newargs, pfd->envp);
  + execve (progname, newargs, NULL);
   
return (-1);
   }
  
  
  
  1.8   +3 -4  apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- proc.c1999/10/13 21:35:39 1.7
  +++ proc.c1999/10/22 22:06:16 1.8
  @@ -224,8 +224,7 @@
   }
   resume_thread(newproc);
   send_data(newproc, 0, (void*)sp, sizeof(struct send_pipe));
  -
  -(*new)->pid = newproc;
  +(*new)->tid = newproc;
   
   /* before we go charging on we need the new process to get to a 
* certain point.  When it gets there it'll let us know and we
  @@ -328,7 +327,7 @@
   if (proc == NULL) {
   return APR_ENOPROC;
   }
  -theproc = &(proc->pid);
  +*theproc = proc->tid;
   return APR_SUCCESS;
   }
   
  @@ -342,7 +341,7 @@
   (*proc) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t));
   (*proc)->cntxt = cont;
   }
  -(*proc)->pid = *theproc;
  +(*proc)->tid = *theproc;
   return APR_SUCCESS;
   }  
   
  
  
  


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

1999-10-22 Thread dreid
dreid   99/10/22 04:28:34

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
  Log:
  Bring the BeOS mpm up to date with the error logging changes.
  
  Revision  ChangesPath
  1.4   +42 -37apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mpmt_beos.c   1999/10/13 22:37:19 1.3
  +++ mpmt_beos.c   1999/10/22 11:28:33 1.4
  @@ -344,14 +344,14 @@
case 7: /* 1.4sec */
/* ok, now it's being annoying */
ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_WARNING,
  - server_conf,
  + errno, server_conf,
   "child process %d still did not exit, sending a SIGTERM",
pid);
kill(pid, SIGTERM);
break;
case 8: /*  6 sec */
/* die child scum */
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, errno, 
server_conf,
   "child process %d still did not exit, sending a SIGKILL",
pid);
kill(pid, SIGKILL);
  @@ -362,7 +362,7 @@
 * exited, we will likely fail to bind to the port
 * after the restart.
 */
  - ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, server_conf,
  + ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, errno, 
server_conf,
"could not make child process %d exit, "
"attempting to continue anyway", pid);
break;
  @@ -526,33 +526,33 @@
sa.sa_handler = sig_coredump;
   
if (sigaction(SIGSEGV, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGSEGV)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGSEGV)");
if (sigaction(SIGBUS, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGBUS)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGBUS)");
if (sigaction(SIGABRT, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGABRT)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGABRT)");
if (sigaction(SIGILL, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGILL)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGILL)");
sa.sa_flags = 0;
   }
   sa.sa_handler = sig_term;
   if (sigaction(SIGTERM, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGTERM)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGTERM)");
   if (sigaction(SIGINT, &sa, NULL) < 0)
  -ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGINT)");
  +ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGINT)");
   
   sa.sa_handler = SIG_IGN;
   if (sigaction(SIGPIPE, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGPIPE)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGPIPE)");
   
   /* we want to ignore HUPs and WINCH while we're busy processing one */
   sigaddset(&sa.sa_mask, SIGHUP);
   sigaddset(&sa.sa_mask, SIGWINCH);
   sa.sa_handler = restart;
   if (sigaction(SIGHUP, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGHUP)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGHUP)");
   if (sigaction(SIGWINCH, &sa, NULL) < 0)
  - ap_log_error(APLOG_MARK, APLOG_WARNING, server_conf, 
"sigaction(SIGWINCH)");
  + ap_log_error(APLOG_MARK, APLOG_WARNING, errno, server_conf, 
"sigaction(SIGWINCH)");
   }
   
   static void process_child_status(int pid, ap_wait_t status)
  @@ -562,7 +562,7 @@
*/
   if ((WIFEXITED(status)) &&
WEXITSTATUS(status) == APEXIT_CHILDFATAL) {
  - ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, server_conf,
  + ap_log_error(APLOG_MARK, APLOG_ALERT|APLOG_NOERRNO, errno, server_conf,
   

cvs commit: apache-2.0/src/lib/apr/network_io/beos networkio.h

1999-10-22 Thread dreid
dreid   99/10/22 04:26:55

  Modified:src/lib/apr/network_io/beos networkio.h
  Log:
  Correct a small typo that Roy pointed out.
  
  Revision  ChangesPath
  1.5   +1 -1  apache-2.0/src/lib/apr/network_io/beos/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- networkio.h   1999/10/22 09:27:57 1.4
  +++ networkio.h   1999/10/22 11:26:54 1.5
  @@ -63,7 +63,7 @@
*
* It will be included in the next release, but until then... */
   #if __POWER_PC__
  -#define iasascii(c) (((c) & ~0x7f)==0)
  +#define isascii(c) (((c) & ~0x7f)==0)
   #endif
   
   #include "apr_general.h"
  
  
  


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

1999-10-22 Thread dreid
dreid   99/10/22 04:25:42

  Modified:src/os/beos beosd.c iol_socket.c
  Log:
  This brings BeOS back up to date with the recent changes.
  
  Revision  ChangesPath
  1.4   +4 -4  apache-2.0/src/os/beos/beosd.c
  
  Index: beosd.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/beosd.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- beosd.c   1999/09/07 22:30:59 1.3
  +++ beosd.c   1999/10/22 11:25:41 1.4
  @@ -131,7 +131,7 @@
uid_t uid = atoi(&beosd_config.user_name[1]);
   
if ((ent = getpwuid(uid)) == NULL) {
  - ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  + ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
 "getpwuid: couldn't determine user name from uid %u, "
 "you probably need to modify the User directive",
 (unsigned)uid);
  @@ -144,7 +144,7 @@
name = beosd_config.user_name;
   
if (setgid(beosd_config.group_id) == -1) {
  - ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  + ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
"setgid: unable to set group id to Group %u",
(unsigned)beosd_config.group_id);
return -1;
  @@ -153,7 +153,7 @@
/* Reset `groups' attributes. */
   
if (initgroups(name, beosd_config.group_id) == -1) {
  - ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  + ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
"initgroups: unable to set groups for User %s "
"and Group %u", name, (unsigned)beosd_config.group_id);
return -1;
  @@ -172,7 +172,7 @@
   /* Only try to switch if we're running as root */
   if (!geteuid() && (
setuid(beosd_config.user_id) == -1)) {
  - ap_log_error(APLOG_MARK, APLOG_ALERT, NULL,
  + ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL,
"setuid: unable to change uid");
return -1;
   }
  
  
  
  1.2   +55 -36apache-2.0/src/os/beos/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/beos/iol_socket.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- iol_socket.c  1999/07/12 22:51:14 1.1
  +++ iol_socket.c  1999/10/22 11:25:42 1.2
  @@ -58,6 +58,7 @@
   
   #include "httpd.h"
   #include "ap_iol.h"
  +#include "iol_socket.h"
   
   #include 
   #include 
  @@ -72,7 +73,8 @@
   int timeout;
   } iol_socket;
   
  -static int beos_setopt(ap_iol *viol, ap_iol_option opt, const void *value)
  +static ap_status_t beos_setopt(ap_iol *viol, ap_iol_option opt,
  +   const void *value)
   {
   iol_socket *iol = (iol_socket *)viol;
   
  @@ -81,13 +83,12 @@
iol->timeout = *(const int *)value;
break;
   default:
  - errno = EINVAL;
  - return -1;
  + return APR_EINVAL;
   }
  -return 0;
  +return APR_SUCCESS;
   }
   
  -static int beos_getopt(ap_iol *viol, ap_iol_option opt, void *value)
  +static ap_status_t beos_getopt(ap_iol *viol, ap_iol_option opt, void *value)
   {
   iol_socket *iol = (iol_socket *)viol;
   
  @@ -96,16 +97,20 @@
*(int *)value = iol->timeout;
break;
   default:
  - errno = EINVAL;
  - return -1;
  + return APR_EINVAL;
   }
  -return 0;
  +return APR_SUCCESS;
   }
   
  -static int set_nonblock(int fd)
  +static ap_status_t set_nonblock(int fd)
   {
   int on = 1;
  -return setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(on));
  +int rv;
  +rv = setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int));
  +
  +if (rv == 0)
  +return APR_SUCCESS;
  +return errno;
   }
   
   /* the timeout code is a separate routine because it requires
  @@ -115,7 +120,7 @@
   /* this macro expands into the four basic i/o methods */
   
   #define method(name, args, syscall, selread, selwrite)   \
  -static int beos_##name##_timeout args \
  +static ap_status_t beos_##name##_timeout args \
   { \
iol_socket *iol = (iol_socket *)viol; \
fd_set fdset; \
  @@ -130,27 +135,38 @@
rv = select(iol->fd + 1, selread, selwrite, NULL, iol->timeout < 0 
? NULL : &tv); \
} while (rv == -1 && errno == EINTR); \
if (!FD_ISSET(iol->fd, &fdset)) { \
  - errno = ETIMEDOUT; \
  - return -1; \
  + return APR_ETIMEDOUT; \
} \
do { \
rv = syscall(iol->fd, arg1, arg2, 0); \
} while (rv == -1 && e

cvs commit: apache-2.0/src/lib/apr/network_io/beos networkio.h

1999-10-22 Thread dreid
dreid   99/10/22 02:28:01

  Modified:src/lib/apr/network_io/beos networkio.h
  Log:
  This small addition is needed to allow APR to build on PowerPC.
  
  Submitted by: Matt Zahorik
  Reviewed by:  David Reid
  
  Revision  ChangesPath
  1.4   +8 -0  apache-2.0/src/lib/apr/network_io/beos/networkio.h
  
  Index: networkio.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/networkio.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- networkio.h   1999/10/08 21:27:37 1.3
  +++ networkio.h   1999/10/22 09:27:57 1.4
  @@ -58,6 +58,14 @@
   
   #include 
   #include 
  +
  +/* The definition of isascii was missed from the PowerPC ctype.h
  + *
  + * It will be included in the next release, but until then... */
  +#if __POWER_PC__
  +#define iasascii(c) (((c) & ~0x7f)==0)
  +#endif
  +
   #include "apr_general.h"
   #include  /* for the ntohs definition */
   
  
  
  


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

1999-10-21 Thread dreid
dreid   99/10/21 14:13:50

  Modified:src/lib/apr configure.in
   src/lib/apr/mmap/beos Makefile.in mmap.c
   src/lib/apr/mmap/unix Makefile.in mmap.c
   src/lib/apr/test testmmap.c
  Log:
  This set of changes adds the function ap_mmap_open_create which allows
  an ap_file_t to be mmap'd.  This was requested and so here it is.  Test
  program has been updated to test this.  Also mmap has now been added to
  the module list in configure.in so it will now be built.
  
  Submitted by: david reid
  
  Revision  ChangesPath
  1.22  +1 -1  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- configure.in  1999/10/19 19:21:01 1.21
  +++ configure.in  1999/10/21 21:13:15 1.22
  @@ -4,7 +4,7 @@
   
   # These added to allow default directories to be used...
   DEFAULT_OSDIR="unix"
  -MODULES="file_io network_io threadproc misc signal locks time" 
  +MODULES="file_io network_io threadproc misc signal locks time mmap" 
   
   echo "Configuring APR library"
   echo "Platform: ${OS}"
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/mmap/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/Makefile.in,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.in   1999/10/20 20:22:02 1.1
  +++ Makefile.in   1999/10/21 21:13:24 1.2
  @@ -10,7 +10,7 @@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ $(LIBS)
   INCDIR=../../inc
  -INCDIR1=../../include
  +INCDIR1=../../include -I../../file_io/unix
   INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
   
   LIB=libmmap.a
  
  
  
  1.2   +66 -20apache-2.0/src/lib/apr/mmap/beos/mmap.c
  
  Index: mmap.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/beos/mmap.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mmap.c1999/10/20 20:22:02 1.1
  +++ mmap.c1999/10/21 21:13:26 1.2
  @@ -58,6 +58,7 @@
   #include "apr_general.h"
   #include "apr_portable.h"
   #include "apr_lib.h"
  +#include "fileio.h"
   #include 
   #include 
   #include 
  @@ -82,17 +83,11 @@
ap_context_t *cont)
   {
   struct stat st;
  -int fd;
  +int fd = -1;
   void *mm;
  -struct mmap_t *next;
  -area_id aid;
  -char *areaname;
  -uint32 size;
  -int len;   
  -
  -/* We really should check to see that we haven't already mmap'd
  - * this file before.  Cycling the linked list will allow this.
  - */
  +area_id aid = -1;
  +char *areaname = "apr_mmap\0";
  +uint32 size = 0;
   
   (*new) = (struct mmap_t *)ap_palloc(cont, sizeof(struct mmap_t));
   
  @@ -109,16 +104,10 @@
   if ((fd = open(fname, O_RDONLY, 0)) == -1) {
   return APR_EBADF;
   }
  -
  -/* generate a unique name for this area */
  -len = strlen(fname) > 22 ? 22 : strlen(fname);
  -areaname = malloc(sizeof(char) * 32);
  -strncpy(areaname, "beos_mmap:\0", 11);
  -strncat(areaname, fname + (strlen(fname)-len), len);
  -
  -aid = create_area(areaname, mm, B_ANY_ADDRESS, size * B_PAGE_SIZE, 
  +  
  +aid = create_area(areaname, &mm , B_ANY_ADDRESS, size * B_PAGE_SIZE, 
   B_FULL_LOCK, B_READ_AREA|B_WRITE_AREA);
  -free(areaname);
  +
   if (aid >= B_NO_ERROR)
   read(fd, mm, st.st_size);
   
  @@ -142,10 +131,67 @@
   return APR_SUCCESS;
   }
   
  +ap_status_t ap_mmap_open_create(struct mmap_t **new, ap_file_t *file, 
  +   ap_context_t *cont)
  +{
  +void *mm;
  +area_id aid = -1;
  +char *areaname = "apr_mmap\0";
  +uint32 size;   
  +
  +if (file->buffered)
  +/* we don't yet mmap buffered files... */
  +return APR_EBADF;
  +if (file->filedes == -1)
  +/* there isn't a file handle so how can we mmap?? */
  +return APR_EBADF;
  +(*new) = (struct mmap_t*)ap_palloc(file->cntxt, sizeof(struct mmap_t));
  +
  +if (!file->stated) {
  +/* h... we need to stat the file now */
  +struct stat st;
  +if (stat(file->fname, &st) == -1) {
  +/* hmm, is this fatal?? */
  +return APR_EBADF;
  +}
  +file->stated = 1;
  +file->size = st.st_size;
  +file->atime = st.st_atime;
  +file->mtime = st.st_mtime;
  +file->ctime = st.st_ctime;
  +(

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

1999-10-21 Thread dreid
dreid   99/10/21 13:36:46

  Added:   src/lib/apr/include apr_mmap.h
  Log:
  OK, here is the file I missed form the mmap commit last night.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/lib/apr/include/apr_mmap.h
  
  Index: apr_mmap.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_MMAP_H
  #define APR_MMAP_H
  
  #include "apr_general.h"
  #include "apr_errno.h"
  #include "apr_network_io.h"
  #include "apr_portable.h"
  
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */
  
  
  typedef struct mmap_tap_mmap_t;
  
  /*   Function definitions */
  ap_status_t ap_mmap_create(ap_mmap_t **, const char *, ap_context_t *);
  ap_status_t ap_mmap_open_create(ap_mmap_t **, ap_file_t *, ap_context_t *);
  ap_status_t ap_mmap_delete(ap_mmap_t *);
  
  ap_status_t ap_read_mmap(char *, ap_ssize_t *, ap_ssize_t *, 
  ap_ssize_t *, ap_mmap_t *, ap_context_t *);
  ap_status_t ap_send_mmap(ap_socket_t *, ap_ssize_t *, ap_ssize_t *, 
  ap_mmap_t *, ap_context_t *);
  
  ap_status_t ap_first_mmap(struct mmap_t *, ap_context_t *);
  ap_status_t ap_next_mmap(struct mmap_t *, struct mmap_t *, ap_context_t *);
  
  #ifdef __cplusplus
  }
  #endif
  
  #endif  /* ! APR_MMAP_H */
  
  
  
  
  


cvs commit: apache-2.0/src/support logresolve.c

1999-10-20 Thread dreid
dreid   99/10/20 16:11:49

  Modified:src/support logresolve.c
  Log:
  Missed this one when I was making the support programs compile on
  BeOS.  All should now compile on "vanilla" BeOS.
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/src/support/logresolve.c
  
  Index: logresolve.c
  ===
  RCS file: /home/cvs/apache-2.0/src/support/logresolve.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- logresolve.c  1999/10/11 20:25:08 1.3
  +++ logresolve.c  1999/10/20 23:11:48 1.4
  @@ -44,7 +44,7 @@
   
   #include 
   
  -#ifndef MPE
  +#if !defined(MPE) && !defined(BEOS) 
   #include 
   #endif
   
  
  
  


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

1999-10-20 Thread dreid
dreid   99/10/20 13:24:08

  Modified:src/lib/apr/test Makefile.in
  Added:   src/lib/apr/test testmmap.c
  Log:
  Submitted by:by:
  This is a test program for the mmap file support.  Doesn't do much
  but at least it checks I've not gone mad.
  
  Revision  ChangesPath
  1.7   +8 -3  apache-2.0/src/lib/apr/test/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/test/Makefile.in,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.in   1999/10/14 03:00:34 1.6
  +++ Makefile.in   1999/10/20 20:24:06 1.7
  @@ -8,7 +8,7 @@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@
   [EMAIL PROTECTED]@ @OPTIM@ 
  -LIBS=-L../libs -lnetwork -lthreadproc -lfile -lmisc -lapr -ltime -llock 
-lsig @LIBS@ 
  +LIBS=-L../libs -lnetwork -lthreadproc -lfile -lmisc -lapr -ltime -llock 
-lsig -lmmap @LIBS@ 
   [EMAIL PROTECTED]@ $(LIBS)
   INCDIR=../include
   INCDIR1=../../inc
  @@ -23,7 +23,8 @@
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
[EMAIL PROTECTED]@ \
  - [EMAIL PROTECTED]@ 
  + [EMAIL PROTECTED]@ \
  + [EMAIL PROTECTED]@
   
   OBJS= testfile.o \
testproc.o \
  @@ -34,7 +35,8 @@
   testargs.o \
   testcontext.o \
ab_apr.o \
  - htdigest.o
  + htdigest.o \
  + testmmap.o
   
   .c.o:
$(CC) -c $(CFLAGS) $(INCLUDES) $<
  @@ -72,6 +74,9 @@
   
   [EMAIL PROTECTED]@: testsig.o
$(CC) $(CFLAGS) testsig.o -o [EMAIL PROTECTED]@ $(LDFLAGS) 
  +
  [EMAIL PROTECTED]@: testmmap.o
  + $(CC) $(CFLAGS) testmmap.o -o [EMAIL PROTECTED]@ $(LDFLAGS)
   
   clean:
$(RM) -f *.o *.a *.so $(TARGETS)
  
  
  
  1.1  apache-2.0/src/lib/apr/test/testmmap.c
  
  Index: testmmap.c
  ===
  /* 
   * 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/>.
   *
   */
  #include 
  #include 
  #include "apr_mmap.h"
  #include "apr_errno.h"
  #include "apr_general.h"
  #include "apr_lib.h"
  

cvs commit: apache-2.0/src/lib/apr/mmap/unix Makefile.in mmap.c mmap_h.h

1999-10-20 Thread dreid
dreid   99/10/20 13:22:05

  Added:   src/lib/apr/mmap/beos Makefile.in mmap.c mmap_h.h
   src/lib/apr/mmap/unix Makefile.in mmap.c mmap_h.h
  Log:
  The beginning of mmap support for APR.  Still early days but what's here
  has been tested and seems to work.  Next is the ability to read/send an
  mmap'd file.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/lib/apr/mmap/beos/Makefile.in
  
  Index: Makefile.in
  ===
  #CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
  #LIBS=$(EXTRA_LIBS) $(LIBS1)
  #INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
  #LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
  
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@ @OPTIM@
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@ $(LIBS)
  INCDIR=../../inc
  INCDIR1=../../include
  INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I.
  
  LIB=libmmap.a
  
  OBJS=mmap.o
  
  .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<
  
  all: $(LIB)
  
  clean:
$(RM) -f *.o *.a *.so
  
  distclean: clean
-$(RM) -f Makefile
  
  $(OBJS): Makefile
  
  $(LIB): $(OBJS)
$(RM) -f $@
$(AR) cr $@ $(OBJS)
$(RANLIB) $@
  
  #
  # We really don't expect end users to use this rule.  It works only with
  # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  # using it.
  #
  depend:
cp Makefile.in Makefile.in.bak \
&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
&& gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
&& sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
   -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
> Makefile.in \
&& rm Makefile.new
  
  # DO NOT REMOVE
  
  
  
  1.1  apache-2.0/src/lib/apr/mmap/beos/mmap.c
  
  Index: mmap.c
  ===
  /* 
   * 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/>.
   *
   */
  
  #include "mmap_h.h"
  #include "apr_mmap.h"

cvs commit: apache-2.0/src/lib/apr/mmap/beos - New directory

1999-10-20 Thread dreid
dreid   99/10/20 13:19:46

  apache-2.0/src/lib/apr/mmap/beos - New directory


cvs commit: apache-2.0/src/lib/apr/mmap/unix - New directory

1999-10-20 Thread dreid
dreid   99/10/20 13:19:06

  apache-2.0/src/lib/apr/mmap/unix - New directory


cvs commit: apache-2.0/src/lib/apr/mmap - New directory

1999-10-20 Thread dreid
dreid   99/10/20 13:18:41

  apache-2.0/src/lib/apr/mmap - New directory


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

1999-10-16 Thread dreid
dreid   99/10/16 05:52:09

  Modified:src/lib/apr/time/unix time.c
  Log:
  This corrects a small problem with the safety locks.  Always helps
  to lock and unlock the same lock!
  
  Revision  ChangesPath
  1.9   +2 -2  apache-2.0/src/lib/apr/time/unix/time.c
  
  Index: time.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- time.c1999/10/14 18:14:38 1.8
  +++ time.c1999/10/16 12:52:07 1.9
  @@ -115,13 +115,13 @@
   case APR_LOCALTIME: {
   SAFETY_LOCK(time, "timefile");
   LOCALTIME_R(&atime->currtime->tv_sec, atime->explodedtime);
  -SAFETY_UNLOCK(localtime);
  +SAFETY_UNLOCK(time);
   break;
   }
   case APR_UTCTIME: {
   SAFETY_LOCK(time, "timefile");
   GMTIME_R(&atime->currtime->tv_sec, atime->explodedtime);
  -SAFETY_UNLOCK(gmtime);
  +SAFETY_UNLOCK(time);
   break;
   }
   }
  
  
  


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

1999-10-16 Thread dreid
dreid   99/10/16 05:48:00

  Modified:src/lib/apr/inc apr_macro.h
  Log:
  This fixes a small problem with the macro due to the line length.
  
  Revision  ChangesPath
  1.2   +2 -2  apache-2.0/src/lib/apr/inc/apr_macro.h
  
  Index: apr_macro.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/inc/apr_macro.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_macro.h   1999/10/14 17:38:57 1.1
  +++ apr_macro.h   1999/10/16 12:47:59 1.2
  @@ -66,8 +66,8 @@
   #define SAFETY_LOCK(func_name, name_str) \
   { \
   if (lock_##func_name == NULL) \
  -if (ap_create_lock(&lock_##func_name, APR_MUTEX, APR_INTRAPROCESS, 
name_
  -str, NULL) != APR_SUCCESS) \
  +if (ap_create_lock(&lock_##func_name, APR_MUTEX, APR_INTRAPROCESS, \
  +name_str, NULL) != APR_SUCCESS) \
   return APR_NOTTHREADSAFE; \
   if (ap_lock(lock_##func_name) != APR_SUCCESS) \
   return APR_NOTTHREADSAFE; \
  
  
  


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

1999-10-14 Thread dreid
dreid   99/10/14 13:53:29

  Modified:src/lib/apr/locks/beos locks.c
  Log:
  Remove some early debugging code that stops the server running.
  
  Revision  ChangesPath
  1.5   +0 -4  apache-2.0/src/lib/apr/locks/beos/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- locks.c   1999/10/08 18:53:22 1.4
  +++ locks.c   1999/10/14 20:53:28 1.5
  @@ -72,10 +72,6 @@
   }
   
   new->cntxt = cont;
  -if (new->cntxt == NULL){
  -printf ("null pool\n");
  -return APR_ENOMEM;
  -}
   new->type = type;
   new->fname = strdup(fname);
   
  
  
  


cvs commit: apache-2.0/src/lib/apr/locks/beos crossproc.c intraproc.c

1999-10-13 Thread dreid
dreid   99/10/13 15:49:53

  Modified:src/lib/apr/locks/beos crossproc.c intraproc.c
  Log:
  Remove some silly typo's, some naughty tabs that crept in and generally
  tidy up.  Also start adding in ap_null_cleanup in line with recent
  changes.
  
  There is so little difference between intra and inter proc in these
  implementations, and I'm not sure that BeOS will ever need different
  versions due to the way it works.  I'll give it some thought but might
  rationalise these into a single set of routines.
  
  Revision  ChangesPath
  1.3   +9 -7  apache-2.0/src/lib/apr/locks/beos/crossproc.c
  
  Index: crossproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/crossproc.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- crossproc.c   1999/10/12 06:14:44 1.2
  +++ crossproc.c   1999/10/13 22:49:51 1.3
  @@ -55,10 +55,12 @@
   
   #include "apr_lock.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   #include "locks.h"
   
  -ap_status_t lock_inter_cleanup(ap_lock_t *lock)
  +ap_status_t lock_inter_cleanup(void * data)
   {
  +ap_lock_t *lock = (ap_lock_t*)data;
   if (lock->curr_locked == 1) {
if (atomic_add(&lock->ben_interproc , -1) > 1){
release_sem (lock->sem_interproc);
  @@ -71,14 +73,14 @@
   {
   new->sem_interproc = (sem_id)ap_palloc(new->cntxt, sizeof(sem_id));
   new->ben_interproc = (int32)ap_palloc(new->cntxt, sizeof(int32));
  -
  +
   new->ben_interproc = 0;
  -new->sem_interproc = create_sem(0, "ap_intraproc");
  +new->sem_interproc = create_sem(0, "ap_interproc");
   if (new->sem_interproc < B_NO_ERROR){
lock_inter_cleanup(new);
   return errno;
   }
  -new->curr_locked == 0;
  +new->curr_locked = 0;
   ap_register_cleanup(new->cntxt, (void *)new, lock_inter_cleanup,
   ap_null_cleanup);
   return APR_SUCCESS;
  @@ -91,18 +93,18 @@
} else {
return errno;
}
  -lock->curr_locked == 1;
  +lock->curr_locked = 1;
   return APR_SUCCESS;
   }
   
   ap_status_t unlock_inter(ap_lock_t *lock)
   {
if (atomic_add(&lock->ben_interproc, -1) > 1){
  - release_sem(lock->sem_interproc);
  +release_sem(lock->sem_interproc);
  +lock->curr_locked = 0;
   } else {
return errno;
   }
  -lock->curr_locked == 0;
   return APR_SUCCESS;
   }
   
  
  
  
  1.3   +12 -13apache-2.0/src/lib/apr/locks/beos/intraproc.c
  
  Index: intraproc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/intraproc.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- intraproc.c   1999/10/12 06:14:44 1.2
  +++ intraproc.c   1999/10/13 22:49:52 1.3
  @@ -56,12 +56,11 @@
   #include "apr_lock.h"
   #include "apr_general.h"
   #include "locks.h"
  -#include 
  -#include 
  +#include "apr_lib.h"
   
  -ap_status_t lock_intra_cleanup(ap_lock_t *lock)
  +ap_status_t lock_intra_cleanup(void *data)
   {
  -printf ("lock_intra_cleanup\n");
  +ap_lock_t *lock = (ap_lock_t *)data;
   if (lock->curr_locked == 1) {
if (atomic_add(&lock->ben_intraproc , -1) > 1){
release_sem (lock->sem_intraproc);
  @@ -85,7 +84,7 @@
   return stat;
   }
   new->sem_intraproc = stat;
  -new->curr_locked == 0;
  +new->curr_locked = 0;
   ap_register_cleanup(new->cntxt, (void *)new, lock_intra_cleanup,
   ap_null_cleanup);
   return APR_SUCCESS;
  @@ -93,22 +92,22 @@
   
   ap_status_t lock_intra(ap_lock_t *lock)
   {
  -lock->curr_locked == 1;
  - if (atomic_add (&lock->ben_intraproc, 1) >0){
  - if (acquire_sem(lock->sem_intraproc) != B_NO_ERROR){
  - atomic_add(&lock->ben_intraproc,-1);
  +lock->curr_locked = 1;
  +if (atomic_add (&lock->ben_intraproc, 1) >0){
  +if (acquire_sem(lock->sem_intraproc) != B_NO_ERROR){
  +atomic_add(&lock->ben_intraproc,-1);
return errno;
  - }
  +}
   }
   return APR_SUCCESS;
   }
   
   ap_status_t unlock_intra(ap_lock_t *lock)
   {
  - if (atomic_add(&lock->ben_intraproc, -1) > 1){
  - release_sem(lock->sem_intraproc);
  +if (atomic_add(&lock->ben_intraproc, -1) > 1){
  +release_sem(lock->sem_intraproc);
  +lock->curr_locked = 0;
   }
  -lock->curr_locked == 0;
   return APR_SUCCESS;
   }
   
  
  
  


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

1999-10-13 Thread dreid
dreid   99/10/13 15:37:20

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
  Log:
  This correct mpmt_beos for the recent changes of argument ordering for
  ap_get_os_sock.
  
  Revision  ChangesPath
  1.3   +2 -2  apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mpmt_beos.c   1999/10/09 20:27:25 1.2
  +++ mpmt_beos.c   1999/10/13 22:37:19 1.3
  @@ -770,7 +770,7 @@
   SAFE_ACCEPT(intra_mutex_off(0));
   break;
   }
  -ap_get_os_sock(csd, &thesock);
  +ap_get_os_sock(&thesock, csd);
   process_socket(ptrans, &sa_client, thesock, process_slot, 
thread_slot);
   ap_clear_pool(ptrans);
   requests_this_child--;
  @@ -831,7 +831,7 @@
   /* Set up the pollfd array */
   listenfds = ap_palloc(pchild, sizeof(struct pollfd) * (num_listenfds));
   for (lr = ap_listeners, i = 0; i < num_listenfds; lr = lr->next, ++i) {
  -ap_get_os_sock(lr->sd, &listenfds[i].fd);
  +ap_get_os_sock(&listenfds[i].fd , lr->sd);
   listenfds[i].events = POLLIN; /* should we add POLLPRI ?*/
   listenfds[i].revents = 0;
   }
  
  
  


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

1999-10-13 Thread dreid
dreid   99/10/13 14:35:40

  Modified:src/lib/apr/threadproc/beos proc.c
  Log:
  Add the process routines that BeOS was missing.  Also bring BeOS
  back into line with the most recent changes.
  
  Revision  ChangesPath
  1.7   +72 -2 apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- proc.c1999/10/11 17:52:05 1.6
  +++ proc.c1999/10/13 21:35:39 1.7
  @@ -61,6 +61,7 @@
   #include "apr_thread_proc.h"
   #include "apr_file_io.h"
   #include "apr_general.h"
  +#include "apr_portable.h"
   
   struct send_pipe {
int in;
  @@ -115,7 +116,7 @@
   }
   
   ap_status_t ap_setprocattr_dir(struct procattr_t *attr, 
  - char *dir) 
  + const char *dir) 
   {
   char * cwd;
   if (strncmp("/",dir,1) != 0 ) {
  @@ -166,7 +167,7 @@
   }
   
   
  -ap_status_t ap_create_process(struct proc_t **new, char *progname, 
  +ap_status_t ap_create_process(struct proc_t **new, const char *progname, 
 char *const args[], char **env, 
 struct procattr_t *attr, ap_context_t *cont)
   {
  @@ -276,3 +277,72 @@
   }
   return errno;
   } 
  +
  +ap_status_t ap_setprocattr_childin(struct procattr_t *attr, ap_file_t 
*child_in,
  +   ap_file_t *parent_in)
  +{
  +if (attr->child_in == NULL && attr->parent_in == NULL)
  +ap_create_pipe(&attr->child_in, &attr->parent_in, attr->cntxt);
  +
  +if (child_in != NULL)
  +ap_dupfile(&attr->child_in, child_in);
  +
  +if (parent_in != NULL)
  +ap_dupfile(&attr->parent_in, parent_in);
  +
  +return APR_SUCCESS;
  +}
  +
  +ap_status_t ap_setprocattr_childout(struct procattr_t *attr, ap_file_t 
*child_out,
  +ap_file_t *parent_out)
  +{
  +if (attr->child_out == NULL && attr->parent_out == NULL)
  +ap_create_pipe(&attr->child_out, &attr->parent_out, attr->cntxt);
  +
  +if (child_out != NULL)
  +ap_dupfile(&attr->child_out, child_out);
  +
  +if (parent_out != NULL)
  +ap_dupfile(&attr->parent_out, parent_out);
  +
  +return APR_SUCCESS;
  +}
  +
  +ap_status_t ap_setprocattr_childerr(struct procattr_t *attr, ap_file_t 
*child_err,
  +   ap_file_t *parent_err)
  +{
  +if (attr->child_err == NULL && attr->parent_err == NULL)
  +ap_create_pipe(&attr->child_err, &attr->parent_err, attr->cntxt);
  +
  +if (child_err != NULL)
  +ap_dupfile(&attr->child_err, child_err);
  +
  +if (parent_err != NULL)
  +ap_dupfile(&attr->parent_err, parent_err);
  +
  +return APR_SUCCESS;
  +}
  +
  +ap_status_t ap_get_os_proc(ap_os_proc_t *theproc, ap_proc_t *proc)
  +{
  +if (proc == NULL) {
  +return APR_ENOPROC;
  +}
  +theproc = &(proc->pid);
  +return APR_SUCCESS;
  +}
  +
  +ap_status_t ap_put_os_proc(struct proc_t **proc, ap_os_proc_t *theproc, 
  +   ap_context_t *cont)
  +{
  +if (cont == NULL) {
  +return APR_ENOCONT;
  +}
  +if ((*proc) == NULL) {
  +(*proc) = (struct proc_t *)ap_palloc(cont, sizeof(struct proc_t));
  +(*proc)->cntxt = cont;
  +}
  +(*proc)->pid = *theproc;
  +return APR_SUCCESS;
  +}  
  +
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c

1999-10-13 Thread dreid
dreid   99/10/13 13:14:33

  Modified:src/lib/apr/network_io/beos sockopt.c
  Log:
  This fixes that small cast that isn't needed now that I've included
  the apr_lib.h file for the prototype.
  
  Revision  ChangesPath
  1.8   +2 -1  apache-2.0/src/lib/apr/network_io/beos/sockopt.c
  
  Index: sockopt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockopt.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- sockopt.c 1999/10/10 20:34:55 1.7
  +++ sockopt.c 1999/10/13 20:14:32 1.8
  @@ -62,6 +62,7 @@
   #include "networkio.h"
   #include "apr_network_io.h"
   #include "apr_general.h"
  +#include "apr_lib.h"
   
   ap_status_t ap_setsocketopt(struct socket_t *sock, ap_int32_t opt, 
ap_int32_t on)
   {
  @@ -108,7 +109,7 @@
   hptr = gethostbyaddr((char *)&(sock->addr->sin_addr), 
sizeof(struct in_addr), AF_INET);
   if (hptr != NULL) {
  -*name = (char*)ap_pstrdup(sock->cntxt, hptr->h_name);
  +*name = ap_pstrdup(sock->cntxt, hptr->h_name);
   if (*name) {
   return APR_SUCCESS;
   }
  
  
  


cvs commit: apache-2.0/src/support ab.c htdigest.c logresolve.c

1999-10-11 Thread dreid
dreid   99/10/11 13:25:09

  Modified:src/support ab.c htdigest.c logresolve.c
  Log:
  These changes allow the support programs to compile on BeOS.
  
  The biggest change is in ab.c where the functions that BeOS needs that
  aren't the standard format are hidden behind a new ab_* define.  Tested
  on FreeBSD and BeOS.
  
  Revision  ChangesPath
  1.4   +21 -6 apache-2.0/src/support/ab.c
  
  Index: ab.c
  ===
  RCS file: /home/cvs/apache-2.0/src/support/ab.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ab.c  1999/10/07 21:53:46 1.3
  +++ ab.c  1999/10/11 20:25:07 1.4
  @@ -224,6 +224,16 @@
   fd_set readbits, writebits;  /* bits for select */
   struct sockaddr_in server;   /* server addr structure */
   
  +#ifndef BEOS
  +#define ab_close(s) close(s)
  +#define ab_read(a,b,c) read(a,b,c)
  +#define ab_write(a,b,c) write(a,b,c)
  +#else
  +#define ab_close(s) closesocket(s)
  +#define ab_read(a,b,c) recv(a,b,c,0)
  +#define ab_write(a,b,c) send(a,b,c,0)
  +#endif
  +
   /* - */
   
   /* simple little function to perror and exit */
  @@ -262,9 +272,9 @@
   }
   writev(c->fd,out, outcnt);
   #else
  -write(c->fd,request,reqlen);
  +ab_write(c->fd,request,reqlen);
   if (posting>0) {
  -write(c->fd,postdata,postlen);
  +ab_write(c->fd,postdata,postlen);
   totalposted += (reqlen + postlen);
   }
   #endif
  @@ -281,7 +291,11 @@
   static void nonblock(int fd)
   {
   int i = 1;
  +#ifdef BEOS
  +setsockopt(fd, SOL_SOCKET, SO_NONBLOCK, &i, sizeof(i));
  +#else
   ioctl(fd, FIONBIO, &i);
  +#endif
   }
   
   /* - */
  @@ -526,7 +540,7 @@
return;
}
else {
  - close(c->fd);
  + ab_close(c->fd);
err_conn++;
if (bad++ > 10) {
err("\nTest aborted after 10 failures\n\n");
  @@ -570,7 +584,7 @@
}
   }
   
  -close(c->fd);
  +ab_close(c->fd);
   FD_CLR(c->fd, &readbits);
   FD_CLR(c->fd, &writebits);
   
  @@ -588,8 +602,9 @@
   int r;
   char *part;
   char respcode[4];/* 3 digits and null */
  +
  +r = ab_read(c->fd, buffer, sizeof(buffer));
   
  -r = read(c->fd, buffer, sizeof(buffer));
   if (r == 0 || (r < 0 && errno != EAGAIN)) {
good++;
close_connection(c);
  @@ -635,7 +650,7 @@
return;
else {
/* header is in invalid or too big - close connection */
  - close(c->fd);
  + ab_close(c->fd);
if (bad++ > 10) {
err("\nTest aborted after 10 failures\n\n");
}
  
  
  
  1.2   +1 -1  apache-2.0/src/support/htdigest.c
  
  Index: htdigest.c
  ===
  RCS file: /home/cvs/apache-2.0/src/support/htdigest.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- htdigest.c1999/08/24 06:45:54 1.1
  +++ htdigest.c1999/10/11 20:25:08 1.2
  @@ -70,7 +70,7 @@
   #include 
   #include "ap.h"
   #include "ap_md5.h"
  -#if defined(MPE) || defined(QNX) || defined(WIN32) || defined(__TANDEM)
  +#if defined(MPE) || defined(QNX) || defined(WIN32) || defined(__TANDEM) || 
defined(BEOS)
   #include 
   #else
   #include 
  
  
  
  1.3   +6 -1  apache-2.0/src/support/logresolve.c
  
  Index: logresolve.c
  ===
  RCS file: /home/cvs/apache-2.0/src/support/logresolve.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- logresolve.c  1999/08/31 05:35:40 1.2
  +++ logresolve.c  1999/10/11 20:25:08 1.3
  @@ -52,6 +52,10 @@
   static int getline(char *s, int n);
   static void stats(FILE *output);
   
  +#ifdef BEOS
  +#define NO_ADDRESS NO_DATA
  +#endif
  +
   
   /* maximum line length */
   #define MAXLINE 1024
  @@ -98,8 +102,9 @@
   #ifndef h_errno
   extern int h_errno; /* some machines don't have this in their headers */
   #endif
  +
  +/* largest value for h_errno */
   
  -/* largeste value for h_errno */
   #define MAX_ERR (NO_ADDRESS)
   #define UNKNOWN_ERR (MAX_ERR+1)
   #define NO_REVERSE  (MAX_ERR+2)
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/beos apr_proc_stub.c

1999-10-10 Thread dreid
dreid   99/10/10 10:25:32

  Modified:src/lib/apr configure.in
   src/lib/apr/network_io/beos sockopt.c
   src/lib/apr/threadproc/beos apr_proc_stub.c
  Log:
  Fixing a couple of small bugs in the beos code.
  
  Adjust the way that the check for OSDIR is done.  As beos used to have
  a file_io and a time dircetory they still show up in the CVS tarballs and
  so the check was failing.  Thinking about it it's better to look for the
  Makefile.in in a directory anyway so thats what this patch does.  With it
  everything still works.
  
  Revision  ChangesPath
  1.17  +1 -1  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- configure.in  1999/10/10 17:07:57 1.16
  +++ configure.in  1999/10/10 17:25:29 1.17
  @@ -223,7 +223,7 @@
   SUBDIRS="lib "
   for dir in $MODULES
   do
  -if test -d $dir/$OSDIR; then
  +if test -f $dir/$OSDIR/Makefile.in; then
   MAKEFILE2="$MAKEFILE2 $dir/$OSDIR/Makefile "
   SUBDIRS="$SUBDIRS $dir/$OSDIR "
   else
  
  
  
  1.6   +2 -2  apache-2.0/src/lib/apr/network_io/beos/sockopt.c
  
  Index: sockopt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockopt.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sockopt.c 1999/10/10 13:54:18 1.5
  +++ sockopt.c 1999/10/10 17:25:30 1.6
  @@ -108,7 +108,7 @@
   hptr = gethostbyaddr((char *)&(sock->addr->sin_addr), 
sizeof(struct in_addr), AF_INET);
   if (hptr != NULL) {
  -name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
  +*name = (char*)ap_pstrdup(sock->cntxt, hptr->h_name);
   if (*name) {
   return APR_SUCCESS;
   }
  @@ -116,6 +116,6 @@
   }
   
   /* XXX - Is this threadsafe? - manoj */
  -/* on BeOS this is a global... */
  +/* on BeOS h_errno is a global... */
   return h_errno;
   }
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c
  
  Index: apr_proc_stub.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/apr_proc_stub.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apr_proc_stub.c   1999/09/10 14:00:46 1.1
  +++ apr_proc_stub.c   1999/10/10 17:25:31 1.2
  @@ -32,7 +32,7 @@
size_t readbuf = 100;

readbuffer = (char*)malloc(sizeof(char) * readbuf);
  - newargs = (char**)malloc(sizeof(char) * (argc - 1));
  + *newargs = (char*)malloc(sizeof(char) * (argc - 1));
 
buffer = (void*)malloc(sizeof(struct pipefd));
/* this will block until we get the data */
  
  
  


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

1999-10-10 Thread dreid
dreid   99/10/10 08:14:11

  Removed: src/lib/apr/file_io/beos Makefile.in
   src/lib/apr/time/beos Makefile.in
  Log:
  The beos directories under file_io and time aren't needed any
  longer after the change to the APR configuration that allows the use
  of default directories.
  
  As the directories aren't needed can they now be removed?


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

1999-10-10 Thread dreid
dreid   99/10/10 07:32:28

  Modified:src/include ap.h
  Log:
  ap_killpg has been moved into the APR headers so isn't needed here
  anymore.  In case there is a need I've overlooked I've only commented
  it out.  This stops another annoying warning when building.
  
  Revision  ChangesPath
  1.4   +2 -1  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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap.h  1999/08/31 05:32:16 1.3
  +++ ap.h  1999/10/10 14:32:28 1.4
  @@ -78,6 +78,7 @@
   
   /* small utility macros to make things easier to read */
   
  +/*
   #ifdef WIN32
   #define ap_killpg(x, y)
   #else
  @@ -86,7 +87,7 @@
   #else
   #define ap_killpg(x, y)  (killpg ((x), (y)))
   #endif
  -#endif /* WIN32 */
  +#endif */ /* WIN32 */
   
   /* ap_vformatter() is a generic printf-style formatting routine
* with some extensions.  The extensions are:
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/beos sockopt.c

1999-10-10 Thread dreid
dreid   99/10/10 06:54:18

  Modified:src/lib/apr/network_io/beos sockopt.c
  Log:
  This stops a small moan by the compiler.
  
  h_errno is a global so it'll need to be made threadsafe.
  
  Revision  ChangesPath
  1.5   +2 -1  apache-2.0/src/lib/apr/network_io/beos/sockopt.c
  
  Index: sockopt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockopt.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- sockopt.c 1999/10/08 21:27:41 1.4
  +++ sockopt.c 1999/10/10 13:54:18 1.5
  @@ -108,7 +108,7 @@
   hptr = gethostbyaddr((char *)&(sock->addr->sin_addr), 
sizeof(struct in_addr), AF_INET);
   if (hptr != NULL) {
  -*name = ap_pstrdup(sock->cntxt, hptr->h_name);
  +name = (char**)ap_pstrdup(sock->cntxt, hptr->h_name);
   if (*name) {
   return APR_SUCCESS;
   }
  @@ -116,5 +116,6 @@
   }
   
   /* XXX - Is this threadsafe? - manoj */
  +/* on BeOS this is a global... */
   return h_errno;
   }
  
  
  


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

1999-10-09 Thread dreid
dreid   99/10/09 13:27:26

  Modified:src/modules/mpm/mpmt_beos mpmt_beos.c
  Log:
  Incorporate Ben's changes to ap_listen_open in the beos mpm.  Also used
  the opportunity to make the setup_listeners routine the same as the other
  mpm's.  If we're all doing it the same should it be in an mpm at all?
  
  Revision  ChangesPath
  1.2   +3 -3  apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mpmt_beos.c   1999/10/08 19:02:33 1.1
  +++ mpmt_beos.c   1999/10/09 20:27:25 1.2
  @@ -606,11 +606,11 @@
   }
   }
   
  -static int setup_listeners(ap_context_t *pconf, server_rec *s)
  +static int setup_listeners(server_rec *s)
   {
   ap_listen_rec *lr;
   int num_listeners = 0;
  -if (ap_listen_open(pconf, s->port)) {
  +if (ap_listen_open(s->process, s->port)) {
  return 0;
   }
   for (lr = ap_listeners; lr; lr = lr->next) {
  @@ -1143,7 +1143,7 @@
   server_conf = s;
   port_of_death = create_port(1, "httpd_port_of_death");
   
  -if ((num_listenfds = setup_listeners(pconf, server_conf)) < 1) {
  +if ((num_listenfds = setup_listeners(server_conf)) < 1) {
   /* XXX: hey, what's the right way for the mpm to indicate a fatal 
error? */
   ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ALERT, s,
   "no listening sockets available, shutting down");
  
  
  


cvs commit: apache-2.0/src/modules/mpm/mpmt_beos Makefile.libdir Makefile.tmpl acceptlock.c acceptlock.h mpm_default.h mpmt_beos.c mpmt_beos.h mutex.c mutex.h poll.c poll.h scoreboard.c scoreboard.h

1999-10-08 Thread dreid
dreid   99/10/08 12:02:51

  Added:   src/modules/mpm/mpmt_beos Makefile.libdir Makefile.tmpl
acceptlock.c acceptlock.h mpm_default.h mpmt_beos.c
mpmt_beos.h mutex.c mutex.h poll.c poll.h
scoreboard.c scoreboard.h
  Log:
  Well here is the first attempt at an mpm for BeOS.  It's based
  on the mpmt_pthread module but is totally threaded as that what
  BeOS needs.  There's a lot that can be improved but now that it's
  committed others can start looking and helping.
  
  Revision  ChangesPath
  1.1  apache-2.0/src/modules/mpm/mpmt_beos/Makefile.libdir
  
  Index: Makefile.libdir
  ===
  This is a place-holder which indicates to Configure that it shouldn't
  provide the default targets when building the Makefile in this directory.
  Instead it'll just prepend all the important variable definitions, and
  copy the Makefile.tmpl onto the end.
  
  
  
  1.1  apache-2.0/src/modules/mpm/mpmt_beos/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  
  LIB=libmpmt_beos.$(LIBEXT)
  
  OBJS=\
   mpmt_beos.o acceptlock.o scoreboard.o mutex.o poll.o
  OBJS_PIC=\
   mpmt_beos.lo acceptlock.lo scoreboard.lo mutex.lo poll.lo
  
  all: lib
  
  lib: $(LIB)
  
  libmpmt_beos.a: $(OBJS)
rm -f $@
ar cr $@ $(OBJS)
$(RANLIB) $@
  
  libmpmt_beos.so: $(OBJS_PIC)
rm -f $@
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(OBJS_PIC) $(LIBS_SHLIB)
  
  libmpmt_beos.dll: $(OBJS_PIC) mpmt_beos.def
$(LD_SHLIB) $(LDFLAGS_SHLIB) -o $* $(OBJS_PIC) $(LIBS_SHLIB)
emxbind -b -q -s -h0 -dmpmt_beos.def $* && \
rm $*
  
  .SUFFIXES: .o .lo .dll
  
  .c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $<
  
  .c.lo:
$(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $< && mv $*.o $*.lo
  
  clean:
rm -f $(OBJS) $(OBJS_PIC) $(LIB)
  
  distclean: clean
-rm -f Makefile
  
  # We really don't expect end users to use this rule.  It works only with
  # gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
  # using it.
  depend:
cp Makefile.tmpl Makefile.tmpl.bak \
&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
&& gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
&& sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
   -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
> Makefile.tmpl \
&& rm Makefile.new
  
  #Dependencies
  
  $(OBJS) $(OBJS_PIC): Makefile
  
  # DO NOT REMOVE
  acceptlock.o: acceptlock.c mutex.h $(INCDIR)/httpd.h \
   $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
   $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
   $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
   ../../../lib/apr/include/apr_general.h \
   ../../../lib/apr/include/apr_config.h \
   ../../../lib/apr/include/apr_errno.h \
   ../../../lib/apr/include/apr_lib.h \
   ../../../lib/apr/include/apr_file_io.h $(INCDIR)/buff.h \
   $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
   $(INCDIR)/apr.h $(INCDIR)/util_uri.h acceptlock.h \
   $(INCDIR)/ap_mpm.h mpmt_beos.h
  mpmt_beos.o: mpmt_beos.c ../../../lib/apr/include/apr_portable.h \
   ../../../lib/apr/include/apr_general.h \
   ../../../lib/apr/include/apr_config.h \
   ../../../lib/apr/include/apr_errno.h \
   ../../../lib/apr/include/apr_thread_proc.h \
   ../../../lib/apr/include/apr_file_io.h \
   ../../../lib/apr/include/apr_win.h \
   ../../../lib/apr/include/apr_network_io.h \
   ../../../lib/apr/include/apr_lock.h \
   ../../../lib/apr/include/apr_time.h $(INCDIR)/httpd.h \
   $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
   $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
   $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
   ../../../lib/apr/include/apr_lib.h $(INCDIR)/buff.h \
   $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
   $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
   $(INCDIR)/http_main.h $(INCDIR)/http_log.h \
   $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
   $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \
   $(INCDIR)/ap_mpm.h $(OSDIR)/beosd.h \
   $(OSDIR)/iol_socket.h $(INCDIR)/ap_listen.h \
   scoreboard.h mpm_default.h acceptlock.h mutex.h poll.h
  mutex.o: mutex.c mutex.h
  poll.o: poll.c poll.h
  scoreboard.o: scoreboard.c $(INCDIR)/httpd.h \
   $(INCDIR)/ap_config.h $(INCDIR)/ap_mmn.h \
   $(INCDIR)/ap_config_auto.h $(OSDIR)/os.h \
   $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
   ../../../lib/apr/include/apr_general.h \
   ../../../lib/apr/include/apr_config.h \
   ../../../lib/apr/include/apr_errno.h \
   ../../../lib/apr/include/apr_lib.h \
   ../../../lib/apr/include/apr_file_io.h $(INCDIR)/buff.h \
   $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
   $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
   $

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

1999-10-08 Thread dreid
dreid   99/10/08 11:49:50

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


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

1999-10-08 Thread dreid
dreid   99/10/08 09:19:26

  Modified:src/lib/apr/threadproc/beos proc.c
  Log:
  Don't know how I missed this one from my earlier commit.  This fixes
  ap_create_pipe ordering of arguments.
  
  Revision  ChangesPath
  1.5   +6 -6  apache-2.0/src/lib/apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/proc.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- proc.c1999/10/04 16:37:30 1.4
  +++ proc.c1999/10/08 16:19:25 1.5
  @@ -94,20 +94,20 @@
   {
   ap_status_t stat;
   if (in) {
  -if ((stat = ap_create_pipe(attr->cntxt, &attr->child_in, 
  -&attr->parent_in)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(&attr->child_in, &attr->parent_in,
  +attr->cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
   if (out) {
  -if ((stat = ap_create_pipe(attr->cntxt, &attr->parent_out, 
  -&attr->child_out)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(&attr->parent_out, &attr->child_out,
  + attr->cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
   if (err) {
  -if ((stat = ap_create_pipe(attr->cntxt, &attr->parent_err, 
  -&attr->child_err)) != APR_SUCCESS) {
  +if ((stat = ap_create_pipe(&attr->parent_err, &attr->child_err,
  +  attr->cntxt)) != APR_SUCCESS) {
   return stat;
   }
   } 
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 09:10:39

  Modified:src/lib/apr Makefile.in
  Log:
  This allows the build process for APR to make use of the extra
  flexability in the configure process.  The MODULES and SUBDIRS are now
  generated by configure.
  
  Revision  ChangesPath
  1.10  +2 -3  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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Makefile.in   1999/09/27 06:39:37 1.9
  +++ Makefile.in   1999/10/08 16:10:38 1.10
  @@ -24,9 +24,8 @@
   #
   # Macros for target determination
   #
  -MODULES=lib file_io network_io threadproc locks misc time signal
  -SUBDIRS=lib file_io/@OSDIR@ network_io/@OSDIR@ threadproc/@OSDIR@ \
  -locks/@OSDIR@ misc/@OSDIR@ time/@OSDIR@ signal/@OSDIR@ 
  [EMAIL PROTECTED]@
  [EMAIL PROTECTED]@
   #shmem/@OSDIR@
   
   #
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 09:07:41

  Modified:src/lib/apr configure.in
  Log:
  This allows for more flexability in the directories used by non-unix
  platforms.  Specifically it adds
  - a MODULES variable
  - a DEFAULT_OSDIR which is used when no OSDIR exists for a platform
  It's been tested on BeOS and works OK.  Should have no bearing on
  unix platforms.
  
  Revision  ChangesPath
  1.15  +23 -5 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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- configure.in  1999/10/06 06:48:49 1.14
  +++ configure.in  1999/10/08 16:07:38 1.15
  @@ -2,8 +2,13 @@
   OS=`./config.guess`
   OS=`./config.sub $OS` 
   
  +# These added to allow default directories to be used...
  +DEFAULT_OSDIR="unix"
  +MODULES="file_io network_io threadproc misc signal locks time" 
  +
   echo "Configuring APR library"
   echo "Platform: ${OS}"
  +echo "(Default will be ${DEFAULT_OSDIR})"
   
   dnl Process this file with autoconf to produce a configure script.
   AC_INIT(configure.in)
  @@ -207,10 +212,23 @@
   AC_SUBST(AR)
   AC_SUBST(RM)
   AC_SUBST(OSDIR)
  +AC_SUBST(DEFAULT_OSDIR)
   AC_SUBST(LIBPREFIX)
   AC_SUBST(EXEEXT)
  -AC_OUTPUT(Makefile lib/Makefile file_io/$OSDIR/Makefile 
  -  network_io/$OSDIR/Makefile threadproc/$OSDIR/Makefile 
  -  locks/$OSDIR/Makefile misc/$OSDIR/Makefile 
  -  time/$OSDIR/Makefile signal/$OSDIR/Makefile
  -  test/Makefile)
  +
  +MAKEFILE1="Makefile lib/Makefile "
  +SUBDIRS="lib "
  +for dir in $MODULES
  +do
  +if test -d $dir/$OSDIR; then
  +MAKEFILE2="$MAKEFILE2 $dir/$OSDIR/Makefile "
  +SUBDIRS="$SUBDIRS $dir/$OSDIR "
  +else
  +MAKEFILE2="$MAKEFILE2 $dir/$DEFAULT_OSDIR/Makefile "
  +SUBDIRS="$SUBDIRS $dir/$DEFAULT_OSDIR "
  +fi
  +done
  +MAKEFILE3="test/Makefile"
  +AC_SUBST(SUBDIRS)
  +AC_SUBST(MODULES)
  +AC_OUTPUT($MAKEFILE1 $MAKEFILE2 $MAKEFILE3)
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 05:56:40

  Modified:src/main listen.c
  Log:
  I think this was missed earlier, and as BeOS doesn't define SO_SNDBUF it was 
stopping the build.  APR_SO_SNDBUF is defined and so all is well again.
  
  Revision  ChangesPath
  1.12  +1 -1  apache-2.0/src/main/listen.c
  
  Index: listen.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/listen.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- listen.c  1999/10/07 20:47:54 1.11
  +++ listen.c  1999/10/08 12:56:40 1.12
  @@ -110,7 +110,7 @@
* If no size is specified, use the kernel default.
*/
   if (send_buffer_size) {
  - stat = ap_setsocketopt(s, SO_SNDBUF,  send_buffer_size);
  + stat = ap_setsocketopt(s, APR_SO_SNDBUF,  send_buffer_size);
   if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
   ap_log_error(APLOG_MARK, APLOG_WARNING, NULL,
"make_sock: failed to set SendBufferSize for %s, "
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 04:33:28

  Modified:src/lib/apr/locks/beos locks.c
  Log:
  And with this small change beos is up to date again!
  
  Revision  ChangesPath
  1.3   +3 -1  apache-2.0/src/lib/apr/locks/beos/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/locks.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- locks.c   1999/10/04 16:36:57 1.2
  +++ locks.c   1999/10/08 11:33:28 1.3
  @@ -59,7 +59,9 @@
   #include 
   #include 
   
  -ap_status_t ap_create_lock(struct lock_t **lock, ap_context_t *cont, 
ap_locktype_e type, char *fname)
  +ap_status_t ap_create_lock(ap_context_t *cont, ap_locktype_e type, 
  +   ap_lockscope_e scope, char *fname, 
  +   struct lock_t **lock)
   {
   struct lock_t *new;
   ap_status_t stat;
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 04:29:55

  Modified:src/lib/apr/misc/beos misc.h start.c
  Log:
  Continuing to bring the beos APR into line.
  
  Revision  ChangesPath
  1.3   +7 -0  apache-2.0/src/lib/apr/misc/beos/misc.h
  
  Index: misc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/misc.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- misc.h1999/08/27 16:25:41 1.2
  +++ misc.h1999/10/08 11:29:54 1.3
  @@ -60,6 +60,13 @@
   #include "apr_file_io.h"
   #include "apr_errno.h"
   
  +typedef struct datastruct {
  +void *data;
  +char *key;
  +struct datastruct *next;
  +struct datastruct *prev;
  +} datastruct;
  +
   struct context_t {
   struct ap_pool_t *pool;
   void *prog_data;
  
  
  
  1.6   +41 -11apache-2.0/src/lib/apr/misc/beos/start.c
  
  Index: start.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/beos/start.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- start.c   1999/10/04 16:37:00 1.5
  +++ start.c   1999/10/08 11:29:54 1.6
  @@ -63,7 +63,7 @@
   #include 
   #include 
   
  -ap_status_t ap_create_context(ap_context_t **newcont, ap_context_t *cont, 
void *data)
  +ap_status_t ap_create_context(struct context_t **newcont, struct context_t 
*cont)
   {
   ap_context_t *new;
   ap_pool_t *pool;
  @@ -87,12 +87,7 @@
   }
   
   new->pool = pool;
  -if (data == NULL && cont) {
  -new->prog_data = cont->prog_data;
  -}
  -else {
  -new->prog_data = data;
  -}
  +new->prog_data = NULL;

   *newcont = new;
   return APR_SUCCESS;
  @@ -104,19 +99,54 @@
   return APR_SUCCESS;
   }
   
  -ap_status_t ap_set_userdata(struct context_t *cont, void *data)
  +ap_status_t ap_set_userdata(struct context_t *cont, void *data, char *key,
  +ap_status_t (*cleanup) (void *))
   {
  +datastruct *dptr = NULL, *dptr2 = NULL;
   if (cont) { 
  -cont->prog_data = data;
  +dptr = cont->prog_data;
  +while (dptr) {
  +if (!strcmp(dptr->key, key))
  +break;
  +dptr2 = dptr;
  +dptr = dptr->next;
  +}
  +if (dptr == NULL) {
  +dptr = ap_palloc(cont, sizeof(datastruct));
  +dptr->next = dptr->prev = NULL;
  +dptr->key = strdup(key);
  +if (dptr2) {
  +dptr2->next = dptr;
  +dptr->prev = dptr2;
  +}
  +else {
  +cont->prog_data = dptr;
  +}
  +}
  +dptr->data = data;
  +ap_register_cleanup(cont, dptr->data, cleanup, cleanup);
   return APR_SUCCESS;
   }
   return APR_ENOCONT;
   }
   
  -ap_status_t ap_get_userdata(void **data, struct context_t *cont)
  +ap_status_t ap_get_userdata(void **data, struct context_t *cont, char *key)
   {
  +datastruct *dptr = NULL;
   if (cont) { 
  -(*data) = cont->prog_data;
  +dptr = cont->prog_data;
  +while (dptr) {
  +if (!strcmp(dptr->key, key)) {
  +break;
  +}
  +dptr = dptr->next;
  +}
  +if (dptr) {
  +(*data) = dptr->data;
  +}
  +else {
  +(*data) = NULL;
  +}
   return APR_SUCCESS;
   }
   return APR_ENOCONT;
  
  
  


cvs commit: apache-2.0/src/lib/apr/threadproc/beos Makefile.in procsup.c

1999-10-08 Thread dreid
dreid   99/10/08 04:22:54

  Modified:src/lib/apr/threadproc/beos Makefile.in procsup.c
  Log:
  Bring the userdata functions back in line and correct a small error in the 
makefile.in related to the removal of the file_io/beos files.
  
  Revision  ChangesPath
  1.4   +1 -1  apache-2.0/src/lib/apr/threadproc/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/Makefile.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.in   1999/09/10 14:00:46 1.3
  +++ Makefile.in   1999/10/08 11:22:53 1.4
  @@ -10,7 +10,7 @@
   [EMAIL PROTECTED]@ $(LIBS)
   INCDIR=../../inc
   INCDIR1=../../include
  -INCDIR2=../../file_io/@OSDIR@
  +INCDIR2=../../file_io/unix
   INCLUDES=-I$(INCDIR) -I$(INCDIR1) -I$(INCDIR2) -I.
   
   LIB=libthreadproc.a
  
  
  
  1.3   +5 -4  apache-2.0/src/lib/apr/threadproc/beos/procsup.c
  
  Index: procsup.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/procsup.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- procsup.c 1999/10/04 16:37:30 1.2
  +++ procsup.c 1999/10/08 11:22:53 1.3
  @@ -97,10 +97,10 @@
   }
   }
   
  -ap_status_t ap_get_procdata(struct proc_t *proc, void *data)
  +ap_status_t ap_get_procdata(struct proc_t *proc, char *key, void *data)
   {
   if (proc != NULL) {
  -return ap_get_userdata(proc->cntxt, &data);
  +return ap_get_userdata(&data, proc->cntxt, key);
   }
   else {
   data = NULL;
  @@ -108,10 +108,11 @@
   }
   }
   
  -ap_status_t ap_set_procdata(struct proc_t *proc, void *data)
  +ap_status_t ap_set_procdata(struct proc_t *proc, void *data, char *key, 
  +ap_status_t (*cleanup) (void *))
   {
   if (proc != NULL) {
  -return ap_set_userdata(proc->cntxt, data);
  +return ap_set_userdata(proc->cntxt, data, key, cleanup);
   }
   else {
   data = NULL;
  
  
  


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

1999-10-08 Thread dreid
dreid   99/10/08 04:13:14

  Modified:src/lib/apr/network_io/beos sockets.c
  Log:
  Bring sockets.c into line with the current status of APR.
  
  Revision  ChangesPath
  1.4   +10 -9 apache-2.0/src/lib/apr/network_io/beos/sockets.c
  
  Index: sockets.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/sockets.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sockets.c 1999/10/04 16:37:06 1.3
  +++ sockets.c 1999/10/08 11:13:13 1.4
  @@ -145,10 +145,11 @@
   return APR_SUCCESS;
   }
   
  -ap_status_t ap_getipaddr(struct socket_t *sock, char **addr)
  +ap_status_t ap_getipaddr(char *addr, ap_ssize_t len,
  +  const struct socket_t *sock)
   {
   char *temp = inet_ntoa(sock->addr->sin_addr);
  -*addr=temp;
  +ap_cpystrn(addr,temp,len-1);
   return APR_SUCCESS;
   }
   
  @@ -225,10 +226,10 @@
   return APR_SUCCESS; 
   } 
   
  -ap_status_t ap_get_socketdata(struct socket_t *socket, char *key, void *data)
  +ap_status_t ap_get_socketdata(struct socket_t *sock, char *key, void *data)
   {
   if (socket != NULL) {
  -return ap_get_userdata(socket->cntxt, key, &data);
  +return ap_get_userdata(&data, sock->cntxt, key);
   }
   else {
   data = NULL;
  @@ -236,11 +237,11 @@
   }
   }
   
  -ap_status_t ap_set_socketdata(struct socket_t *socket, void *data, char *key,
  +ap_status_t ap_set_socketdata(struct socket_t *sock, void *data, char *key,
 ap_status_t (*cleanup) (void *))
   {
  -if (socket != NULL) {
  -return ap_set_userdata(socket->cntxt, data, key, cleanup);
  +if (sock != NULL) {
  +return ap_set_userdata(sock->cntxt, data, key, cleanup);
   }
   else {
   data = NULL;
  @@ -257,8 +258,8 @@
   return APR_SUCCESS;
   }
   
  -ap_status_t ap_put_os_sock(ap_context_t *cont, struct socket_t **sock,
  -ap_os_sock_t *thesock)
  +ap_status_t ap_put_os_sock(struct socket_t **sock, ap_os_sock_t *thesock, 
  +   ap_context_t *cont)
   {
   if (cont == NULL) {
   return APR_ENOCONT;
  
  
  


cvs commit: apache-2.0/src/lib/apr/network_io/beos poll.c

1999-10-08 Thread dreid
dreid   99/10/08 04:12:15

  Modified:src/lib/apr/network_io/beos poll.c
  Log:
  This bring beos poll back into line with APR.
  
  Revision  ChangesPath
  1.3   +6 -7  apache-2.0/src/lib/apr/network_io/beos/poll.c
  
  Index: poll.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/poll.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- poll.c1999/09/07 13:16:48 1.2
  +++ poll.c1999/10/08 11:12:14 1.3
  @@ -68,8 +68,7 @@
   /*  select for R4.5 of BeOS.  So here we use code that uses the write */
   /*  bits. */
   
  -ap_status_t ap_setup_poll(ap_context_t *cont, ap_int32_t num, struct 
pollfd_t **
  -new)
  +ap_status_t ap_setup_poll(struct pollfd_t **new, ap_context_t *cont, 
ap_int32_t num)
   {
   (*new) = (struct pollfd_t *)ap_palloc(cont, sizeof(struct pollfd_t) * 
num);
   if ((*new) == NULL) {
  @@ -208,10 +207,10 @@
   return APR_SUCCESS;
   }
   
  -ap_status_t ap_get_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_get_polldata(struct pollfd_t *pollfd, char *key, void *data)
   {
   if (pollfd != NULL) {
  -return ap_get_userdata(pollfd->cntxt, &data);
  +return ap_get_userdata(&data, pollfd->cntxt, key);
   }
   else {
   data = NULL;
  @@ -219,14 +218,14 @@
   }
   }
   
  -ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data)
  +ap_status_t ap_set_polldata(struct pollfd_t *pollfd, void *data, char *key,
  +ap_status_t (*cleanup) (void *))
   {
   if (pollfd != NULL) {
  -return ap_set_userdata(pollfd->cntxt, data);
  +return ap_set_userdata(pollfd->cntxt, data, key, cleanup);
   }
   else {
   data = NULL;
   return APR_ENOFILE;
   }
   }
  -
  
  
  


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

1999-10-07 Thread dreid
dreid   99/10/07 13:15:20

  Modified:src/lib/apr/file_io/beos Makefile.in
  Log:
  Small fix for beos that I missed first time around.
  
  This removes some files that I was playing with here but won't be committed.
  
  Revision  ChangesPath
  1.5   +1 -2  apache-2.0/src/lib/apr/file_io/beos/Makefile.in
  
  Index: Makefile.in
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/beos/Makefile.in,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.in   1999/09/28 17:21:10 1.4
  +++ Makefile.in   1999/10/07 20:15:14 1.5
  @@ -25,7 +25,6 @@
../unix/pipe.o \
../unix/readwrite.o \
../unix/seek.o \
  - ../unix/mmap_file.o
   
   OBJS2=dir.o \
fileacc.o \
  @@ -35,7 +34,7 @@
pipe.o \
readwrite.o \
seek.o \
  - mmap_file.o
  +
   .c.o:
$(CC) $(CFLAGS) -c $(INCLUDES) $<