cvs commit: apache-devsite platforms.html

1999-10-26 Thread wsanchez
wsanchez99/10/25 18:26:59

  Modified:.platforms.html
  Log:
  nit
  
  Revision  ChangesPath
  1.3   +1 -1  apache-devsite/platforms.html
  
  Index: platforms.html
  ===
  RCS file: /home/cvs/apache-devsite/platforms.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- platforms.html1999/03/16 21:32:49 1.2
  +++ platforms.html1999/10/26 01:26:56 1.3
  @@ -47,7 +47,7 @@
Dean Gaudet (mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED])
 
Mac OS X:
  - Wilfredo Sanchez (mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED])
  + Wilfredo Sánchez (mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED])
 

NeXT:
  
  
  


cvs commit: apache-site/contributors index.html

1999-10-26 Thread wsanchez
wsanchez99/10/25 18:29:26

  Modified:contributors index.html
  Log:
  Add my stats.
  Alphabetize Sameer.
  
  Revision  ChangesPath
  1.79  +40 -28apache-site/contributors/index.html
  
  Index: index.html
  ===
  RCS file: /home/cvs/apache-site/contributors/index.html,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- index.html1999/10/22 09:56:06 1.78
  +++ index.html1999/10/26 01:29:24 1.79
  @@ -70,7 +70,7 @@
   
Alexei Kosut
   
  -Martin Kraemer
  +  Martin Kraemer
EBCDIC Port to BS2000 mainframes.
   
Ben Laurie
  @@ -89,7 +89,8 @@
   
Daniel Lopez Ridruejo
   
  - Wilfredo Sanchez
  + Wilfredo Sánchez
  +  Mac OS porting
   
Cliff Skolnick
Solaris porting.
  @@ -110,8 +111,8 @@
   
Dirk van Gulik
   
  -
  -Apache Emeritae (old group members now off doing other 
things)
  +  
  +  Apache Emeritae (old group members now off doing other things)
   
Chuck Murcko
UnixWare, IRIX, BSD porting.
  @@ -126,36 +127,36 @@
   
Andrew Wilson
   
  -Other major contributors:
  +  Other major contributors:
   
Howard Fear
SSI extensions.
   
  -Florent Guillaume
  +  Florent Guillaume
Language Negotiation
   
  -Koen Holtman
  +  Koen Holtman
Rewrite of mod_negotiation
   
  -Kevin Hughes
  +  Kevin Hughes
Creator of all those nifty icons
   
  -Brandon Long and Beth Frank
  +  Brandon Long and Beth Frank
NCSA Server Development Team, post-1.3
   
  -Ambarish Malpani
  +  Ambarish Malpani
Beginning of the NT port
   
  -Rob McCool
  +  Rob McCool
Original author of NCSA httpd 1.3
   
  -Paul Richards
  +  Paul Richards
Convinced the group to use remote CVS after 1.0
   
Garey Smiley
OS/2 port.
   
  -Henry Spencer
  +  Henry Spencer
Author of the regex library
   
   
  @@ -174,7 +175,7 @@
   
   
   Name: Brian Behlendorf
  -Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  +Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://www.behlendorf.com/";>http://www.behlendorf.com
   Organization: http://www.oreilly.com";>O'Reilly and 
