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

1999-10-11 Thread martin
martin  99/10/11 16:08:23

  Modified:src/main http_main.c
  Log:
  Pull in httpd.h to get the prototype for ap_validate_password()
  for SHARED_CORE variants
  
  Revision  ChangesPath
  1.478 +1 -0  apache-1.3/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_main.c,v
  retrieving revision 1.477
  retrieving revision 1.478
  diff -u -r1.477 -r1.478
  --- http_main.c   1999/09/20 20:46:59 1.477
  +++ http_main.c   1999/10/11 23:08:19 1.478
  @@ -6623,6 +6623,7 @@
   #endif /* ndef SHARED_CORE_BOOTSTRAP */
   
   #ifndef SHARED_CORE_BOOTSTRAP
  +#include "httpd.h"
   /*
* Force ap_validate_password() into the image so that modules like
* mod_auth can use it even if they're dynamically loaded.
  
  
  


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

1999-10-11 Thread martin
martin  99/10/11 16:05:16

  Modified:src/main http_config.c
  Log:
  When we run out of memory, there's *no way* to continue successfully. Exit.
  
  Revision  ChangesPath
  1.148 +1 -0  apache-1.3/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/main/http_config.c,v
  retrieving revision 1.147
  retrieving revision 1.148
  diff -u -r1.147 -r1.148
  --- http_config.c 1999/08/27 23:38:10 1.147
  +++ http_config.c 1999/10/11 23:05:15 1.148
  @@ -698,6 +698,7 @@
   sizeof(module *)*(total_modules+DYNAMIC_MODULE_LIMIT+1));
   if (ap_loaded_modules == NULL) {
fprintf(stderr, "Ouch!  Out of memory in 
ap_setup_prelinked_modules()!\n");
  + exit(1);
   }
   for (m = ap_preloaded_modules, m2 = ap_loaded_modules; *m != NULL; )
   *m2++ = *m++;
  
  
  


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

1999-10-11 Thread martin
martin  99/10/11 16:04:14

  Modified:src/include ap.h
  Log:
  typo
  
  Revision  ChangesPath
  1.25  +1 -1  apache-1.3/src/include/ap.h
  
  Index: ap.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/include/ap.h,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- ap.h  1999/08/12 18:06:20 1.24
  +++ ap.h  1999/10/11 23:04:13 1.25
  @@ -180,7 +180,7 @@
   API_EXPORT(int) ap_base64decode_binary(unsigned char * plain_dst, const char 
*coded_src);
   
   /* Password validation, as used in AuthType Basic which is able to cope
  - * (based on the prexix) with the SHA1, Apache's internal MD5 and (depending
  + * (based on the prefix) with the SHA1, Apache's internal MD5 and (depending
* on your platform either plain or crypt(3) passwords.
*/
   API_EXPORT(char *) ap_validate_password(const char *passwd, const char 
*hash);
  
  
  


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

1999-10-11 Thread martin
martin  99/10/11 15:54:31

  Modified:src/main listen.c
  Log:
  I cannot solve this right now. But this variable sure was uninitialized
  
  Revision  ChangesPath
  1.14  +2 -0  apache-2.0/src/main/listen.c
  
  Index: listen.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/listen.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- listen.c  1999/10/10 20:35:01 1.13
  +++ listen.c  1999/10/11 22:54:29 1.14
  @@ -74,6 +74,8 @@
   char addr[512];
   ap_status_t stat;
   
  +ap_cpystrn(addr, "[EMAIL PROTECTED]/listen.c:make_sock(): 
inet_ntoa(server->sin_addr)]", sizeof addr);
  +
   stat = ap_setsocketopt(s, APR_SO_REUSEADDR, one);
   if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
