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

1999-09-11 Thread ronald
ronald  99/09/11 00:15:57

  Modified:src/ap   ap_base64.c
  Log:
  don't Nul-terminate binary output
  
  Revision  ChangesPath
  1.2   +1 -1  apache-2.0/src/ap/ap_base64.c
  
  Index: ap_base64.c
  ===
  RCS file: /home/cvs/apache-2.0/src/ap/ap_base64.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ap_base64.c   1999/08/24 05:50:30 1.1
  +++ ap_base64.c   1999/09/11 07:15:56 1.2
  @@ -139,6 +139,7 @@
   for (i = 0; i  len; i++)
bufplain[i] = os_toebcdic[bufplain[i]];
   #endif   /* CHARSET_EBCDIC */
  +bufplain[len] = '\0';
   return len;
   }
   
  @@ -186,7 +187,6 @@
(unsigned char) (pr2six[bufin[2]]  6 | pr2six[bufin[3]]);
   }
   
  -*(bufout++) = '\0';
   nbytesdecoded -= (4 - nprbytes)  3;
   return nbytesdecoded;
   }
  
  
  


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

1999-09-11 Thread ben
ben 99/09/11 03:26:00

  Modified:src/modules/mpm/prefork prefork.c
  Log:
  Make prefork compile on FreeBSD.
  
  Revision  ChangesPath
  1.34  +13 -5 apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- prefork.c 1999/09/08 14:15:49 1.33
  +++ prefork.c 1999/09/11 10:25:59 1.34
  @@ -590,9 +590,11 @@
   
   static int lock_fd = -1;
   
  -static void accept_mutex_cleanup(void *foo)
  +static ap_status_t accept_mutex_cleanup(void *foo)
   {
   unlink(ap_lock_fname);
  +
  +return APR_SUCCESS;
   }
   
   /*
  @@ -601,13 +603,15 @@
*/
   static void accept_mutex_child_init(ap_context_t *p)
   {
  +ap_file_t *tempfile;
   
  -lock_fd = ap_popenf(p, ap_lock_fname, O_WRONLY, 0600);
  -if (lock_fd == -1) {
  +ap_open(p, ap_lock_fname, APR_WRITE, APR_UREAD|APR_UWRITE, tempfile);
  +if (!tempfile) {
ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
Child cannot open lock file: %s, ap_lock_fname);
clean_child_exit(APEXIT_CHILDINIT);
   }
  +ap_get_os_file(tempfile, lock_fd);
   }
   
   /*
  @@ -616,14 +620,18 @@
*/
   static void accept_mutex_init(ap_context_t *p)
   {
  +ap_file_t *tempfile;
  +
   expand_lock_fname(p);
   unlink(ap_lock_fname);
  -lock_fd = ap_popenf(p, ap_lock_fname, O_CREAT | O_WRONLY | O_EXCL, 0600);
  -if (lock_fd == -1) {
  +ap_open(p, ap_lock_fname, APR_CREATE|APR_WRITE|APR_EXCL,
  + APR_UREAD|APR_UWRITE, tempfile);
  +if (!tempfile) {
ap_log_error(APLOG_MARK, APLOG_EMERG, server_conf,
Parent cannot open lock file: %s, ap_lock_fname);
exit(APEXIT_INIT);
   }
  +ap_get_os_file(tempfile, lock_fd);
   ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
   }
   
  
  
  


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

1999-09-11 Thread jim
jim 99/09/11 04:49:32

  Modified:src/lib/apr configure.in
  Log:
  -x isn't present on 7th edition shells, so
  move down to -f
  
  Revision  ChangesPath
  1.10  +1 -1  apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- configure.in  1999/09/10 16:52:42 1.9
  +++ configure.in  1999/09/11 11:49:31 1.10
  @@ -50,7 +50,7 @@
   AC_C_INLINE
   
   # Use /bin/sh if it exists, otherwise go looking for sh in the path
  -if (test -z $SH -a -x /bin/sh); then
  +if (test -z $SH -a -f /bin/sh); then
 SH=/bin/sh
   fi
   AC_CHECK_PROG(SH, sh, sh)
  
  
  


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

1999-09-11 Thread rbb
rbb 99/09/11 08:58:44

  Modified:src/modules/mpm/dexter acceptlock.c
   src/modules/mpm/mpmt_pthread acceptlock.c scoreboard.c
  Log:
  This change should allow Apache to build on all platforms with the popenf
  changes.  I have not been able to test this, but it should be evident what I
  am doing if it doesn't work.
  
  Revision  ChangesPath
  1.7   +6 -3  apache-2.0/src/modules/mpm/dexter/acceptlock.c
  
  Index: acceptlock.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/dexter/acceptlock.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- acceptlock.c  1999/09/08 18:58:46 1.6
  +++ acceptlock.c  1999/09/11 15:58:35 1.7
  @@ -574,12 +574,14 @@
*/ 
   void accept_mutex_child_init(ap_context_t *p)
   {
  +ap_file_t *tempfile = NULL;
   int i;
 
   for (i = 0; i  lock_count; i++) {
   char *lock_fname = expand_lock_fname(p, i);
   
  -lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600);
  +ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, tempfile);
  +ap_get_os_file(tempfile, *lock_fd[i]);
   if (lock_fd[i] == -1) {
  ap_log_error(APLOG_MARK, APLOG_EMERG, 
   (const server_rec *)ap_get_server_conf(),
  @@ -595,6 +597,7 @@
*/
   void accept_mutex_init(ap_context_t *p, int number_of_locks)
   {
  +ap_file_t *tempfile = NULL;
   int i;
   char *lock_fname;
 
  @@ -604,8 +607,8 @@
   for (i = 0; i  lock_count; i++) {
   lock_fname = expand_lock_fname(p, i);
   unlink(lock_fname);
  -lock_fd[i] = ap_popenf(p, lock_fname, 
  -O_CREAT | O_WRONLY | O_EXCL, 0600);
  +ap_open(p, lock_fname, APR_CREATE | APR_WRITE | APR_EXCL, APR_UREAD 
| APR_UWRITE, tempfile);
  +ap_get_os_file(tempfile, *lock_fd[i]);
   if (lock_fd[i] == -1) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 
 (const server_rec *) ap_get_server_conf(), 
  
  
  
  1.9   +7 -3  apache-2.0/src/modules/mpm/mpmt_pthread/acceptlock.c
  
  Index: acceptlock.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/acceptlock.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- acceptlock.c  1999/09/08 14:15:47 1.8
  +++ acceptlock.c  1999/09/11 15:58:36 1.9
  @@ -572,12 +572,14 @@
*/ 
   void accept_mutex_child_init(ap_context_t *p)
   {
  +ap_file_t *tempfile = NULL;
   int i;
 
   for (i = 0; i  lock_count; i++) {
   char *lock_fname = expand_lock_fname(p, i);
   
  -lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600);
  +ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, tempfile);
  +ap_get_os_file(tempfile, lock_fd[i]);
   if (lock_fd[i] == -1) {
  ap_log_error(APLOG_MARK, APLOG_EMERG, 
   (const server_rec *)ap_get_server_conf(),
  @@ -593,6 +595,7 @@
*/
   void accept_mutex_init(ap_context_t *p, int number_of_locks)
   {
  +ap_file_t *tempfile = NULL;
   int i;
   char *lock_fname;
 
  @@ -602,8 +605,9 @@
   for (i = 0; i  lock_count; i++) {
   lock_fname = expand_lock_fname(p, i);
   unlink(lock_fname);
  -lock_fd[i] = ap_popenf(p, lock_fname, 
  -O_CREAT | O_WRONLY | O_EXCL, 0600);
  +ap_open(p, lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
  +APR_UREAD | APR_UWRITE, tempfile);
  +ap_get_os_file(tempfile, lock_fd[i]);
   if (lock_fd[i] == -1) {
ap_log_error(APLOG_MARK, APLOG_EMERG, 
 (const server_rec *) ap_get_server_conf(), 
  
  
  
  1.5   +10 -3 apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c
  
  Index: scoreboard.c
  ===
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/scoreboard.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- scoreboard.c  1999/08/31 05:33:23 1.4
  +++ scoreboard.c  1999/09/11 15:58:37 1.5
  @@ -405,6 +405,8 @@
   #define SCOREBOARD_FILE
   static scoreboard _scoreboard_image;
   static int scoreboard_fd = -1;
  +static ap_file_t *scoreboard_file = NULL;
  +static ap_file_t *scoreboard_file = NULL;
   
   /* XXX: things are seriously screwed if we ever have to do a partial
* read or write ... we could get a corrupted scoreboard
  @@ -447,9 +449,12 @@
   API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
   {
   if (scoreboard_fd != -1)
  - ap_pclosef(p, scoreboard_fd);
  + ap_close(scoreboard_fd);
   
  -scoreboard_fd = ap_popenf(p, ap_scoreboard_fname, O_CREAT | O_BINARY | 
O_RDWR, 0666);
  +

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

1999-09-11 Thread Ben Laurie
[EMAIL PROTECTED] wrote:
   -lock_fd[i] = ap_popenf(p, lock_fname, O_WRONLY, 0600);
   +ap_open(p, lock_fname, APR_WRITE, APR_UREAD | APR_UWRITE, 
 tempfile);
   +ap_get_os_file(tempfile, *lock_fd[i]);

Que? *lock_fd[i]?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there.
 - Indira Gandhi


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

1999-09-11 Thread ben
ben 99/09/11 12:52:28

  Modified:src/main http_main.c
  Log:
  Really get rid of unused options.
  
  Revision  ChangesPath
  1.6   +1 -1  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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- http_main.c   1999/08/31 05:32:58 1.5
  +++ http_main.c   1999/09/11 19:52:27 1.6
  @@ -277,7 +277,7 @@
   
   ap_setup_prelinked_modules();
   
  -while ((c = getopt(argc, argv, D:C:c:Xd:f:vVlLR:th)) != -1) {
  +while ((c = getopt(argc, argv, C:c:d:f:vVlLth)) != -1) {
   char **new;
   switch (c) {
case 'c':
  
  
  


cvs commit: apache-2.0/src Makefile.tmpl

1999-09-11 Thread ben
ben 99/09/11 13:42:24

  Modified:src  Makefile.tmpl
  Log:
  Build APR automatically.
  
  Revision  ChangesPath
  1.7   +4 -1  apache-2.0/src/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===
  RCS file: /export/home/cvs/apache-2.0/src/Makefile.tmpl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Makefile.tmpl 1999/09/10 16:06:53 1.6
  +++ Makefile.tmpl 1999/09/11 20:42:19 1.7
  @@ -28,7 +28,10 @@
@echo ++ If not, you will at least have to touch '@@Configuration@@'.
@false
   
  -$(TARGET): $(EXTRA_DEPS) $(SUBTARGET)
  +apr:
  + cd lib/apr; make
  +
  +$(TARGET): apr $(EXTRA_DEPS) $(SUBTARGET)
   
   target_static: subdirs modules.o
$(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
  
  
  


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

1999-09-11 Thread ben
ben 99/09/11 13:42:58

  Modified:src/lib/apr/file_io/unix open.c
  Log:
  Test for open failure correctly.
  
  Revision  ChangesPath
  1.8   +1 -1  apache-2.0/src/lib/apr/file_io/unix/open.c
  
  Index: open.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/lib/apr/file_io/unix/open.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- open.c1999/09/07 21:24:37 1.7
  +++ open.c1999/09/11 20:42:58 1.8
  @@ -168,7 +168,7 @@
   }
   }
   
  -if ((*new)-filedes  0  (*new)-filehand == NULL) {
  +if ((*new)-filedes  0 || (*new)-filehand == NULL) {
  (*new)-filedes = -1;
  (*new)-eof_hit = 1;
   return errno;
  
  
  


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

1999-09-11 Thread ben
ben 99/09/11 15:14:12

  Modified:src/modules/standard mod_negotiation.c
  Log:
  Use return status instead of character value for EOF.
  
  Revision  ChangesPath
  1.5   +3 -2  apache-2.0/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===
  RCS file: /export/home/cvs/apache-2.0/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- mod_negotiation.c 1999/09/08 14:15:55 1.4
  +++ mod_negotiation.c 1999/09/11 22:14:11 1.5
  @@ -678,8 +678,9 @@
* so that we will pick up the blank line the next time 'round.
*/
   
  -while (c != EOF  c != '\n'  ap_isspace(c)) {
  -ap_getc(map, c);
  +while (c != '\n'  ap_isspace(c)) {
  +if(ap_getc(map, c) != APR_SUCCESS)
  + break;
   }
   
   ap_ungetc(map, c);
  
  
  


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

1999-09-11 Thread ben
ben 99/09/11 15:14:43

  Modified:src/include http_protocol.h
   src/main http_core.c http_protocol.c
  Log:
  Fix warnings.
  
  Revision  ChangesPath
  1.5   +2 -1  apache-2.0/src/include/http_protocol.h
  
  Index: http_protocol.h
  ===
  RCS file: /export/home/cvs/apache-2.0/src/include/http_protocol.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- http_protocol.h   1999/09/08 14:15:40 1.4
  +++ http_protocol.h   1999/09/11 22:14:35 1.5
  @@ -173,7 +173,8 @@
   /* Sending a byterange */
   
   API_EXPORT(int) ap_set_byterange(request_rec *r);
  -API_EXPORT(int) ap_each_byterange(request_rec *r, long *offset, long 
*length);
  +API_EXPORT(int) ap_each_byterange(request_rec *r, ap_off_t *offset,
  +   long *length);
   
   /* Support for the Basic authentication protocol.  Note that there's
* nothing that prevents these from being in mod_auth.c, except that other
  
  
  
  1.12  +2 -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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- http_core.c   1999/09/08 14:15:42 1.11
  +++ http_core.c   1999/09/11 22:14:36 1.12
  @@ -2624,7 +2624,8 @@
ap_send_mmap(mm, r, 0, r-finfo.st_size);
}
else {
  - long offset, length;
  + ap_off_t offset;
  + long length;
while (ap_each_byterange(r, offset, length)) {
ap_send_mmap(mm, r, offset, length);
}
  
  
  
  1.15  +6 -4  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.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- http_protocol.c   1999/09/08 14:15:43 1.14
  +++ http_protocol.c   1999/09/11 22:14:37 1.15
  @@ -122,8 +122,8 @@
   return (*start  0 || *end  clength - 1);
   }
   
  -static int internal_byterange(int, long *, request_rec *, const char **, 
long *,
  -  long *);
  +static int internal_byterange(int, long *, request_rec *, const char **,
  +   ap_off_t *, long *);
   
   API_EXPORT(int) ap_set_byterange(request_rec *r)
   {
  @@ -198,7 +198,8 @@
   return 1;
   }
   
  -API_EXPORT(int) ap_each_byterange(request_rec *r, long *offset, long *length)
  +API_EXPORT(int) ap_each_byterange(request_rec *r, ap_off_t *offset,
  +   long *length)
   {
   return internal_byterange(1, NULL, r, r-range, offset, length);
   }
  @@ -214,7 +215,8 @@
* when done.
*/
   static int internal_byterange(int realreq, long *tlength, request_rec *r,
  -  const char **r_range, long *offset, long 
*length)
  +  const char **r_range, ap_off_t *offset,
  +   long *length)
   {
   long range_start, range_end;
   char *range;