Associates
   Occupation: CTO, New Ventures
  @@ -311,7 +312,6 @@
   
   
   
  -
   Name: Rob Hartill
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://us.imdb.com/";>IMDb
  @@ -406,6 +406,7 @@
   Comments: What am I doing here?
   
   
  +
   Name: Rasmus Lerdorf
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://www.lerdorf.on.ca/";>http://www.lerdorf.on.ca/
  @@ -427,6 +428,7 @@
   Location: San Francisco, CA, USA 
   Contributions: http://perl.apache.org/";>mod_perl,
   various API additions
  +
   
   
   Name: Aram W. Mirzadeh
  @@ -451,6 +453,17 @@
   
   
   
  +Name: Sameer Parekh
  +Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  +URL: http://www.c2.net/~sameer/";>http://www.c2.net/~sameer/
  +Organization: C2Net Software, Inc.
  +Occupation: Management (whee)
  +Location: Oakland, CA, USA
  +Contribution: Bugfixes, documentation, website,
  +administrative/legal, various binary builds as needed
  +
  +
  +
   Name: Paul Richards
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://www.freebsd.org/~paul";>http://www.freebsd.org/~paul
  @@ -462,7 +475,17 @@
   
   
   
  +Name: Wilfredo Sánchez
  +Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  +URL: http://www.mit.edu/people/wsanchez/";>http://www.mit.edu/people/wsanchez/
  +Organization: Apple Computer, Inc.
  +Occupation: Software Engineer
  +Location: Cupertino, CA, USA
  +OS Expertise: Mac OS X, *BSD
  +Contribution: Mac OS X port, build fixes.
   
  +
  +
   Name: David Robinson
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL:
  @@ -475,8 +498,7 @@
   
   Name: Cliff Skolnick
   email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  -URL: http://www.steam.com/~cliff/";>http://www.steam.com
  -/~cliff/
  +URL: http://www.steam.com/~cliff/";>http://www.steam.com/~cliff/
   Organization: steam.com
   Occupation: Network/Unix Consultant
   Location: San Francisco, CA, USA
  @@ -507,6 +529,7 @@
   http://www.slink.com/ApacheOS2/";>http://www.slink.com/ApacheOS2/
   
   
  +
   Name: Bill Stoddard
   Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
   URL: http://www.software.ibm.com/webservers/";>http://www.software.ibm.com/webservers/
  @@ -589,17 +612,6 @@
   Occupation: Internet Consultant
   Location: Oxford, UK
   Comments: I'm really looking forward to this hangover.
  -
  -
  -
  -Name: Sameer Parekh
  -Email: mailto:[EMAIL PROTECTED]">[EMAIL 
PROTECTED]
  -URL: http://www.c2.net/~sameer/";>http://www.c2.net/~sameer/
  -Organization: C2Net Software, Inc.
  -Occupation: Management (whee)
  -Location: Oak

cvs commit: apache-2.0/src Configuration.mpm

1999-10-26 Thread manoj
manoj   99/10/25 18:58:57

  Modified:src  Configuration.mpm
  Log:
  Fix EXTRA_LIBS to match the one-library APR
  
  Revision  ChangesPath
  1.17  +1 -1  apache-2.0/src/Configuration.mpm
  
  Index: Configuration.mpm
  ===
  RCS file: /home/cvs/apache-2.0/src/Configuration.mpm,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -d -u -r1.16 -r1.17
  --- Configuration.mpm 1999/09/07 20:30:07 1.16
  +++ Configuration.mpm 1999/10/26 01:58:56 1.17
  @@ -2,7 +2,7 @@
   # mpmt_pthread MPM (-pthread in EXTRA_CFLAGS on Linux)
   EXTRA_CFLAGS= -Wall -pthread
   EXTRA_LDFLAGS=
  -EXTRA_LIBS= -lpthread -L$(SRCDIR)/lib/apr/libs -lfile -lnetwork -lapr -llock 
-lmisc -lsig -lthreadproc -ltime
  +EXTRA_LIBS= -lpthread -L$(SRCDIR)/lib/apr -lapr
   EXTRA_INCLUDES=
   EXTRA_DEPS=
   #CC=
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/25 22:24:52

  Modified:src/main buff.c
  Log:
  Fix a Manojly stupid bclose bug.
  
  Revision  ChangesPath
  1.14  +1 -1  apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- buff.c1999/10/25 22:04:05 1.13
  +++ buff.c1999/10/26 05:24:50 1.14
  @@ -834,7 +834,7 @@