ap_log_error(APLOG_MARK, APLOG_CRIT, NULL,
  
  
  


cvs commit: apache-2.0/src/test time-sem.c

1999-10-11 Thread martin
martin  99/10/11 15:40:20

  Modified:src/ap   ap_getpass.c
   src/lib/apr/lib apr_pools.c apr_tables.c
   src/lib/apr/locks/unix crossproc.c
   src/modules/example mod_example.c
   src/modules/mpm/dexter acceptlock.c
   src/modules/mpm/mpmt_pthread acceptlock.c
   src/modules/mpm/prefork prefork.c
   src/modules/mpm/spmt_os2 spmt_os2.c
   src/modules/proxy proxy_ftp.c proxy_util.c
   src/modules/standard mod_asis.c mod_auth.c mod_auth_anon.c
mod_auth_db.c mod_auth_dbm.c mod_autoindex.c
mod_imap.c mod_info.c mod_mime_magic.c
mod_negotiation.c mod_rewrite.c mod_so.c
   src/os/win32/installer/installdll install.c
   src/os/win32 mod_dll.c mod_isapi.c registry.c
   src/test time-sem.c
  Log:
  Remove most of the annoying "re ap_context_t mplement" mis-replacements
  by what I think is their real meaning. Guys, I didn't verify all of this,
  please have a close look at my "fixes". Thanks.
  
  Revision  ChangesPath
  1.3   +1 -1  apache-2.0/src/ap/ap_getpass.c
  
  Index: ap_getpass.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/ap/ap_getpass.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_getpass.c  1999/08/31 05:32:07 1.2
  +++ ap_getpass.c  1999/10/11 22:39:35 1.3
  @@ -106,7 +106,7 @@
   
   #ifdef WIN32
   /*
  - * Windows lacks getpass().  So we'll re ap_context_t mplement it here.
  + * Windows lacks getpass().  So we'll reimplement it here.
*/
   
   static char *getpass(const char *prompt)
  
  
  
  1.17  +4 -4  apache-2.0/src/lib/apr/lib/apr_pools.c
  
  Index: apr_pools.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_pools.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- apr_pools.c   1999/10/11 15:31:48 1.16
  +++ apr_pools.c   1999/10/11 22:39:36 1.17
  @@ -117,7 +117,7 @@
   
   /*
* Pool debugging support:  This is intended to detect cases where the
  - * wrong ap_context_t is used when assigning data to an object in another 
pool.
  + * wrong pool is used when assigning data to an object in another pool.
* In particular, it causes the table_{set,add,merge}n routines to check
* that their arguments are safe for the ap_table_t they're being placed in.
* It currently only works with the unix multiprocess model, but could
  @@ -460,7 +460,7 @@
   
   static ap_pool_t *permanent_pool;
   
  -/* Each ap_context_t structure is allocated in the start of its own first 
block,
  +/* Each pool structure is allocated in the start of its own first block,
* so we need to know how many bytes that is (once properly aligned...).
* This also means that when a pool's sub-pool is destroyed, the storage
* associated with it is *completely* gone, so we have to make sure it
  @@ -653,7 +653,7 @@
   (((unsigned long)(ptr) - (unsigned long)(lo)) \
< (unsigned long)(hi) - (unsigned long)(lo))
   
  -/* Find the ap_context_t that ts belongs to, return NULL if it doesn't
  +/* Find the pool that ts belongs to, return NULL if it doesn't
* belong to any pool.
*/
   API_EXPORT(ap_pool_t *) ap_find_pool(const void *ts)
  @@ -990,7 +990,7 @@
   ps->blok = nblok;
   ps->got_a_new_block = 1;
   /* note that we've deliberately not linked the new block onto
  - * the ap_context_t yet... because we may need to flush again later, and
  + * the pool yet... because we may need to flush again later, and
* we'd have to spend more effort trying to unlink the block.
*/
   return 0;
  
  
  
  1.4   +10 -10apache-2.0/src/lib/apr/lib/apr_tables.c
  
  Index: apr_tables.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/lib/apr_tables.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_tables.c  1999/08/31 05:32:36 1.3
  +++ apr_tables.c  1999/10/11 22:39:36 1.4
  @@ -315,7 +315,7 @@
* have a life span at least as long as p
*/
   if (!ap_pool_is_ancestor(t->a.pool, p)) {
  - fprintf(stderr, "copy_table: t's ap_context_t is not an ancestor of 
p\n");
  + fprintf(stderr, "copy_table: t's pool is not an ancestor of p\n");
abort();
   }
   #endif
  @@ -392,11 +392,11 @@
   #ifdef POOL_DEBUG
   {
if (!ap_pool_is_ancestor(ap_find_pool(key), t->a.pool)) {
  - fprintf(stderr, "table_set: key not in ancestor ap_context_t of 
t\n");
  + fprintf(stderr, "table_set: key not in ancestor pool of t\n");
abort();
}
if (!ap_pool_is_ancestor(ap_f

cvs commit: apache-2.0/src/main http_connection.c http_core.c http_main.c http_protocol.c http_request.c util_date.c util_script.c

1999-10-11 Thread martin
martin  99/10/11 15:07:40

  Modified:src/main http_connection.c http_core.c http_main.c
http_protocol.c http_request.c util_date.c
util_script.c
  Log:
  Fix typos
  
  Revision  ChangesPath
  1.20  +1 -1  apache-2.0/src/main/http_connection.c
  
  Index: http_connection.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_connection.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- http_connection.c 1999/08/31 05:32:56 1.19
  +++ http_connection.c 1999/10/11 22:07:21 1.20
  @@ -72,7 +72,7 @@
   IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c))
   IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
   
  -/* TODO: re ap_context_t mplement the lingering close stuff */
  +/* TODO: reimplement the lingering close stuff */
   #define NO_LINGCLOSE
   
   /*
  
  
  
  1.17  +1 -1  apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- http_core.c   1999/10/06 23:04:08 1.16
  +++ http_core.c   1999/10/11 22:07:22 1.17
  @@ -2110,7 +2110,7 @@
   return err;
   }
   
  -/* TODO: re ap_context_t mplement the server token stuff. */
  +/* TODO: reimplement the server token stuff. */
   #if 0
   if (!strcasecmp(arg, "OS")) {
   ap_server_tokens = SrvTk_OS;
  
  
  
  1.16  +2 -2  apache-2.0/src/main/http_main.c
  
  Index: http_main.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_main.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- http_main.c   1999/10/07 21:48:30 1.15
  +++ http_main.c   1999/10/11 22:07:23 1.16
  @@ -156,7 +156,7 @@
   printf(" -D SHARED_CORE\n");
   #endif
   
  -/* This list displays the compiled ap_context_t n default paths: */
  +/* This list displays the compiled in default paths: */
   #ifdef HTTPD_ROOT
   printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n");
   #endif
  @@ -253,7 +253,7 @@
   fprintf(stderr, "  -v   : show version number\n");
   fprintf(stderr, "  -V   : show compile settings\n");
   fprintf(stderr, "  -h   : list available command line 
options (this page)\n");
  -fprintf(stderr, "  -l   : list compiled ap_context_t n 
modules\n");
  +fprintf(stderr, "  -l   : list compiled in modules\n");
   fprintf(stderr, "  -L   : list available configuration 
directives\n");
   /* TODOC: -S has been replaced by '-t -D DUMP_VHOSTS' */
   /* fprintf(stderr, "  -S   : show parsed settings (currently 
only vhost settings)\n"); */
  
  
  
  1.19  +3 -3  apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- http_protocol.c   1999/10/05 05:14:43 1.18
  +++ http_protocol.c   1999/10/11 22:07:25 1.19
  @@ -795,7 +795,7 @@
* read().  B_SAFEREAD ensures that the BUFF layer flushes if it will
* have to block during a read.
*/
  -/* TODO: re ap_context_t mplement SAFEREAD external to BUFF using a 
layer */
  +/* TODO: reimplement SAFEREAD external to BUFF using a layer */
   /* //ap_bsetflag(conn->client, B_SAFEREAD, 1); */
   ap_bflush(conn->client);
   while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) {
  @@ -1533,7 +1533,7 @@
   ap_table_do((int (*)(void *, const char *, const char 
*))uniq_field_values,
(void *) varies, r->headers_out, "Vary", NULL);
   
  -/* If we found any, replace old Vary fields with unique ap_context_t 
fied value */
  +/* If we found any, replace old Vary fields with unique-ified value */
   
   if (varies->nelts > 0) {
ap_table_setn(r->headers_out, "Vary",
  @@ -2057,7 +2057,7 @@
   }
   
   
  -/* TODO: re ap_context_t mplement ap_send_fb */
  +/* TODO: reimplement ap_send_fb */
   #if 0
   /*
* Send the body of a response to the client.
  
  
  
  1.7   +1 -1  apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- http_request.c1999/10/04 16:37:53 1.6
  +++ http_request.c1999/10/11 22:07:27 1.7
  @@ -1260,7 +1260,7 @@
* this packet, then it'll 

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

1999-10-11 Thread martin
martin  99/10/11 14:54:43

  Modified:src/main http_config.c
  Log:
  Typo
  
  Revision  ChangesPath
  1.14  +2 -2  apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- http_config.c 1999/10/07 20:47:52 1.13
  +++ http_config.c 1999/10/11 21:54:40 1.14
  @@ -488,7 +488,7 @@
*
*  Notes: 1. ap_add_module() would already complain if no more space
*exists for adding a dynamically loaded module
  - * 2. ap_add_module() accepts double ap_context_t nclusion, so 
we have
  + * 2. ap_add_module() accepts double inclusion, so we have
*to accept this, too.
*/
   for (m = ap_loaded_modules; *m != NULL; m++)
  @@ -1424,7 +1424,7 @@
   {
   int n;
   
  -printf("Compiled ap_context_t n modules:\n");
  +printf("Compiled in modules:\n");
   for (n = 0; ap_loaded_modules[n]; ++n)
printf("  %s\n", ap_loaded_modules[n]->name);
   }
  
  
  


cvs commit: apache-1.3/src/modules/proxy mod_proxy.h mod_proxy.c

1999-10-11 Thread martin
martin  99/10/11 14:33:37

  Modified:src  CHANGES
   src/modules/proxy mod_proxy.h mod_proxy.c
  Log:
  Graham submitted a patch which fixes a problem with the proxy
  configuration where globally set configuration options were
  overridden inside virtual hosts.
  Also, ProxyReceiveBufferSize default values were left uninitialised.
  
  Submitted by: Graham Leggett <[EMAIL PROTECTED]>
  Reviewed by:  Martin Kraemer
  
  Revision  ChangesPath
  1.1436+7 -0  apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1435
  retrieving revision 1.1436
  diff -u -r1.1435 -r1.1436
  --- CHANGES   1999/09/27 20:38:32 1.1435
  +++ CHANGES   1999/10/11 21:33:30 1.1436
  @@ -1,5 +1,12 @@
   Changes with Apache 1.3.10
   
  +  *) Fix problem with proxy configuration where globally set configuration
  + options were overridden inside virtual hosts.
  + [Graham Leggett <[EMAIL PROTECTED]>]
  +
  +  *) Fix ProxyReceiveBufferSize where default value was left uninitialised.
  + [Graham Leggett <[EMAIL PROTECTED]>]
  +
 *) Added a CLF '-' respecting %B to the log format.
Suggested by Ragnar Kjørstad [dirkx]
   
  
  
  
  1.44  +11 -0 apache-1.3/src/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/mod_proxy.h,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- mod_proxy.h   1999/02/07 20:48:31 1.43
  +++ mod_proxy.h   1999/10/11 21:33:34 1.44
  @@ -193,13 +193,21 @@
   struct cache_conf {
   const char *root;/* the location of the cache directory 
*/
   off_t space; /* Maximum cache size (in 1024 bytes) */
  +char space_set;
   time_t maxexpire;/* Maximum time to keep cached files in 
secs */
  +char maxexpire_set;
   time_t defaultexpire;/* default time to keep cached file in secs */
  +char defaultexpire_set;
   double lmfactor; /* factor for estimating expires date */
  +char lmfactor_set;
   time_t gcinterval;   /* garbage collection interval, in 
seconds */
  +char gcinterval_set;
   int dirlevels;   /* Number of levels of subdirectories */
  +char dirlevels_set;
   int dirlength;   /* Length of subdirectory names */
  +char dirlength_set;
   float cache_completion;  /* Force cache completion after this point */
  +char cache_completion_set;
   };
   
   typedef struct {
  @@ -213,13 +221,16 @@
   array_header *allowed_connect_ports;
   char *domain;/* domain name to use in absence of a domain 
name in the request */
   int req; /* true if proxy requests are enabled */
  +char req_set;
   enum {
 via_off,
 via_on,
 via_block,
 via_full
   } viaopt;   /* how to deal with proxy Via: headers */
  +char viaopt_set;
   size_t recv_buffer_size;
  +char recv_buffer_size_set;
   } proxy_server_conf;
   
   struct hdr_entry {
  
  
  
  1.66  +60 -1 apache-1.3/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- mod_proxy.c   1999/03/10 17:42:46 1.65
  +++ mod_proxy.c   1999/10/11 21:33:35 1.66
  @@ -417,22 +417,69 @@
   ps->allowed_connect_ports = ap_make_array(p, 10, sizeof(int));
   ps->domain = NULL;
   ps->viaopt = via_off; /* initially backward compatible with 1.3.1 */
  +ps->viaopt_set = 0; /* 0 means default */
   ps->req = 0;
  +ps->req_set = 0;
  +ps->recv_buffer_size = 0; /* this default was left unset for some reason 
*/
  +ps->recv_buffer_size_set = 0;
   
   ps->cache.root = NULL;
   ps->cache.space = DEFAULT_CACHE_SPACE;
  +ps->cache.space_set = 0;
   ps->cache.maxexpire = DEFAULT_CACHE_MAXEXPIRE;
  +ps->cache.maxexpire_set = 0;
   ps->cache.defaultexpire = DEFAULT_CACHE_EXPIRE;
  +ps->cache.defaultexpire_set = 0;
   ps->cache.lmfactor = DEFAULT_CACHE_LMFACTOR;
  +ps->cache.lmfactor_set = 0;
   ps->cache.gcinterval = -1;
  +ps->cache.gcinterval_set = 0;
   /* at these levels, the cache can have 2^18 directories (256,000)  */
   ps->cache.dirlevels = 3;
  +ps->cache.dirlevels_set = 0;
   ps->cache.dirlength = 1;
  +ps->cache.dirlength_set = 0;
   ps->cache.cache_completion = DEFAULT_CACHE_COMPLETION;
  +ps->cache.cache_completion_set = 0;
   
   return ps;
   }
   
  +static void *
  + merge_proxy_config(pool 

cvs commit: apache-1.3 STATUS

1999-10-11 Thread stoddard
stoddard99/10/11 14:27:54

  Modified:.STATUS
  Log:
  Thoughts?
  
  Revision  ChangesPath
  1.757 +12 -1 apache-1.3/STATUS
  
  Index: STATUS
  ===
  RCS file: /home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.756
  retrieving revision 1.757
  diff -u -r1.756 -r1.757
  --- STATUS1999/10/07 14:00:06 1.756
  +++ STATUS1999/10/11 21:27:48 1.757
  @@ -1,5 +1,5 @@
 1.3 STATUS:
  -  Last modified at [$Date: 1999/10/07 14:00:06 $]
  +  Last modified at [$Date: 1999/10/11 21:27:48 $]
   
   Release:
   
  @@ -350,6 +350,17 @@
Ken: What's W95-specific about it?
   
Help:
  +* There are several PRs reporting Apache looping and they each seem to
  +  implicate CGI script processing. The first PR happened about the time
  +  we migrated to using native Win32 function calls to create the child 
  +  process. I have tried to recreate the problem w/o success. It just now
  +  occurs to me that there may be a race condition between when the new
  +  process comes alive and the parent sending data to (or attempting to
  +  read data from) the child process. CreateProcess() returns immediately,
  +  before the new process is created. The parent may be attempting I/O
  +  with the child before it's ready. TODO: investigate ways to cause the
  +  parent to wait for the child process to become fully active before
  +  proceeding with CGI I/O processing.
   
   * should trap ^C when running not-as-service and do proper shutdown
   
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 13:44:33

  Modified:src/modules/standard mod_cgi.c
  Log:
  First cut at migrating mod_cgi over to APR. Still needs some work to make it 
Win32 friendly (use named pipes, etc.)
  Submitted by: Paul Reder
  Reviewed by: Bill Stoddard
  
  Revision  ChangesPath
  1.6   +109 -69   apache-2.0/src/modules/standard/mod_cgi.c
  
  Index: mod_cgi.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_cgi.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_cgi.c 1999/08/31 05:33:46 1.5
  +++ mod_cgi.c 1999/10/11 20:44:28 1.6
  @@ -166,7 +166,7 @@
   static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret,
   int show_errno, char *error)
   {
  -FILE *f;
  +ap_file_t *f;
   struct stat finfo;
   
   ap_log_rerror(APLOG_MARK, show_errno|APLOG_ERR, r, 
  @@ -175,20 +175,20 @@
   if (!conf->logname ||
((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
 &&   (finfo.st_size > conf->logbytes)) ||
  - ((f = ap_pfopen(r->pool, ap_server_root_relative(r->pool, 
conf->logname),
  -   "a")) == NULL)) {
  +  (ap_open(&f, r->pool, ap_server_root_relative(r->pool, 
conf->logname),
  +   APR_APPEND | APR_BUFFERED, APR_OS_DEFAULT) != 
APR_SUCCESS)) {
return ret;
   }
   
   /* "%% [Wed Jun 19 10:53:21 1996] GET /cgi-bin/printenv HTTP/1.0" */
  -fprintf(f, " [%s] %s %s%s%s %s\n", ap_get_time(), r->method, r->uri,
  +ap_fprintf(f, " [%s] %s %s%s%s %s\n", ap_get_time(), r->method, 
r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
   /* "%% 500 /usr/local/apache/cgi-bin */
  -fprintf(f, " %d %s\n", ret, r->filename);
  +ap_fprintf(f, " %d %s\n", ret, r->filename);
   
  -fprintf(f, "%%error\n%s\n", error);
  +ap_fprintf(f, "%%error\n%s\n", error);
   
  -ap_pfclose(r->pool, f);
  +ap_close(f);
   return ret;
   }
   
  @@ -196,17 +196,17 @@
  char *dbuf, const char *sbuf, BUFF *script_in, BUFF 
*script_err)
   {
   ap_array_header_t *hdrs_arr = ap_table_elts(r->headers_in);
  -table_entry *hdrs = (table_entry *) hdrs_arr->elts;
  +ap_table_entry_t *hdrs = (ap_table_entry_t *) hdrs_arr->elts;
   char argsbuffer[HUGE_STRING_LEN];
  -FILE *f;
  +ap_file_t *f;
   int i;
   struct stat finfo;
   
   if (!conf->logname ||
((stat(ap_server_root_relative(r->pool, conf->logname), &finfo) == 0)
 &&   (finfo.st_size > conf->logbytes)) ||
  - ((f = ap_pfopen(r->pool, ap_server_root_relative(r->pool, 
conf->logname),
  -   "a")) == NULL)) {
  + (ap_open(&f, r->pool, ap_server_root_relative(r->pool, 
conf->logname),
  +  APR_APPEND, APR_OS_DEFAULT) != APR_SUCCESS)) {
/* Soak up script output */
while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0)
continue;
  @@ -227,55 +227,55 @@
   }
   
   /* "%% [Wed Jun 19 10:53:21 1996] GET /cgi-bin/printenv HTTP/1.0" */
  -fprintf(f, " [%s] %s %s%s%s %s\n", ap_get_time(), r->method, r->uri,
  +ap_fprintf(f, " [%s] %s %s%s%s %s\n", ap_get_time(), r->method, 
r->uri,
r->args ? "?" : "", r->args ? r->args : "", r->protocol);
   /* "%% 500 /usr/local/apache/cgi-bin" */
  -fprintf(f, " %d %s\n", ret, r->filename);
  +ap_fprintf(f, " %d %s\n", ret, r->filename);
   
  -fputs("%request\n", f);
  +ap_puts("%request\n", f);
   for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
  - fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
  + ap_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
   }
   if ((r->method_number == M_POST || r->method_number == M_PUT)
&& *dbuf) {
  - fprintf(f, "\n%s\n", dbuf);
  + ap_fprintf(f, "\n%s\n", dbuf);
   }
   
  -fputs("%response\n", f);
  +ap_puts("%response\n", f);
   hdrs_arr = ap_table_elts(r->err_headers_out);
  -hdrs = (table_entry *) hdrs_arr->elts;
  +hdrs = (ap_table_entry_t *) hdrs_arr->elts;
   
   for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
continue;
  - fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
  + ap_fprintf(f, "%s: %s\n", hdrs[i].key, hdrs[i].val);
   }
   
   if (sbuf && *sbuf)
  - fprintf(f, "%s\n", sbuf);
  + ap_fprintf(f, "%s\n", sbuf);
   
   if (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0) {
  - fputs("%stdout\n", f);
  - fputs(argsbuffer, f);
  + ap_puts("%stdout\n", f);
  + ap_puts(argsbuffer, f);
while (ap_bgets(argsbuffer, HUGE_STRING_LEN, script_in) > 0)
  - fputs(argsbuffer, f);
  - fputs("\n", f);
  + ap_puts(argsbuffer, f);
  + ap_p

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 Configure

1999-10-11 Thread rbb
rbb 99/10/11 12:45:46

  Modified:src  Configure
  Log:
  Make sure APRLIB is in the correct order.  Without this change, we get
  undefined externals.  The next step is to make one big APR lib file.
  
  Revision  ChangesPath
  1.13  +1 -1  apache-2.0/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/src/Configure,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Configure 1999/10/11 14:20:36 1.12
  +++ Configure 1999/10/11 19:45:44 1.13
  @@ -1748,7 +1748,7 @@
   fi
   cd ../..
   APRLIB=""
  -for lib in network threadproc file misc apr time lock sig; do
  +for lib in network threadproc file apr time lock sig misc; do
APRLIB="$APRLIB \$(SRCDIR)/lib/apr/libs/lib${lib}.a"
   done
   CFLAGS="$CFLAGS -I\$(SRCDIR)/lib/apr/include"
  
  
  


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

1999-10-11 Thread rbb
rbb 99/10/11 10:57:13

  Modified:src/lib/apr/locks/unix locks.c
  Log:
  This avoids a seg fault when using locks on some unixes.  The problem is,
  if we pass in a NULL for the filename when creating a lock, we will seg
  fault.  This is not a permanent solution, but at least the server works with
  this change.
  
  Revision  ChangesPath
  1.9   +7 -1  apache-2.0/src/lib/apr/locks/unix/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/locks.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- locks.c   1999/10/11 17:51:51 1.8
  +++ locks.c   1999/10/11 17:57:07 1.9
  @@ -87,7 +87,13 @@
   
   new->cntxt = cont;
   new->type = type;
  -new->fname = strdup(fname);
  +if (fname != NULL) {
  +new->fname = strdup(fname);
  +}
  +else {
  +new->fname = strdup(tempnam(NULL, NULL));
  +unlink(new->fname);
  +}
   
   if (type != APR_CROSS_PROCESS) {
   if ((stat = create_intra_lock(new)) != APR_SUCCESS) {
  
  
  


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

1999-10-11 Thread rbb
rbb 99/10/11 10:52:29

  Modified:src/lib/apr/include apr_portable.h apr_thread_proc.h
   src/lib/apr/locks/unix locks.c
   src/lib/apr/test testproc.c testsig.c testsock.c
testthread.c
   src/lib/apr/threadproc/beos proc.c procsup.c thread.c
threadcancel.c threadpriv.c
   src/lib/apr/threadproc/os2 proc.c thread.c threadcancel.c
threadpriv.c
   src/lib/apr/threadproc/unix proc.c procsup.c thread.c
threadcancel.c threadpriv.c
   src/lib/apr/threadproc/win32 proc.c thread.c threadcancel.c
threadpriv.c
   src/lib/apr/time/unix time.c
   src/main http_log.c
  Log:
  This finishes the argument swaps.  The docs haven't been updated, and
  probably won't be for a while yet.  These argument orders have been
  documented in the APR Design doc committed earlier today.
  
  Revision  ChangesPath
  1.8   +4 -4  apache-2.0/src/lib/apr/include/apr_portable.h
  
  Index: apr_portable.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_portable.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_portable.h1999/10/10 20:34:54 1.7
  +++ apr_portable.h1999/10/11 17:51:47 1.8
  @@ -183,11 +183,11 @@
   ap_status_t ap_get_os_file(ap_os_file_t *, ap_file_t *); 
   ap_status_t ap_get_os_dir(ap_os_dir_t *, ap_dir_t *);  
   ap_status_t ap_get_os_sock(ap_os_sock_t *, ap_socket_t *);
  -ap_status_t ap_get_os_lock(ap_lock_t *, ap_os_lock_t *); 
  -ap_status_t ap_get_os_thread(ap_thread_t *, ap_os_thread_t *);
  -ap_status_t ap_get_os_proc(ap_proc_t *, ap_os_proc_t *); 
  +ap_status_t ap_get_os_lock(ap_os_lock_t *, ap_lock_t *); 
  +ap_status_t ap_get_os_thread(ap_os_thread_t *, ap_thread_t *);
  +ap_status_t ap_get_os_proc(ap_os_proc_t *, ap_proc_t *); 
   ap_status_t ap_get_os_time(ap_os_time_t **, ap_time_t *); 
  -ap_status_t ap_get_os_threadkey(ap_key_t *, ap_os_threadkey_t *);
  +ap_status_t ap_get_os_threadkey(ap_os_threadkey_t *, ap_key_t *);
   
   ap_status_t ap_put_os_file(ap_file_t **, ap_os_file_t *, ap_context_t *); 
   ap_status_t ap_put_os_dir(ap_dir_t **, ap_os_dir_t *, ap_context_t *); 
  
  
  
  1.8   +19 -19apache-2.0/src/lib/apr/include/apr_thread_proc.h
  
  Index: apr_thread_proc.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_thread_proc.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_thread_proc.h 1999/10/11 14:20:39 1.7
  +++ apr_thread_proc.h 1999/10/11 17:51:48 1.8
  @@ -86,27 +86,27 @@
   ap_status_t ap_create_threadattr(ap_threadattr_t **, ap_context_t *);
   ap_status_t ap_setthreadattr_detach(ap_threadattr_t *, ap_int32_t);
   ap_status_t ap_getthreadattr_detach(ap_threadattr_t *);
  -ap_status_t ap_create_thread(ap_context_t *, ap_threadattr_t *, 
  - ap_thread_start_t, void *, ap_thread_t **);
  +ap_status_t ap_create_thread(ap_thread_t **, ap_threadattr_t *, 
  + ap_thread_start_t, void *, ap_context_t *);
   ap_status_t ap_thread_exit(ap_thread_t *, ap_status_t *);
  -ap_status_t ap_thread_join(ap_thread_t *thd, ap_status_t *); 
  +ap_status_t ap_thread_join(ap_status_t *, ap_thread_t *thd); 
   ap_status_t ap_thread_detach(ap_thread_t *);
   
   ap_status_t ap_cancel_thread(ap_thread_t *);
  -ap_status_t ap_setcanceltype(ap_context_t *, ap_int32_t);
  -ap_status_t ap_setcancelstate(ap_context_t *, ap_int32_t);
  -ap_status_t ap_get_threaddata(ap_thread_t *, char *, void *);
  -ap_status_t ap_set_threaddata(ap_thread_t *, void *, char *,
  -  ap_status_t (*cleanup) (void *));
  +ap_status_t ap_setcanceltype(ap_int32_t, ap_context_t *);
  +ap_status_t ap_setcancelstate(ap_int32_t, ap_context_t *);
  +ap_status_t ap_get_threaddata(void *, char *, ap_thread_t *);
  +ap_status_t ap_set_threaddata(void *, char *,
  +  ap_status_t (*cleanup) (void *), ap_thread_t 
*);
   
  -ap_status_t ap_create_thread_private(ap_context_t *, void (*dest)(void *), 
  - ap_key_t **);
  +ap_status_t ap_create_thread_private(ap_key_t **, void (*dest)(void *), 
  + ap_context_t *);
   ap_status_t ap_get_thread_private(void **, ap_key_t *);
  -ap_status_t ap_set_thread_private(ap_key_t *, void *);
  +ap_status_t ap_set_thread_private(void *, ap_key_t *);
   ap_status_t ap_delete_thread_private(ap_key_t *);
  -ap_status_t ap_get_threadkeydata(ap_key_t *, char *, void *);
  -ap_status_t ap_set_threadkeydata(ap_key_t *, void *, char *,
  - ap_status_t (*cleanup) (void *));
  +ap_status_t ap

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

1999-10-11 Thread stoddard
stoddard99/10/11 10:33:25

  Modified:src/modules/mpm/winnt winnt.c
  Log:
  Apply Ben H's patch to the winnt mpm...
  
  Well this was thought provoking.
  
  Drive out the use of malloc in two places.
  
  In listen.c, using the global process pool instead.  That changes the
  API into listen so that a process is passed in rather than the config
  pool.  That's all was easy.
  
  The pain is propogating a change into all N of the mpm, they
  are all similar but different in their use of listen.c  There
  is a lot to dislike about similar but code scattered code.
  
  I changed the N setup_listener routines, they now take only
  the server since they can dig the config and global pool
  out of there.
  
  Free today: ap_setup_prelinked_modules now takes the process so it
  can allocate it's table in the process's pool rathern than use
  malloc.
  
  Revision  ChangesPath
  1.20  +7 -7  apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- winnt.c   1999/10/11 15:40:00 1.19
  +++ winnt.c   1999/10/11 17:33:24 1.20
  @@ -364,7 +364,7 @@
   }
   return NULL;
   }
  -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;
  @@ -373,7 +373,7 @@
   /* Setup the listeners */
   FD_ZERO(&listenfds);
   
  -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) {
  @@ -393,7 +393,7 @@
   return num_listeners;
   }
   
  -static int setup_inherited_listeners(ap_context_t *p, server_rec *s)
  +static int setup_inherited_listeners(server_rec *s)
   {
   WSAPROTOCOL_INFO WSAProtocolInfo;
   HANDLE pipe;
  @@ -409,7 +409,7 @@
   
   if (ap_listeners == NULL) {
   ap_listen_rec *lr;
  -lr = malloc(sizeof(ap_listen_rec));
  +lr = ap_palloc(s->process->pool, sizeof(ap_listen_rec));
   if (!lr)
   return 0;
   lr->sd = NULL;
  @@ -1037,10 +1037,10 @@
   
   /* start_mutex obtained, continue into the select() loop */
   if (one_process) {
  -setup_listeners(pconf, server_conf);
  +setup_listeners(server_conf);
   } else {
   /* Get listeners from the parent process */
  -setup_inherited_listeners(pconf, server_conf);
  +setup_inherited_listeners(server_conf);
   }
   
   if (listenmaxfd == INVALID_SOCKET) {
  @@ -1391,7 +1391,7 @@
   HANDLE process_handles[MAX_PROCESSES];
   HANDLE process_kill_events[MAX_PROCESSES];
   
  -setup_listeners(pconf, s);
  +setup_listeners(s);
   
   /* Create child process 
* Should only be one in this version of Apache for WIN32 
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 08:53:55

  Modified:src/lib/apr/locks/win32 locks.c
  Log:
  Arg swap.
  
  Revision  ChangesPath
  1.9   +1 -1  apache-2.0/src/lib/apr/locks/win32/locks.c
  
  Index: locks.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/win32/locks.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- locks.c   1999/10/08 20:03:54 1.8
  +++ locks.c   1999/10/11 15:53:52 1.9
  @@ -187,7 +187,7 @@
   }
   }
   
  -ap_status_t ap_get_os_lock(ap_os_lock_t *thelock, struct lock_t *lock)
  +ap_status_t ap_get_os_lock(struct lock_t *lock, ap_os_lock_t *thelock)
   {
   if (lock == NULL) {
   return APR_ENOFILE;
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 08:47:47

  Modified:src  ApacheCore.def
   src/lib/apr aprlib.def
  Log:
  Update win32 exports files
  
  Revision  ChangesPath
  1.6   +3 -3  apache-2.0/src/ApacheCore.def
  
  Index: ApacheCore.def
  ===
  RCS file: /home/cvs/apache-2.0/src/ApacheCore.def,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ApacheCore.def1999/10/05 04:51:10 1.5
  +++ ApacheCore.def1999/10/11 15:47:45 1.6
  @@ -263,8 +263,8 @@
   ;ap_vsnprintf   @256
closedir   @257
opendir   @258
  - os_spawnv   @259
  - os_spawnve   @260
  +;os_spawnv   @259
  +;os_spawnve   @260
os_stat   @261
readdir   @262
regcomp   @263
  @@ -312,7 +312,7 @@
;includes_module  @305   
mime_module   @306
negotiation_module @307  
  - os_spawnle   @308
  +;os_spawnle   @308
setenvif_module  @309 
;so_module   @310
top_module   @311
  
  
  
  1.2   +1 -1  apache-2.0/src/lib/apr/aprlib.def
  
  Index: aprlib.def
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/aprlib.def,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- aprlib.def1999/10/05 04:19:19 1.1
  +++ aprlib.def1999/10/11 15:47:46 1.2
  @@ -208,4 +208,4 @@
ap_snprintf   @200
ap_vsnprintf   @201
ap_getpass   @202
  -
  + ap_ungetc @203
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 08:40:03

  Modified:src/modules/mpm/winnt winnt.c
  Log:
  Yarg... more argument swaps...
  
  Revision  ChangesPath
  1.19  +5 -5  apache-2.0/src/modules/mpm/winnt/winnt.c
  
  Index: winnt.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/winnt/winnt.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- winnt.c   1999/10/10 20:35:06 1.18
  +++ winnt.c   1999/10/11 15:40:00 1.19
  @@ -1059,7 +1059,7 @@
   }
   
   allowed_globals.jobsemaphore = create_semaphore(0);
  -ap_create_lock(pchild, APR_MUTEX, APR_INTRAPROCESS, NULL, 
&allowed_globals.jobmutex);
  +ap_create_lock(&allowed_globals.jobmutex, APR_MUTEX, APR_INTRAPROCESS, 
NULL, pchild);
   
   /* spawn off accept thread (WIN9x only) */
   if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {
  @@ -1312,7 +1312,7 @@
   lpWSAProtocolInfo = ap_pcalloc(p, sizeof(WSAPROTOCOL_INFO));
   ap_log_error(APLOG_MARK, APLOG_NOERRNO | APLOG_INFO, server_conf,
"Parent: Duplicating socket %d and sending it to 
child process %d", lr->sd, pi.dwProcessId);
  -ap_get_os_sock(lr->sd,&nsd);
  +ap_get_os_sock(&nsd,lr->sd);
   if (WSADuplicateSocket(nsd, 
  pi.dwProcessId,
  lpWSAProtocolInfo) == SOCKET_ERROR) {
  @@ -1567,11 +1567,11 @@
   exit_event_name = ap_psprintf(pconf, "apC%d", my_pid);
   setup_signal_names(ap_psprintf(pconf,"ap%d", parent_pid));
   if (one_process) {
  -ap_create_lock(pconf,APR_MUTEX, 
APR_CROSS_PROCESS,signal_name_prefix,&start_mutex);
  +ap_create_lock(&start_mutex,APR_MUTEX, 
APR_CROSS_PROCESS,signal_name_prefix,pconf);
   exit_event = create_exit_event(exit_event_name);
   }
   else {
  -ap_child_init_lock(&start_mutex, pconf, signal_name_prefix);
  +ap_child_init_lock(&start_mutex, signal_name_prefix, pconf);
   exit_event = open_event(exit_event_name);
   }
   ap_assert(start_mutex);
  @@ -1623,7 +1623,7 @@
* Ths start mutex is used during a restart to prevent more than 
one 
* child process from entering the accept loop at once.
*/
  -ap_create_lock(pconf,APR_MUTEX, 
APR_CROSS_PROCESS,signal_name_prefix,&start_mutex);
  +ap_create_lock(&start_mutex,APR_MUTEX, 
APR_CROSS_PROCESS,signal_name_prefix,pconf);
   /* TODO: Add some code to detect failure */
   }
   
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 08:31:49

  Modified:src/lib/apr/lib apr_pools.c
  Log:
  Ooops, missed an argument swap on the create_locks call.
  
  Revision  ChangesPath
  1.16  +4 -6  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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- apr_pools.c   1999/10/11 15:28:02 1.15
  +++ apr_pools.c   1999/10/11 15:31:48 1.16
  @@ -542,12 +542,10 @@
   known_stack_point = &s;
   stack_var_init(&s);
   #endif
  -ap_create_lock(NULL, APR_MUTEX, APR_INTRAPROCESS,
  -   NULL,
  -   &alloc_mutex);
  -ap_create_lock(NULL, APR_MUTEX, APR_INTRAPROCESS,
  -   NULL,
  -   &spawn_mutex);
  +ap_create_lock(&alloc_mutex, APR_MUTEX, APR_INTRAPROCESS,
  +   NULL, NULL);
  +ap_create_lock(&spawn_mutex, APR_MUTEX, APR_INTRAPROCESS,
  +   NULL, NULL);
   
   permanent_pool = ap_make_sub_pool(NULL);
   #ifdef ALLOC_STATS
  
  
  


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

1999-10-11 Thread stoddard
stoddard99/10/11 08:28:03

  Modified:src/lib/apr/lib apr_pools.c
  Log:
  Migrate pool locking to use apr locks.
  
  Revision  ChangesPath
  1.15  +25 -18apache-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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- apr_pools.c   1999/10/11 14:20:41 1.14
  +++ apr_pools.c   1999/10/11 15:28:02 1.15
  @@ -71,6 +71,7 @@
   #include "apr_general.h"
   #include "apr_pools.h"
   #include "apr_lib.h"
  +#include "apr_lock.h"
   #include "misc.h"
   #ifdef HAVE_SYS_STAT_H
   #include 
  @@ -204,9 +205,10 @@
* Static cells for managing our internal synchronisation.
*/
   static union block_hdr *block_freelist = NULL;
  -static ap_mutex_t *alloc_mutex = NULL;
  -static ap_mutex_t *spawn_mutex = NULL;
   
  +static ap_lock_t *alloc_mutex;
  +static ap_lock_t *spawn_mutex;
  +
   #ifdef POOL_DEBUG
   static char *known_stack_point;
   static int stack_direction;
  @@ -337,7 +339,7 @@
return; /* Sanity check --- freeing empty pool? */
   }
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
   old_free_list = block_freelist;
   block_freelist = blok;
   
  @@ -385,7 +387,7 @@
   num_blocks_freed += num_blocks;
   #endif /* ALLOC_STATS */
   
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   #endif /* ALLOC_USE_MALLOC */
   }
   
  @@ -475,7 +477,7 @@
   
   ap_block_alarms();
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
   
   blok = new_block(POOL_HDR_BYTES);
   new_pool = (ap_pool_t *) blok->h.first_avail;
  @@ -497,7 +499,7 @@
p->sub_pools = new_pool;
   }
   
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   ap_unblock_alarms();
   
   return new_pool;
  @@ -540,8 +542,13 @@
   known_stack_point = &s;
   stack_var_init(&s);
   #endif
  -alloc_mutex = ap_create_mutex(NULL);
  -spawn_mutex = ap_create_mutex(NULL);
  +ap_create_lock(NULL, APR_MUTEX, APR_INTRAPROCESS,
  +   NULL,
  +   &alloc_mutex);
  +ap_create_lock(NULL, APR_MUTEX, APR_INTRAPROCESS,
  +   NULL,
  +   &spawn_mutex);
  +
   permanent_pool = ap_make_sub_pool(NULL);
   #ifdef ALLOC_STATS
   atexit(dump_stats);
  @@ -556,11 +563,11 @@
   {
   ap_block_alarms();
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
   while (a->sub_pools) {
ap_destroy_real_pool(a->sub_pools);
   }
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   /*
* Don't hold the mutex during cleanups.
*/
  @@ -600,8 +607,8 @@
   {
   ap_block_alarms();
   ap_clear_real_pool(a);
  +ap_lock(alloc_mutex);
   
  -(void) ap_acquire_mutex(alloc_mutex);
   if (a->parent) {
if (a->parent->sub_pools == a) {
a->parent->sub_pools = a->sub_next;
  @@ -613,7 +620,7 @@
a->sub_next->sub_prev = a->sub_prev;
}
   }
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   
   free_blocks(a->first);
   ap_unblock_alarms();
  @@ -821,7 +828,7 @@
   
   ap_block_alarms();
   
  -(void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
   
   blok = new_block(size);
   a->last->h.next = blok;
  @@ -830,7 +837,7 @@
   blok->h.owning_pool = a;
   #endif
   
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   
   ap_unblock_alarms();
   
  @@ -966,9 +973,9 @@
   cur_len = strp - blok->h.first_avail;
   
   /* must try another blok */
  -(void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
   nblok = new_block(2 * cur_len);
  -(void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   memcpy(nblok->h.first_avail, blok->h.first_avail, cur_len);
   ps->vbuff.curpos = nblok->h.first_avail + cur_len;
   /* save a byte for the NUL terminator */
  @@ -977,10 +984,10 @@
   /* did we allocate the current blok? if so free it up */
   if (ps->got_a_new_block) {
debug_fill(blok->h.first_avail, blok->h.endp - blok->h.first_avail);
  - (void) ap_acquire_mutex(alloc_mutex);
  +ap_lock(alloc_mutex);
blok->h.next = block_freelist;
block_freelist = blok;
  - (void) ap_release_mutex(alloc_mutex);
  +ap_unlock(alloc_mutex);
   }
   ps->blok = nblok;
   ps->got_a_new_block = 1;
  
  
  


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

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

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


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

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

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


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

1999-10-11 Thread rbb
rbb 99/10/11 07:20:48

  Modified:src  Configure
   src/include http_log.h
   src/lib/apr/file_io/unix open.c
   src/lib/apr/include apr_file_io.h apr_lib.h
apr_thread_proc.h
   src/lib/apr/lib apr_cpystrn.c apr_pools.c
   src/lib/apr/threadproc/unix proc.c
   src/main http_log.c
   src/os/beos os-inline.c os.c
   src/os/unix os-inline.c
   src/os/win32 util_win32.c
  Log:
  Make Apache use the new ap_create_process call.  This is the first of a
  group of patches.  This patch, allows the core server to compile and
  serve pages.  There is a set of patches which will follow to allow the
  standard modules to use ap_create_process.  This change should make
  writing code which spawns new processes easy to read and understand.
  Submitted by: Paul Reder
  
  Revision  ChangesPath
  1.12  +1 -1  apache-2.0/src/Configure
  
  Index: Configure
  ===
  RCS file: /home/cvs/apache-2.0/src/Configure,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Configure 1999/10/10 17:07:53 1.11
  +++ Configure 1999/10/11 14:20:36 1.12
  @@ -1748,7 +1748,7 @@
   fi
   cd ../..
   APRLIB=""
  -for lib in apr file network lock misc sig threadproc time; do
  +for lib in network threadproc file misc apr time lock sig; do
APRLIB="$APRLIB \$(SRCDIR)/lib/apr/libs/lib${lib}.a"
   done
   CFLAGS="$CFLAGS -I\$(SRCDIR)/lib/apr/include"
  
  
  
  1.5   +1 -1  apache-2.0/src/include/http_log.h
  
  Index: http_log.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/http_log.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http_log.h1999/09/08 14:15:40 1.4
  +++ http_log.h1999/10/11 14:20:37 1.5
  @@ -138,7 +138,7 @@
   ap_context_t *p;
   #ifndef NO_RELIABLE_PIPED_LOGS
   char *program;
  -int pid;
  +ap_proc_t *pid;
   ap_file_t fds[2];
   #else
   ap_file_t *write_f;
  
  
  
  1.14  +14 -0 apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- open.c1999/10/06 23:03:46 1.13
  +++ open.c1999/10/11 14:20:38 1.14
  @@ -278,3 +278,17 @@
   return APR_SUCCESS;
   }   
   
  +/* ***APRDOC
  + * ap_status_t ap_ferror(ap_file_t *) 
  + *Is there an error on the stream?
  + * arg 1) The apr file we are testing.
  + * NOTE:  Returns -1 if the error indicator is set, APR_SUCCESS otherwise.
  + */
  +ap_status_t ap_ferror(ap_file_t *fptr)
  +{
  +if (ferror(fptr->filehand)) {
  +return (-1);
  +}
  +
  +return APR_SUCCESS;
  +}   
  
  
  
  1.11  +1 -0  apache-2.0/src/lib/apr/include/apr_file_io.h
  
  Index: apr_file_io.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_file_io.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- apr_file_io.h 1999/10/08 13:47:03 1.10
  +++ apr_file_io.h 1999/10/11 14:20:38 1.11
  @@ -111,6 +111,7 @@
   ap_status_t ap_close(ap_file_t *);
   ap_status_t ap_remove_file(char *, ap_context_t *);
   ap_status_t ap_eof(ap_file_t *);
  +ap_status_t ap_ferror(ap_file_t *);
   
   ap_status_t ap_read(ap_file_t *, void *, ap_ssize_t *);
   ap_status_t ap_write(ap_file_t *, void *, ap_ssize_t *);
  
  
  
  1.12  +3 -2  apache-2.0/src/lib/apr/include/apr_lib.h
  
  Index: apr_lib.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_lib.h,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- apr_lib.h 1999/10/08 13:47:04 1.11
  +++ apr_lib.h 1999/10/11 14:20:38 1.12
  @@ -164,6 +164,8 @@
* Define the prototypes for the various APR GP routines.
*/
   API_EXPORT(char *) ap_cpystrn(char *d, const char *s, size_t l);
  +API_EXPORT(int) ap_tokenize_to_argv(ap_context_t *token_context,
  +char *arg_str, char ***argv_out);
   /*API_EXPORT(ap_mutex_t *) ap_create_mutex(void *m);*/
   API_EXPORT(int) ap_slack(int l, int h);
   API_EXPORT_NONSTD(int) ap_execle(const char *c, const char *a, ...);
  @@ -371,9 +373,8 @@
   API_EXPORT(ap_status_t) ap_getpass(const char *prompt, char *pwbuf, size_t 
*bufsize);
   API_EXPORT_NONSTD(ap_status_t) ap_null_cleanup(void *data);
   
  -/*API_EXPORT(void) ap_note_subprocess(ap_pool_t *a, pid_t pid,
  +API_EXPORT(v

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

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

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


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

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

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


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

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

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


cvs commit: apache-site/contributors index.html

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

  Modified:contributors index.html
  Log:
  Add in my details.
  
  Revision  ChangesPath
  1.77  +12 -1 apache-site/contributors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/contributors/index.html,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- index.html1999/10/10 23:45:40 1.76
  +++ index.html1999/10/11 04:20:33 1.77
  @@ -58,7 +58,8 @@
Rob Hartill
general trouble maker, comments to offend all.
   
  - Brian Havard
  + Brian Havard
  + OS/2 porting.
   
Ben Hyde
   
  @@ -318,6 +319,16 @@
   Occupation: Post-doc PERL guru
   Location: Los Alamos, New Mexico, Good Old US of A
   Comments: write it in PERL
  +
  +
  +
  +Name:   Brian Havard
  +Email:  mailto:[EMAIL 
PROTECTED]">[EMAIL PROTECTED]
  +URL:http://silk.apana.org.au";>http://silk.apana.org.au
  +Occupation: Software Engineer
  +OS Expertise:   OS/2
  +Location:   Melbourne, Australia
  +Contributions:  Maintenance of http://silk.apana.org.au/apache/";>OS/2 port
   
   
   
  
  
  


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

1999-10-11 Thread rbb
rbb 99/10/10 18:39:25

  Modified:src/lib/apr/include apr_general.h
   src/lib/apr/signal/beos signal.c
   src/lib/apr/signal/unix signal.c
   src/lib/apr/signal/win32 signal.c
   src/lib/apr/test testsig.c
  Log:
  Bring signals up to the current APR parameter order spec.
  
  Revision  ChangesPath
  1.7   +3 -3  apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- apr_general.h 1999/10/08 20:03:45 1.6
  +++ apr_general.h 1999/10/11 01:39:21 1.7
  @@ -233,9 +233,9 @@
   ap_status_t ap_get_userdata(void **, char *, ap_context_t *);
   ap_status_t ap_initialize(void);
   
  -ap_status_t ap_create_signal(ap_context_t *, ap_signum_t);
  -ap_status_t ap_send_signal(ap_context_t *, ap_signum_t);
  -ap_status_t ap_setup_signal(ap_context_t *, ap_signum_t, Sigfunc *);
  +ap_status_t ap_create_signal(ap_signum_t, ap_context_t *);
  +ap_status_t ap_send_signal(ap_signum_t, ap_context_t *);
  +ap_status_t ap_setup_signal(ap_signum_t, Sigfunc *, ap_context_t *);
   
   ap_status_t ap_getopt(ap_context_t *, ap_int32_t, char *const *, const char 
*,
 ap_int32_t *); 
  
  
  
  1.3   +3 -3  apache-2.0/src/lib/apr/signal/beos/signal.c
  
  Index: signal.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/signal/beos/signal.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- signal.c  1999/09/07 13:16:59 1.2
  +++ signal.c  1999/10/11 01:39:22 1.3
  @@ -58,7 +58,7 @@
   #include 
   #include 
   
  -ap_status_t ap_create_signal(ap_context_t *cont, ap_signum_t signum)
  +ap_status_t ap_create_signal(ap_signum_t signum, ap_context_t *cont)
   {
   return APR_SUCCESS;
   }
  @@ -68,7 +68,7 @@
* that is solved, this will change here.
*/

  -ap_status_t ap_send_signal(ap_context_t *cont, ap_signum_t signum)
  +ap_status_t ap_send_signal(ap_signum_t signum, ap_context_t *cont)
   {
   /* this function sends a signal to every thread within the current team
* except the one calling it! */
  @@ -84,7 +84,7 @@
}
   }
   
  -ap_setup_signal(ap_context_t *cont, ap_signum_t signum, Sigfunc *func)
  +ap_setup_signal(ap_signum_t signum, Sigfunc *func, ap_context_t *cont)
   {
   /* Thanks to Chris Tate at Be for the code below */
   sigset_t newset, oldset;
  
  
  
  1.3   +6 -6  apache-2.0/src/lib/apr/signal/unix/signal.c
  
  Index: signal.c
  ===
  RCS file: /home/cvs/apache-2.0/src/lib/apr/signal/unix/signal.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- signal.c  1999/09/12 11:12:54 1.2
  +++ signal.c  1999/10/11 01:39:23 1.3
  @@ -64,7 +64,7 @@
   #endif
   
   /* ***APRDOC
  - * ap_status_t ap_create_signal(ap_context_t *, ap_signum_t)
  + * ap_status_t ap_create_signal(ap_signum_t, ap_context_t *)
*Create a signal for use later on. 
* arg 1) The context to operate on.
* arg 2) The signal we are creating.  One of:
  @@ -73,13 +73,13 @@
*   This is for Windows to be able to send signals, so your program
*   won't be portable without it. 
*/  
   
  -ap_status_t ap_create_signal(ap_context_t *cont, ap_signum_t signum)
  +ap_status_t ap_create_signal(ap_signum_t signum, ap_context_t *cont)
   {
   return APR_SUCCESS;
   }
   
   /* ***APRDOC
  - * ap_status_t ap_send_signal(ap_context_t *, ap_signum_t)
  + * ap_status_t ap_send_signal(ap_signum_t, ap_context_t *)
*Send a signal to your process group 
* arg 1) The context to operate on.
* arg 2) The signal we are sending.  Same as above list
  @@ -87,7 +87,7 @@
*figured out how to send to individual children on Windows yet.  
When
*that is solved, this will change here.
*/
  -ap_status_t ap_send_signal(ap_context_t *cont, ap_signum_t signum)
  +ap_status_t ap_send_signal(ap_signum_t signum, ap_context_t *cont)
   {
   killpg(0, signum);
   return APR_SUCCESS;
  @@ -100,8 +100,8 @@
* arg 2) The signal we are expecting to receive.  Same as above list
* arg 3) The function to execute when this signal is received.
*/
  -ap_status_t ap_setup_signal(ap_context_t *cont, ap_signum_t signum,
  - Sigfunc *func)
  +ap_status_t ap_setup_signal(ap_signum_t signum, Sigfunc *func,
  +ap_context_t *cont)
   {
   sigset_t newset;
   
  
  
  
  1.2   +3 -

cvs commit: apache-2.0/src/lib/apr APRDesign

1999-10-11 Thread rbb
rbb 99/10/10 17:51:42

  Added:   src/lib/apr APRDesign
  Log:
  Add an APR design document.  This is not complete, but it does provide
  some basic rules that the current APR developers have been following.
  Feel free to comment on it.
  Reviewed by:  David Reid
  
  Revision  ChangesPath
  1.1  apache-2.0/src/lib/apr/APRDesign
  
  Index: APRDesign
  ===
  Design of APR
  
  The Apache Portable Run-time libraries have been designed to provide a common
  interface to low level routines across any platform.  The original goal of APR
  was to combine all code in Apache to one common code base.  This is not the
  correct approach however, so the goal of APR has changed.  
  
  There are places, where common code is not a good thing.  For example, how to
  map requests to either threads or processes, should be platform specific. 
  APR's place, is now to combine any code that can be safely combined, without
  sacrificing performance.
  
  To this end, we have created a set of operations that are required for cross
  platfrom development.  There may be other types that are desired, and those
  will be implemented in the future.  The first version of APR will focus on
  what Apache 2.0 needs.  Of course, anything that is submitted will be
  considered for inclusion.
  
  This document will discuss the structure of APR, and how best to contribute
  code to the effort.
  
  APR types
  
  The base types in APR
  file_io File I/O, including pipes
  lib A portable library originally used in Apache.  This contains
  memory management, tables, and arrays.
  locks   Mutex and reader/writer locks
  miscAny APR type which doesn't have any other place to belong
  network_io  Network I/O
  shmem   Shared Memory (Not currently implemented)   
  signal  Asynchronous Signals
  threadproc  Threads and Processes
  timeTime 
  
  Directory Structure
  
  Each type has a base directory.  Inside this base directory, are
  subdirectories, which contain the actual code.  These subdirectories are named
  after the platforms the are compiled on.  Unix is also used as a common
  directory.  If the code you are writing is POSIX based, you should look at the
  code in the unix directory.  A good rule of thumb, is that if more than half
  your code needs to be ifdef'ed out, and the structures required for your code
  are substantively different from the POSIX code, you should create a new
  directory.
  
  Currently, the APR code is written for Unix, BeOS, Windows, and OS/2.  An
  example of the directory structure is the file I/O directory:
  
  apr
|
 ->  file_io
|
 -> unixThe Unix and common base code
|
 -> win32   The Windows code
| 
 -> os2 The OS/2 code
  
  Obviously, BeOS does not have a directory.  This is because BeOS is currently
  using the Unix directory for it's file_io.  In the near future, it will be
  possible to use indiviual files from the Unix directory.
  
  There are a few special top level directories.  These are test, inc, include,
  and libs.  Test is a directory which stores all test programs.  It is expected
  that if a new type is developed, there will also be a new test program, to
  help people port this new type to different platforms.  Inc is a directory for
  internal header files.  This directory is likely to go away soon.  Include is
  a directory which stores all required APR header files for external use.  The
  distinction between internal and external header files will be made soon. 
  Finally, libs is a generated directory.  When APR finishes building, it will
  store it's library files in the libs directory.
  
  Creating an APR Type
  
  The current design of APR requires that APR types be incomplete.  It is not
  possible to write flexible portable code if programs can access the internals
  of APR types.  This is because different platforms are likely to define
  different native types.
  
  For this reason, each platform defines a structure in their own directories. 
  Those structures are then typedef'ed in an external header file.  For example
  in file_io/unix/fileio.h:
  
  struct file_t {
  ap_context_t *cntxt;
  int filedes;
  FILE *filehand;
  ...
  }
  
  In include/apr_file_io.h:
  typedef struct file_tap_file_t;
  
  This will cause a compiler error if somebody tries to access the filedes field
  in this strcture.  Windows does not have a filedes field, so obviously, it is
  important that programs not be able to access these.
  
  The only exception to the incomplete type rule can be found in apr_portable.h.
  This file defines the native types for each platform.  Using these types, it
  is possible to extract native types for any APR type.
  
  You may notice the ap_context_t fi