rc1 = 0;
   ap_kill_cleanup(fb->pool, fb, bcleanup);
   rc2 = iol_close(fb->iol);
  -if (rc2 != APR_SUCCESS) {
  +if (rc2 == APR_SUCCESS) {
   rc2 = 0;
   }
   else {
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/25 22:29:40

  Modified:src/os/unix iol_socket.c
  Log:
  Fix bugs in the big fat macro.
  
  Revision  ChangesPath
  1.9   +4 -3  apache-2.0/src/os/unix/iol_socket.c
  
  Index: iol_socket.c
  ===
  RCS file: /home/cvs/apache-2.0/src/os/unix/iol_socket.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -d -u -r1.8 -r1.9
  --- iol_socket.c  1999/10/25 21:01:08 1.8
  +++ iol_socket.c  1999/10/26 05:29:40 1.9
  @@ -148,6 +148,7 @@
rv = select(iol->fd + 1, selread, selwrite, NULL, iol->timeout < 0 
? NULL : &tv); \
} while (rv == -1 && errno == EINTR); \
if (!FD_ISSET(iol->fd, &fdset)) { \
  +*nbytes = 0; \
return APR_ETIMEDOUT; \
} \
do { \
  @@ -190,12 +191,12 @@
do { \
rv = syscall(iol->fd, arg1, arg2); \
} while (rv == -1 && errno == EINTR); \
  - if ((errno == EWOULDBLOCK || errno == EAGAIN) && iol->timeout != 0) { \
  - return unix_##name##_timeout(viol, arg1, arg2, nbytes); \
  - } \
if (rv >= 0) { \
*nbytes = rv; \
   return APR_SUCCESS; \
  + } \
  + if ((errno == EWOULDBLOCK || errno == EAGAIN) && iol->timeout != 0) { \
  + return unix_##name##_timeout(viol, arg1, arg2, nbytes); \
} \
return errno; \
   }
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/25 23:05:39

  Modified:src/modules/mpm/mpmt_pthread mpmt_pthread.c
  Log:
  Fix warnings from the local/remote_addr stuff properly.
  
  Revision  ChangesPath
  1.41  +3 -11 apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c
  
  Index: mpmt_pthread.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -d -u -r1.40 -r1.41
  --- mpmt_pthread.c1999/10/25 23:16:29 1.40
  +++ mpmt_pthread.c1999/10/26 06:05:38 1.41
  @@ -725,10 +725,8 @@
* Child process main loop.
*/
   
  -static void process_socket(ap_context_t *p, struct sockaddr *sa_client, 
ap_socket_t *sock, 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; /*  */
  -size_t len = sizeof(struct sockaddr);
   BUFF *conn_io;
   conn_rec *current_conn;
   ap_iol *iol;
  @@ -737,12 +735,6 @@
   
   (void) ap_get_os_sock(&csd, sock);
   
  -if (getsockname(csd, &sa_server, &len) < 0) { 
  - ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
  - close(csd);
  - return;
  -}
  -
   sock_disable_nagle(csd);
   
   iol = unix_attach_socket(csd);
  @@ -800,7 +792,6 @@
   int process_slot = ti->pid;
   int thread_slot = ti->tid;
   ap_context_t *tpool = ti->tpool;
  -struct sockaddr sa_client;
   ap_socket_t *csd = NULL;
   ap_context_t *ptrans;/* Pool for per-transaction stuff */
   ap_socket_t *sd = NULL;
  @@ -894,7 +885,7 @@
   SAFE_ACCEPT(intra_mutex_off(0));
   break;
   }
  -process_socket(ptrans, &sa_client, csd, process_slot, thread_slot);
  +process_socket(ptrans, csd, process_slot, thread_slot);
   ap_clear_pool(ptrans);
   requests_this_child--;
   }
  @@ -919,6 +910,7 @@
   {
   sigset_t sig_mask;
   int signal_received;
  +pthread_t thread;
   pthread_attr_t thread_attr;
   int i;
   int my_child_num = child_num_arg;
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/25 23:07:38

  Modified:src/modules/mpm/dexter dexter.c
  Log:
  Take advantage of ap_new_apr_connection in dexter
  
  Revision  ChangesPath
  1.47  +7 -19 apache-2.0/src/modules/mpm/dexter/dexter.c
  
  Index: dexter.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/dexter.c,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -d -u -r1.46 -r1.47
  --- dexter.c  1999/10/24 13:08:27 1.46
  +++ dexter.c  1999/10/26 06:07:36 1.47
  @@ -737,21 +737,14 @@
* Child process main loop.
*/
   
  -static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int 
csd,
  -   int conn_id)
  +static void process_socket(ap_context_t *p, ap_socket_t *sock, long conn_id)
   {
  -struct sockaddr sa_server; /*  */
  -NET_SIZE_T len = sizeof(struct sockaddr);
   BUFF *conn_io;
   conn_rec *current_conn;
   ap_iol *iol;
  -
  -if (getsockname(csd, &sa_server, &len) < 0) { 
  - ap_log_error(APLOG_MARK, APLOG_ERR, errno, server_conf, "getsockname");
  - close(csd);
  - return;
  -}
  +int csd;
   
  +ap_get_os_sock(&csd, sock);
   sock_disable_nagle(csd);
   
   iol = unix_attach_socket(csd);
  @@ -766,17 +759,15 @@
   ap_log_error(APLOG_MARK, APLOG_WARNING, errno, NULL,
   "error attaching to socket");
   }
  -close(csd);
  +ap_close_socket(sock);
return;
   }
   
   conn_io = ap_bcreate(p, B_RDWR);
   ap_bpush_iol(conn_io, iol);
   
  -current_conn = ap_new_connection(p, server_conf, conn_io,
  -  (const struct sockaddr_in *) sa_client, 
  -  (const struct sockaddr_in *) &sa_server,
  -  conn_id);
  +current_conn = ap_new_apr_connection(p, server_conf, conn_io, sock,
  + conn_id);
   
   ap_process_connection(current_conn);
   }
  @@ -848,7 +839,6 @@
   
   static void *worker_thread(void *arg)
   {
  -struct sockaddr sa_client;
   ap_socket_t *csd = NULL;
   ap_context_t *tpool; /* Pool for this thread   */
   ap_context_t *ptrans;/* Pool for per-transaction stuff */
  @@ -858,7 +848,6 @@
   int thread_just_started = 1;
   int thread_num = *((int *) arg);
   long conn_id = child_num * HARD_THREAD_LIMIT + thread_num;
  -int native_socket;
   
   pthread_mutex_lock(&thread_pool_create_mutex);
   ap_create_context(&tpool, thread_pool_parent);
  @@ -955,8 +944,7 @@
   pthread_mutex_unlock(&idle_thread_count_mutex);
break;
}
  -ap_get_os_sock(&native_socket, csd);
  -process_socket(ptrans, &sa_client, native_socket, conn_id);
  +process_socket(ptrans, csd, conn_id);
   ap_clear_pool(ptrans);
   requests_this_child--;
   }
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/25 23:15:59

  Modified:src/main buff.c
  Log:
  More elimination of errno in buff. Now, everything under ap_bwrite is
  errno-free. ap_bwrite doesn't use errno, excpet for exporting its old
  interface.
  
  Revision  ChangesPath
  1.15  +49 -41apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -d -u -r1.14 -r1.15
  --- buff.c1999/10/26 05:24:50 1.14
  +++ buff.c1999/10/26 06:15:59 1.15
  @@ -606,16 +606,13 @@
   
   /* write the contents of fb->outbase, and buf,
  stop at first partial write for a non-blocking buff
  -
  -   return number of bytes of buf which were written
  -   -1 for errors
   */
  -static int large_write(BUFF *fb, const char *buf, int nbyte)
  +static ap_status_t large_write(BUFF *fb, const char *buf, ap_size_t nbyte,
  +   ap_ssize_t *bytes_written)
   {
   struct iovec vec[2];
   int nvec;
   ap_status_t rv;
  -ap_ssize_t bytes_written;
   
   ap_assert(nbyte > 0);
   if (fb->outcnt) {
  @@ -630,64 +627,64 @@
vec[0].iov_len = nbyte;
nvec = 1;
   }
  -rv = writev_it_all(fb, vec, nvec, &bytes_written);
  -if (bytes_written == 0) {   /* error or eof */
  -if (rv == APR_SUCCESS) {
  - return 0;
  -}
  -errno = rv;
  -return -1;
  +rv = writev_it_all(fb, vec, nvec, bytes_written);
  +if (*bytes_written == 0) {   /* error or eof */
  +return rv;
   }
  -if (bytes_written < fb->outcnt) {
  +if (*bytes_written < fb->outcnt) {
/* shift bytes forward in buffer */
  - fb->outcnt -= bytes_written;
  - memmove(fb->outbase, fb->outbase + bytes_written, fb->outcnt);
  - return 0;
  + fb->outcnt -= *bytes_written;
  + memmove(fb->outbase, fb->outbase + *bytes_written, fb->outcnt);
  +*bytes_written = 0;
  + return APR_SUCCESS;
   }
  -bytes_written -= fb->outcnt;
  +*bytes_written -= fb->outcnt;
   fb->outcnt = 0;
  -return bytes_written;
  +return APR_SUCCESS;
   }
   
   
  -static int large_write_chunk(BUFF *fb, const char *buf, int nbyte)
  +static ap_status_t large_write_chunk(BUFF *fb, const char *buf, ap_size_t 
nbyte,
  + ap_ssize_t *bytes_written)
   {
  -int rv;
  -int amt;
  -int total;
  +ap_status_t rv;
  +ap_ssize_t total, n, amt;
   
   ap_assert(nbyte > 0);
   if (fb->chunk_overcommit) {
amt = nbyte > fb->chunk_overcommit ? fb->chunk_overcommit : nbyte;
  - rv = large_write(fb, buf, amt);
  - if (rv <= 0) {
  - return rv;
  + rv = large_write(fb, buf, amt, &total);
  + if (total == 0) {   /* error or eof */
  +*bytes_written = total;
  +return rv;
}
  - fb->chunk_overcommit -= rv;
  + fb->chunk_overcommit -= total;
if (fb->chunk_overcommit == 0) {
fb->outbase[0] = '\015';
fb->outbase[1] = '\012';
fb->outcnt = 2;
start_chunk(fb);
}
  - if (rv < amt || amt == nbyte) {
  - return rv;
  + if (total < amt || amt == nbyte) {
  +*bytes_written = total;
  + return APR_SUCCESS;
}
  - nbyte -= rv;
  - buf += rv;
  + nbyte -= total;
  + buf += total;
   }
   ap_assert(fb->chunk_overcommit == 0 && fb->outchunk != -1);
   total = 0;
   do {
amt = end_chunk(fb, nbyte);
  - rv = large_write(fb, buf, amt);
  - if (rv < amt) {
  - if (rv < 0) {
  - fb->chunk_overcommit = amt;
  - return total ? total : -1;
  - }
  - fb->chunk_overcommit = amt - rv;
  - return total + rv;
  + rv = large_write(fb, buf, amt, &n);
  + if (n < amt) {
  + fb->chunk_overcommit = amt - n;
  +*bytes_written = total + n;
  +#ifdef MIDWAY_ERROR_RETURNS_ERROR_BLAH_BLAH_BLAH
  +return rv;
  +#else
  +return *bytes_written ? APR_SUCCESS : rv;
  +#endif
}
fb->outbase[0] = '\015';
fb->outbase[1] = '\012';
  @@ -697,7 +694,8 @@
buf += amt;
total += amt;
   } while (nbyte);
  -return total;
  +*bytes_written = total;
  +return APR_SUCCESS;
   }
   
   /* A wrapper for write which deals with error conditions and
  @@ -777,10 +775,20 @@
*/
   if (!(fb->flags & B_WR)
|| (nbyte > LARGE_WRITE_THRESHOLD && nbyte + fb->outcnt >= fb->bufsiz)) 
{
  +ap_status_t rv;
  +ap_ssize_t n;
  +
if (fb->flags & B_CHUNK) {
  - return large_write_chunk(fb, buf, nbyte);
  + rv = large_write_chunk(fb, buf, nbyte, &n);
}
  - return large_write(fb, buf, nbyte);
  +else {
  + rv = large_w

cvs commit: apache-site related_projects.html

1999-10-26 Thread lars
lars99/10/25 23:37:10

  Modified:.related_projects.html
  Log:
  Update Apache for Amiga link
  
  Revision  ChangesPath
  1.42  +1 -1  apache-site/related_projects.html
  
  Index: related_projects.html
  ===
  RCS file: /home/cvs/apache-site/related_projects.html,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- related_projects.html 1999/09/18 16:24:00 1.41
  +++ related_projects.html 1999/10/26 06:37:09 1.42
  @@ -152,7 +152,7 @@
   OS/2 from the standard distribution.
   
   
  -http://www.xs4all.nl/~albertv/apache";
  +http://amiga-apache.home.pages.de/";
   >Apache for Amiga
   
   Apache has now been ported to Amiga, and is maintained as a separate 
project.  
  
  
  


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

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

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

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

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

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


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

1999-10-26 Thread manoj
manoj   99/10/26 13:43:52

  Modified:src/main buff.c
  Log:
  Fix some (probably) inconsequential mistakes in ap_bsetopt.
  
  Revision  ChangesPath
  1.16  +2 -2  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.15
  retrieving revision 1.16
  diff -u -d -u -r1.15 -r1.16
  --- buff.c1999/10/26 06:15:59 1.15
  +++ buff.c1999/10/26 20:43:46 1.16
  @@ -197,12 +197,12 @@
   ap_register_cleanup(fb->pool, fb, bcleanup, bcleanup);
   }
   
  -API_EXPORT(int) ap_bsetopt(BUFF *fb, int optname, const void *optval)
  +API_EXPORT(ap_status_t) ap_bsetopt(BUFF *fb, int optname, const void *optval)
   {
   switch (optname) {
   case BO_BYTECT:
fb->bytes_sent = *(const long int *) optval - (long int) fb->outcnt;
  - return 0;
  + return APR_SUCCESS;
   
   case BO_TIMEOUT:
fb->flags &= ~B_NONBLOCK;
  
  
  


cvs commit: apache-2.0/src Configuration.mpm

1999-10-26 Thread manoj
manoj   99/10/26 15:05:41

  Modified:src  Configuration.mpm
  Log:
  The -lapr is redundant.
  
  Revision  ChangesPath
  1.18  +1 -1  apache-2.0/src/Configuration.mpm
  
  Index: Configuration.mpm
  ===
  RCS file: /home/cvs/apache-2.0/src/Configuration.mpm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -d -u -r1.17 -r1.18
  --- Configuration.mpm 1999/10/26 01:58:56 1.17
  +++ Configuration.mpm 1999/10/26 22:05:38 1.18
  @@ -2,7 +2,7 @@
   # mpmt_pthread MPM (-pthread in EXTRA_CFLAGS on Linux)
   EXTRA_CFLAGS= -Wall -pthread
   EXTRA_LDFLAGS=
  -EXTRA_LIBS= -lpthread -L$(SRCDIR)/lib/apr -lapr
  +EXTRA_LIBS= -lpthread
   EXTRA_INCLUDES=
   EXTRA_DEPS=
   #CC=
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/26 15:15:20

  Modified:src/main http_protocol.c
  Log:
  One ap_bflush to the client wasn't checked. Now fixed.
  
  Revision  ChangesPath
  1.25  +4 -2  apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -d -u -r1.24 -r1.25
  --- http_protocol.c   1999/10/24 19:23:58 1.24
  +++ http_protocol.c   1999/10/26 22:15:16 1.25
  @@ -2072,7 +2072,7 @@
   char buf[IOBUFSIZE];
   long total_bytes_sent = 0;
   long zero_timeout = 0;
  -int n, w, rc, o;
  +int n, w, o;
   
   if (length == 0) {
   return 0;
  @@ -2096,7 +2096,9 @@
   break;
   }
   /* next read will block, so flush the client now */
  -rc = ap_bflush(r->connection->client);
  +if (ap_rflush(r) == EOF) {
  +break;
  +}
   
   ap_bsetopt(fb, BO_TIMEOUT, &r->server->timeout);
   n = ap_bread(fb, buf, sizeof(buf));
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/26 15:25:03

  Modified:src  CHANGES
   src/main buff.c http_connection.c http_protocol.c
  Log:
  ap_bflush and ap_bclose now return ap_status_t error codes instead of
  returning -1 and setting errno.
  
  Revision  ChangesPath
  1.13  +3 -0  apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -d -u -r1.12 -r1.13
  --- CHANGES   1999/10/23 21:20:15 1.12
  +++ CHANGES   1999/10/26 22:25:00 1.13
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0-dev
   
  +  *) ap_bflush and ap_bclose now return ap_status_t error codes instead
  + of returning -1 and setting errno. [Manoj Kasichainula]
  +
 *) mod_speling runs in 2.0-dev now: a bug in readdir_r handling and
interface adaption to APR functions did it. [Martin Kraemer]
   
  
  
  
  1.17  +36 -37apache-2.0/src/main/buff.c
  
  Index: buff.c
  ===
  RCS file: /home/cvs/apache-2.0/src/main/buff.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -d -u -r1.16 -r1.17
  --- buff.c1999/10/26 20:43:46 1.16
  +++ buff.c1999/10/26 22:25:01 1.17
  @@ -718,32 +718,36 @@
   }
   
   
  -static int bflush_core(BUFF *fb)
  +static ap_status_t bflush_core(BUFF *fb, ap_ssize_t *bytes_written)
   {
  -int total;
  -ap_ssize_t bytes_written;
  +ap_status_t rv;
  +ap_ssize_t n;
   
   if (fb->flags & B_CHUNK) {
end_chunk(fb, 0);
   }
  -total = 0;
  +*bytes_written = 0;
   while (fb->outcnt > 0) {
  - (void) write_with_errors(fb, fb->outbase + total, fb->outcnt,
  - &bytes_written);
  - if (bytes_written <= 0) {   /* error or eof */
  - if (total) {
  - memmove(fb->outbase, fb->outbase + total, fb->outcnt);
  - return total;
  + rv = write_with_errors(fb, fb->outbase + *bytes_written, fb->outcnt,
  + &n);
  + if (n <= 0) {   /* error or eof */
  + if (*bytes_written) {
  + memmove(fb->outbase, fb->outbase + *bytes_written, fb->outcnt);
  +#ifdef MIDWAY_ERROR_RETURNS_ERROR_BLAH_BLAH_BLAH
  +return rv;
  +#else
  + return APR_SUCCESS;
  +#endif
}
  - return -1;
  + return rv;
}
  - fb->outcnt -= bytes_written;
  - total += bytes_written;
  + fb->outcnt -= n;
  + *bytes_written += n;
   }
   if (fb->flags & B_CHUNK) {
start_chunk(fb);
   }
  -return total;
  +return APR_SUCCESS;
   }
   
   
  @@ -758,6 +762,8 @@
   {
   int amt;
   int total;
  +ap_ssize_t n;
  +ap_status_t rv;
   
   if (fb->flags & (B_WRERR | B_EOUT)) {
errno = fb->saved_errno;
  @@ -775,7 +781,6 @@
*/
   if (!(fb->flags & B_WR)
|| (nbyte > LARGE_WRITE_THRESHOLD && nbyte + fb->outcnt >= fb->bufsiz)) 
{
  -ap_status_t rv;
   ap_ssize_t n;
   
if (fb->flags & B_CHUNK) {
  @@ -799,7 +804,8 @@
fb->outcnt += amt;
buf = (const char *) buf + amt;
nbyte -= amt;
  - if (bflush_core(fb) < amt) {
  +(void) bflush_core(fb, &n);
  + if (n < amt) {
return amt;
}
total = amt;
  @@ -812,18 +818,18 @@
   
   /*
* Flushes the buffered stream.
  - * Returns 0 on success or -1 on error
*/
  -API_EXPORT(int) ap_bflush(BUFF *fb)
  +API_EXPORT(ap_status_t) ap_bflush(BUFF *fb)
   {
  -int ret;
  -
  -if ((fb->flags & (B_WRERR | B_EOUT | B_WR)) != B_WR)
  - return -1;
  -
  -ret = bflush_core(fb);
  +ap_ssize_t n;   /* Placeholder; not ever used */
   
  -return ret;
  +if ((fb->flags & (B_EOUT | B_WR)) != B_WR) {
  +return APR_EINVAL;
  +}
  +if ((fb->flags & B_WRERR) != 0) {
  +return fb->saved_errno;
  +}
  +return bflush_core(fb, &n);
   }
   
   /*
  @@ -832,23 +838,16 @@
* Sets the EOF flag to indicate no futher data can be read,
* and the EOUT flag to indicate no further data can be written.
*/
  -API_EXPORT(int) ap_bclose(BUFF *fb)
  +API_EXPORT(ap_status_t) ap_bclose(BUFF *fb)
   {
  -int rc1, rc2;
  +ap_status_t rc1, rc2;
   
   if (fb->flags & B_WR)
rc1 = ap_bflush(fb);
   else
  - rc1 = 0;
  + rc1 = APR_SUCCESS;
   ap_kill_cleanup(fb->pool, fb, bcleanup);
   rc2 = iol_close(fb->iol);
  -if (rc2 == APR_SUCCESS) {
  -rc2 = 0;
  -}
  -else {
  -errno = rc2;
  -rc2 = -1;
  -}
   
   fb->inptr = fb->inbase;
   fb->incnt = 0;
  @@ -856,7 +855,7 @@
   
   fb->flags |= B_EOF | B_EOUT;
   
  -if (rc1 != 0)
  +if (rc1 != APR_SUCCESS)
return rc1;
   return rc2;
   }
  @@ -921,7 +920,

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

1999-10-26 Thread manoj
manoj   99/10/26 15:42:51

  Modified:src  CHANGES
   src/include buff.h
   src/main buff.c
  Log:
  Error functions recorded with ap_bonerror now take a status code as an
  argument, so errno isn't needed.
  
  Revision  ChangesPath
  1.14  +3 -1  apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -d -u -r1.13 -r1.14
  --- CHANGES   1999/10/26 22:25:00 1.13
  +++ CHANGES   1999/10/26 22:42:33 1.14
  @@ -1,7 +1,9 @@
   Changes with Apache 2.0-dev
   
 *) ap_bflush and ap_bclose now return ap_status_t error codes instead
  - of returning -1 and setting errno. [Manoj Kasichainula]
  + of returning -1 and setting errno. And error functions recorded
  + with ap_bonerror now take a status code as an argument. [Manoj
  + Kasichainula]
   
 *) mod_speling runs in 2.0-dev now: a bug in readdir_r handling and
interface adaption to APR functions did it. [Martin Kraemer]
  
  
  
  1.5   +5 -4  apache-2.0/src/include/buff.h
  
  Index: buff.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/buff.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -d -u -r1.4 -r1.5
  --- buff.h1999/10/22 22:08:11 1.4
  +++ buff.h1999/10/26 22:42:41 1.5
  @@ -128,7 +128,7 @@
   
   struct buff_struct {
   int flags;   /* flags */
  -int saved_errno; /* saved errno */
  +ap_status_t saved_errno; /* saved errno */
   unsigned char *inptr;/* pointer to next location to read */
   int incnt;   /* number of bytes left to read from 
input buffer;
 * always 0 if had a read error  */
  @@ -141,7 +141,7 @@
 * keep track of the #remaining bytes in the 
chunk
 * here
 */
  -void (*error) (BUFF *fb, int op, void *data);
  +void (*error) (BUFF *fb, int op, void *data, ap_status_t errnum);
   void *error_data;
   long int bytes_sent; /* number of bytes actually written */
   
  @@ -177,8 +177,9 @@
   #define ap_bgetflag(fb, flag)((fb)->flags & (flag))
   
   /* Error handling */
  -API_EXPORT(void) ap_bonerror(BUFF *fb, void (*error) (BUFF *, int, void *),
  -   void *data);
  +API_EXPORT(void) ap_bonerror(BUFF *fb,
  + void (*error) (BUFF *, int, void *, 
ap_status_t),
  + void *data);
   
   /* I/O */
   API_EXPORT(int) ap_bread(BUFF *fb, void *buf, int nbyte);
  
  
  
  1.18  +4 -5  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.17
  retrieving revision 1.18
  diff -u -d -u -r1.17 -r1.18
  --- buff.c1999/10/26 22:25:01 1.17
  +++ buff.c1999/10/26 22:42:46 1.18
  @@ -136,11 +136,9 @@
   
   static void doerror(BUFF *fb, int direction)
   {
  -/* TODO: doerror should look at fb->saved_errno instead of errno */
  -errno = fb->saved_errno;
   fb->flags |= (direction == B_RD ? B_RDERR : B_WRERR);
   if (fb->error != NULL)
  - (*fb->error) (fb, direction, fb->error_data);
  + (*fb->error) (fb, direction, fb->error_data, fb->saved_errno);
   }
   
   /* Buffering routines */
  @@ -901,8 +899,9 @@
   return k;
   }
   
  -API_EXPORT(void) ap_bonerror(BUFF *fb, void (*error) (BUFF *, int, void *),
  -   void *data)
  +API_EXPORT(void) ap_bonerror(BUFF *fb,
  + void (*error) (BUFF *, int, void *, 
ap_status_t),
  + void *data)
   {
   fb->error = error;
   fb->error_data = data;
  
  
  


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

1999-10-26 Thread manoj
manoj   99/10/26 15:53:57

  Modified:src/include buff.h
  Log:
  Prototypes changed slightly for ap_bclose and ap_bflush.
  
  Revision  ChangesPath
  1.6   +2 -2  apache-2.0/src/include/buff.h
  
  Index: buff.h
  ===
  RCS file: /home/cvs/apache-2.0/src/include/buff.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -d -u -r1.5 -r1.6
  --- buff.h1999/10/26 22:42:41 1.5
  +++ buff.h1999/10/26 22:53:55 1.6
  @@ -172,7 +172,7 @@
   API_EXPORT(ap_status_t) ap_bsetopt(BUFF *fb, int optname, const void 
*optval);
   API_EXPORT(ap_status_t) ap_bgetopt(BUFF *fb, int optname, void *optval);
   API_EXPORT(int) ap_bsetflag(BUFF *fb, int flag, int value);
  -API_EXPORT(int) ap_bclose(BUFF *fb);
  +API_EXPORT(ap_status_t) ap_bclose(BUFF *fb);
   
   #define ap_bgetflag(fb, flag)((fb)->flags & (flag))
   
  @@ -186,7 +186,7 @@
   API_EXPORT(int) ap_bgets(char *s, int n, BUFF *fb);
   API_EXPORT(int) ap_blookc(BUFF *fb);
   API_EXPORT(int) ap_bwrite(BUFF *fb, const void *buf, int nbyte);
  -API_EXPORT(int) ap_bflush(BUFF *fb);
  +API_EXPORT(ap_status_t) ap_bflush(BUFF *fb);
   API_EXPORT(int) ap_bputs(const char *x, BUFF *fb);
   API_EXPORT(int) ap_bvputs(BUFF *fb,...);
   API_EXPORT_NONSTD(int) ap_bprintf(BUFF *fb, const char *fmt,...)