httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-2.0/src/os/unix unixd.c
Date Fri, 19 Nov 1999 18:49:30 GMT
rbb         99/11/19 10:49:24

  Modified:    src/modules/experimental Makefile.tmpl
               src/modules/mpm/mpmt_beos Makefile.tmpl mpmt_beos.c
                        scoreboard.c
               src/modules/mpm/mpmt_pthread Makefile.tmpl mpmt_pthread.c
                        scoreboard.c
               src/modules/mpm/prefork prefork.c
               src/modules/mpm/spmt_os2 Makefile.tmpl spmt_os2.c
               src/modules/mpm/winnt winnt.c
               src/modules/proxy mod_proxy.c proxy_cache.c proxy_util.c
               src/modules/standard mod_auth_digest.c mod_include.c
                        mod_negotiation.c mod_so.c
               src/os/beos beosd.c
               src/os/os2 Makefile.tmpl
               src/os/unix unixd.c
  Log:
  Finish the conversion from fprintf(stderr -> ap_log_err.
  
  Revision  Changes    Path
  1.4       +1 -1      apache-2.0/src/modules/experimental/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/experimental/Makefile.tmpl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Makefile.tmpl	1999/11/17 21:39:30	1.3
  +++ Makefile.tmpl	1999/11/19 18:46:00	1.4
  @@ -12,7 +12,7 @@
    ../../lib/apr/include/apr_config.h ../../lib/apr/include/apr_errno.h \
    ../../lib/apr/include/apr_lib.h ../../lib/apr/include/apr_file_io.h \
    $(INCDIR)/buff.h $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  + $(INCDIR)/util_uri.h \
    $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
    $(INCDIR)/http_log.h $(INCDIR)/http_protocol.h \
    ../../lib/apr/include/apr_portable.h \
  
  
  
  1.2       +3 -3      apache-2.0/src/modules/mpm/mpmt_beos/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/Makefile.tmpl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Makefile.tmpl	1999/10/08 19:02:31	1.1
  +++ Makefile.tmpl	1999/11/19 18:46:08	1.2
  @@ -65,7 +65,7 @@
    ../../../lib/apr/include/apr_lib.h \
    ../../../lib/apr/include/apr_file_io.h $(INCDIR)/buff.h \
    $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/apr.h $(INCDIR)/util_uri.h acceptlock.h \
  + $(INCDIR)/util_uri.h acceptlock.h \
    $(INCDIR)/ap_mpm.h mpmt_beos.h
   mpmt_beos.o: mpmt_beos.c ../../../lib/apr/include/apr_portable.h \
    ../../../lib/apr/include/apr_general.h \
  @@ -82,7 +82,7 @@
    $(INCDIR)/ap_ctype.h $(INCDIR)/hsregex.h \
    ../../../lib/apr/include/apr_lib.h $(INCDIR)/buff.h \
    $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  + $(INCDIR)/util_uri.h \
    $(INCDIR)/http_main.h $(INCDIR)/http_log.h \
    $(INCDIR)/http_config.h $(INCDIR)/ap_hooks.h \
    $(INCDIR)/http_core.h $(INCDIR)/http_connection.h \
  @@ -101,7 +101,7 @@
    ../../../lib/apr/include/apr_lib.h \
    ../../../lib/apr/include/apr_file_io.h $(INCDIR)/buff.h \
    $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  + $(INCDIR)/util_uri.h \
    $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
    $(INCDIR)/http_core.h $(INCDIR)/http_config.h \
    $(INCDIR)/ap_hooks.h $(OSDIR)/beosd.h \
  
  
  
  1.10      +27 -16    apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c
  
  Index: mpmt_beos.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/mpmt_beos.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mpmt_beos.c	1999/11/16 18:31:30	1.9
  +++ mpmt_beos.c	1999/11/19 18:46:12	1.10
  @@ -1275,9 +1275,12 @@
   
       min_spare_threads = atoi(arg);
       if (min_spare_threads <= 0) {
  -       fprintf(stderr, "WARNING: detected MinSpareThreads set to non-positive.\n");
  -       fprintf(stderr, "Resetting to 1 to avoid almost certain Apache failure.\n");
  -       fprintf(stderr, "Please read the documentation.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: detected MinSpareThreads set to non-positive.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                    "Resetting to 1 to avoid almost certain Apache failure.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Please read the documentation.");
          min_spare_threads = 1;
       }
          
  @@ -1304,15 +1307,19 @@
   
       ap_daemons_limit = atoi(arg);
       if (ap_daemons_limit > HARD_SERVER_LIMIT) {
  -       fprintf(stderr, "WARNING: MaxClients of %d exceeds compile time limit "
  -           "of %d servers,\n", ap_daemons_limit, HARD_SERVER_LIMIT);
  -       fprintf(stderr, " lowering MaxClients to %d.  To increase, please "
  -           "see the\n", HARD_SERVER_LIMIT);
  -       fprintf(stderr, " HARD_SERVER_LIMIT define in src/include/httpd.h.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: MaxClients of %d exceeds compile time limit "
  +                    "of %d servers,", ap_daemons_limit, HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " lowering MaxClients to %d.  To increase, please "
  +                    "see the", HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " HARD_SERVER_LIMIT define in src/include/httpd.h.");
          ap_daemons_limit = HARD_SERVER_LIMIT;
       } 
       else if (ap_daemons_limit < 1) {
  -	fprintf(stderr, "WARNING: Require MaxClients > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require MaxClients > 0, setting to 1");
   	ap_daemons_limit = 1;
       }
       return NULL;
  @@ -1327,15 +1334,19 @@
   
       ap_threads_per_child = atoi(arg);
       if (ap_threads_per_child > HARD_THREAD_LIMIT) {
  -        fprintf(stderr, "WARNING: ThreadsPerChild of %d exceeds compile time"
  -                "limit of %d threads,\n", ap_threads_per_child,
  -                HARD_THREAD_LIMIT);
  -        fprintf(stderr, " lowering ThreadsPerChild to %d. To increase, please"
  -                "see the\n", HARD_THREAD_LIMIT);
  -        fprintf(stderr, " HARD_THREAD_LIMIT define in src/include/httpd.h.\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: ThreadsPerChild of %d exceeds compile time"
  +                     "limit of %d threads,\n", ap_threads_per_child,
  +                     HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     " lowering ThreadsPerChild to %d. To increase, please"
  +                     "see the", HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     " HARD_THREAD_LIMIT define in src/include/httpd.h.");
       }
       else if (ap_threads_per_child < 1) {
  -	fprintf(stderr, "WARNING: Require ThreadsPerChild > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require ThreadsPerChild > 0, setting to 1");
   	ap_threads_per_child = 1;
       }
       return NULL;
  
  
  
  1.4       +2 -1      apache-2.0/src/modules/mpm/mpmt_beos/scoreboard.c
  
  Index: scoreboard.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_beos/scoreboard.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- scoreboard.c	1999/11/02 17:29:24	1.3
  +++ scoreboard.c	1999/11/19 18:46:14	1.4
  @@ -18,7 +18,8 @@
       ap_assert(!ap_scoreboard_image);
       ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
       if (ap_scoreboard_image == NULL) {
  -        fprintf(stderr, "Ouch! Out of memory reiniting scoreboard!\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Ouch! Out of memory reiniting scoreboard!");
       }
       memset(ap_scoreboard_image, 0, SCOREBOARD_SIZE);
   }
  
  
  
  1.12      +2 -2      apache-2.0/src/modules/mpm/mpmt_pthread/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/mpmt_pthread/Makefile.tmpl,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- Makefile.tmpl	1999/11/15 23:28:47	1.11
  +++ Makefile.tmpl	1999/11/19 18:46:42	1.12
  @@ -70,7 +70,7 @@
    $(OSDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
    $(INCDIR)/hsregex.h ../../../lib/apr/include/apr_lib.h \
    $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  - $(INCDIR)/ap.h $(INCDIR)/apr.h \
  + $(INCDIR)/ap.h \
    $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \
    $(INCDIR)/http_log.h $(INCDIR)/http_config.h \
    $(INCDIR)/ap_hooks.h $(INCDIR)/http_core.h \
  @@ -87,7 +87,7 @@
    ../../../lib/apr/include/apr_lib.h \
    ../../../lib/apr/include/apr_file_io.h $(INCDIR)/buff.h \
    $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
  - $(INCDIR)/apr.h $(INCDIR)/util_uri.h \
  + $(INCDIR)/util_uri.h \
    $(INCDIR)/http_log.h $(INCDIR)/http_main.h \
    $(INCDIR)/http_core.h $(INCDIR)/http_config.h \
    $(INCDIR)/ap_hooks.h $(OSDIR)/unixd.h \
  
  
  
  1.47      +26 -16    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.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- mpmt_pthread.c	1999/11/16 18:31:36	1.46
  +++ mpmt_pthread.c	1999/11/19 18:46:46	1.47
  @@ -1587,9 +1587,12 @@
   
       min_spare_threads = atoi(arg);
       if (min_spare_threads <= 0) {
  -       fprintf(stderr, "WARNING: detected MinSpareThreads set to non-positive.\n");
  -       fprintf(stderr, "Resetting to 1 to avoid almost certain Apache failure.\n");
  -       fprintf(stderr, "Please read the documentation.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: detected MinSpareThreads set to non-positive.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Resetting to 1 to avoid almost certain Apache failure.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Please read the documentation.");
          min_spare_threads = 1;
       }
          
  @@ -1616,15 +1619,18 @@
   
       ap_daemons_limit = atoi(arg);
       if (ap_daemons_limit > HARD_SERVER_LIMIT) {
  -       fprintf(stderr, "WARNING: MaxClients of %d exceeds compile time limit "
  -           "of %d servers,\n", ap_daemons_limit, HARD_SERVER_LIMIT);
  -       fprintf(stderr, " lowering MaxClients to %d.  To increase, please "
  -           "see the\n", HARD_SERVER_LIMIT);
  -       fprintf(stderr, " HARD_SERVER_LIMIT define in src/include/httpd.h.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: MaxClients of %d exceeds compile time limit "
  +                    "of %d servers,", ap_daemons_limit, HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " lowering MaxClients to %d.  To increase, please "
  +                    "see the", HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " HARD_SERVER_LIMIT define in src/include/httpd.h.");
          ap_daemons_limit = HARD_SERVER_LIMIT;
       } 
       else if (ap_daemons_limit < 1) {
  -	fprintf(stderr, "WARNING: Require MaxClients > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "WARNING: Require MaxClients > 0, setting to 1\n");
   	ap_daemons_limit = 1;
       }
       return NULL;
  @@ -1639,15 +1645,19 @@
   
       ap_threads_per_child = atoi(arg);
       if (ap_threads_per_child > HARD_THREAD_LIMIT) {
  -        fprintf(stderr, "WARNING: ThreadsPerChild of %d exceeds compile time"
  -                "limit of %d threads,\n", ap_threads_per_child,
  -                HARD_THREAD_LIMIT);
  -        fprintf(stderr, " lowering ThreadsPerChild to %d. To increase, please"
  -                "see the\n", HARD_THREAD_LIMIT);
  -        fprintf(stderr, " HARD_THREAD_LIMIT define in src/include/httpd.h.\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: ThreadsPerChild of %d exceeds compile time"
  +                     "limit of %d threads,", ap_threads_per_child,
  +                     HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     " lowering ThreadsPerChild to %d. To increase, please"
  +                     "see the", HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     " HARD_THREAD_LIMIT define in src/include/httpd.h.");
       }
       else if (ap_threads_per_child < 1) {
  -	fprintf(stderr, "WARNING: Require ThreadsPerChild > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require ThreadsPerChild > 0, setting to 1");
   	ap_threads_per_child = 1;
       }
       return NULL;
  
  
  
  1.11      +24 -14    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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- scoreboard.c	1999/11/16 18:31:39	1.10
  +++ scoreboard.c	1999/11/19 18:46:50	1.11
  @@ -49,7 +49,8 @@
       ap_assert(!ap_scoreboard_image);
       ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
       if (ap_scoreboard_image == NULL) {
  -        fprintf(stderr, "Ouch! Out of memory reiniting scoreboard!\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Ouch! Out of memory reiniting scoreboard!");
       }
       memset(ap_scoreboard_image, 0, SCOREBOARD_SIZE);
   }
  @@ -120,15 +121,16 @@
   
       m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", SCOREBOARD_SIZE);
       if (m == 0) {
  -	fprintf(stderr, "%s: Could not create OS/2 Shared memory pool.\n",
  -		ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not create OS/2 Shared memory pool.",
  +		     ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   
       rc = _uopen((Heap_t) m);
       if (rc != 0) {
  -	fprintf(stderr,
  -		"%s: Could not uopen() newly created OS/2 Shared memory pool.\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +		"%s: Could not uopen() newly created OS/2 Shared memory pool.",
   		ap_server_argv0);
       }
       ap_scoreboard_image = (scoreboard *) m;
  @@ -142,8 +144,9 @@
   
       m = (caddr_t) get_shared_heap("\\SHAREMEM\\SCOREBOARD");
       if (m == 0) {
  -	fprintf(stderr, "%s: Could not find existing OS/2 Shared memory pool.\n",
  -		ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not find existing OS/2 Shared memory pool.",
  +		     ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   
  @@ -257,14 +260,16 @@
   	int fd = mkstemp(mfile);
   	if (fd == -1) {
   	    perror("open");
  -	    fprintf(stderr, "%s: Could not open %s\n", ap_server_argv0, mfile);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s: Could not open %s", ap_server_argv0, mfile);
   	    exit(APEXIT_INIT);
   	}
   	m = mmap((caddr_t) 0, SCOREBOARD_SIZE,
   		PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
   	if (m == (caddr_t) - 1) {
   	    perror("mmap");
  -	    fprintf(stderr, "%s: Could not mmap %s\n", ap_server_argv0, mfile);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s: Could not mmap %s", ap_server_argv0, mfile);
   	    exit(APEXIT_INIT);
   	}
   	close(fd);
  @@ -276,7 +281,8 @@
   #endif
       if (m == (caddr_t) - 1) {
   	perror("mmap");
  -	fprintf(stderr, "%s: Could not mmap memory\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not mmap memory", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   #else
  @@ -286,14 +292,16 @@
       fd = open("/dev/zero", O_RDWR);
       if (fd == -1) {
   	perror("open");
  -	fprintf(stderr, "%s: Could not open /dev/zero\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not open /dev/zero", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
       m = mmap((caddr_t) 0, SCOREBOARD_SIZE,
   	     PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
       if (m == (caddr_t) - 1) {
   	perror("mmap");
  -	fprintf(stderr, "%s: Could not mmap /dev/zero\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not mmap /dev/zero", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
       close(fd);
  @@ -455,7 +463,8 @@
       ap_get_os_file(&scoreboard_fd, scoreboard_file);
       if (scoreboard_fd == -1) {
   	perror(ap_scoreboard_fname);
  -	fprintf(stderr, "Cannot open scoreboard file:\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Cannot open scoreboard file:");
   	clean_child_exit(1);
       }
   }
  @@ -483,7 +492,8 @@
       ap_get_os_file(&scoreboard_fd, scoreboard_file);
       if (scoreboard_fd == -1) {
   	perror(ap_scoreboard_fname);
  -	fprintf(stderr, "Cannot open scoreboard file:\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Cannot open scoreboard file:");
   	exit(APEXIT_INIT);
       }
       ap_register_cleanup(p, NULL, cleanup_scoreboard_file, ap_null_cleanup);
  
  
  
  1.53      +44 -25    apache-2.0/src/modules/mpm/prefork/prefork.c
  
  Index: prefork.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/prefork/prefork.c,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- prefork.c	1999/11/16 18:31:45	1.52
  +++ prefork.c	1999/11/19 18:46:57	1.53
  @@ -282,7 +282,8 @@
   	/* got lock */
   	break;
       case 0:
  -	fprintf(stderr, "didn't get lock\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "didn't get lock");
   	clean_child_exit(APEXIT_CHILDFATAL);
       case -1:
   	perror("ussetlock");
  @@ -546,7 +547,8 @@
       ap_get_os_file(&lock_fd, tempfile);
       if (lock_fd == -1) {
   	perror("open");
  -	fprintf(stderr, "Cannot open lock file: %s\n", ap_lock_fname);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Cannot open lock file: %s", ap_lock_fname);
   	exit(APEXIT_INIT);
       }
       unlink(ap_lock_fname);
  @@ -954,15 +956,16 @@
   
       m = (caddr_t) create_shared_heap("\\SHAREMEM\\SCOREBOARD", SCOREBOARD_SIZE);
       if (m == 0) {
  -	fprintf(stderr, "%s: Could not create OS/2 Shared memory pool.\n",
  -		ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not create OS/2 Shared memory pool.",
  +		     ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   
       rc = _uopen((Heap_t) m);
       if (rc != 0) {
  -	fprintf(stderr,
  -		"%s: Could not uopen() newly created OS/2 Shared memory pool.\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +		"%s: Could not uopen() newly created OS/2 Shared memory pool.",
   		ap_server_argv0);
       }
       ap_scoreboard_image = (scoreboard *) m;
  @@ -976,8 +979,9 @@
   
       m = (caddr_t) get_shared_heap("\\SHAREMEM\\SCOREBOARD");
       if (m == 0) {
  -	fprintf(stderr, "%s: Could not find existing OS/2 Shared memory pool.\n",
  -		ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not find existing OS/2 Shared memory pool.",
  +		     ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   
  @@ -1091,14 +1095,16 @@
   	int fd = mkstemp(mfile);
   	if (fd == -1) {
   	    perror("open");
  -	    fprintf(stderr, "%s: Could not open %s\n", ap_server_argv0, mfile);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s: Could not open %s", ap_server_argv0, mfile);
   	    exit(APEXIT_INIT);
   	}
   	m = mmap((caddr_t) 0, SCOREBOARD_SIZE,
   		PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
   	if (m == (caddr_t) - 1) {
   	    perror("mmap");
  -	    fprintf(stderr, "%s: Could not mmap %s\n", ap_server_argv0, mfile);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s: Could not mmap %s", ap_server_argv0, mfile);
   	    exit(APEXIT_INIT);
   	}
   	close(fd);
  @@ -1110,7 +1116,8 @@
   #endif
       if (m == (caddr_t) - 1) {
   	perror("mmap");
  -	fprintf(stderr, "%s: Could not mmap memory\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not mmap memory", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
   #else
  @@ -1120,14 +1127,16 @@
       fd = open("/dev/zero", O_RDWR);
       if (fd == -1) {
   	perror("open");
  -	fprintf(stderr, "%s: Could not open /dev/zero\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not open /dev/zero", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
       m = mmap((caddr_t) 0, SCOREBOARD_SIZE,
   	     PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
       if (m == (caddr_t) - 1) {
   	perror("mmap");
  -	fprintf(stderr, "%s: Could not mmap /dev/zero\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: Could not mmap /dev/zero", ap_server_argv0);
   	exit(APEXIT_INIT);
       }
       close(fd);
  @@ -1250,7 +1259,8 @@
       ap_scoreboard_image = (scoreboard *) gsysc(SCOREBOARD_FRAMES, SCOREBOARD_NAME);
   
       if (!ap_scoreboard_image) {
  -        fprintf(stderr, "httpd: Could not create scoreboard system heap storage.\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "httpd: Could not create scoreboard system heap storage.");
           exit(APEXIT_INIT);
       }
   
  @@ -1317,7 +1327,8 @@
       scoreboard_fd = ap_popenf(p, ap_scoreboard_fname, O_CREAT | O_BINARY | O_RDWR, 0666);
       if (scoreboard_fd == -1) {
   	perror(ap_scoreboard_fname);
  -	fprintf(stderr, "Cannot open scoreboard file:\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Cannot open scoreboard file:");
   	clean_child_exit(1);
       }
   }
  @@ -1343,7 +1354,8 @@
       scoreboard_fd = ap_popenf(p, ap_scoreboard_fname, O_CREAT | O_BINARY | O_RDWR, 0644);
       if (scoreboard_fd == -1) {
   	perror(ap_scoreboard_fname);
  -	fprintf(stderr, "Cannot open scoreboard file:\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Cannot open scoreboard file:");
   	exit(APEXIT_INIT);
       }
       ap_register_cleanup(p, NULL, cleanup_scoreboard_file, ap_null_cleanup);
  @@ -2868,9 +2880,12 @@
   
       ap_daemons_min_free = atoi(arg);
       if (ap_daemons_min_free <= 0) {
  -       fprintf(stderr, "WARNING: detected MinSpareServers set to non-positive.\n");
  -       fprintf(stderr, "Resetting to 1 to avoid almost certain Apache failure.\n");
  -       fprintf(stderr, "Please read the documentation.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: detected MinSpareServers set to non-positive.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Resetting to 1 to avoid almost certain Apache failure.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Please read the documentation.");
          ap_daemons_min_free = 1;
       }
          
  @@ -2897,15 +2912,19 @@
   
       ap_daemons_limit = atoi(arg);
       if (ap_daemons_limit > HARD_SERVER_LIMIT) {
  -       fprintf(stderr, "WARNING: MaxClients of %d exceeds compile time limit "
  -           "of %d servers,\n", ap_daemons_limit, HARD_SERVER_LIMIT);
  -       fprintf(stderr, " lowering MaxClients to %d.  To increase, please "
  -           "see the\n", HARD_SERVER_LIMIT);
  -       fprintf(stderr, " HARD_SERVER_LIMIT define in src/include/httpd.h.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: MaxClients of %d exceeds compile time limit "
  +                    "of %d servers,", ap_daemons_limit, HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " lowering MaxClients to %d.  To increase, please "
  +                    "see the", HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                    " HARD_SERVER_LIMIT define in src/include/httpd.h.");
          ap_daemons_limit = HARD_SERVER_LIMIT;
       } 
       else if (ap_daemons_limit < 1) {
  -	fprintf(stderr, "WARNING: Require MaxClients > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require MaxClients > 0, setting to 1");
   	ap_daemons_limit = 1;
       }
       return NULL;
  
  
  
  1.3       +1 -1      apache-2.0/src/modules/mpm/spmt_os2/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/Makefile.tmpl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.tmpl	1999/07/16 05:30:33	1.2
  +++ Makefile.tmpl	1999/11/19 18:47:08	1.3
  @@ -52,7 +52,7 @@
    $(INCDIR)/os-inline.c $(INCDIR)/ap_ctype.h \
    $(INCDIR)/hsregex.h $(INCDIR)/alloc.h \
    $(INCDIR)/buff.h $(INCDIR)/ap_iol.h \
  - $(INCDIR)/ap.h $(INCDIR)/apr.h \
  + $(INCDIR)/ap.h \
    $(INCDIR)/util_uri.h $(INCDIR)/http_main.h \
    $(INCDIR)/http_log.h $(INCDIR)/http_config.h \
    $(INCDIR)/ap_hooks.h $(INCDIR)/http_core.h \
  
  
  
  1.23      +18 -10    apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c
  
  Index: spmt_os2.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/mpm/spmt_os2/spmt_os2.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- spmt_os2.c	1999/11/16 18:31:49	1.22
  +++ spmt_os2.c	1999/11/19 18:47:15	1.23
  @@ -147,7 +147,8 @@
           ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
   
           if (ap_scoreboard_image == NULL) {
  -            fprintf(stderr, "Ouch! Out of memory reiniting scoreboard!\n");
  +            ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Ouch! Out of memory reiniting scoreboard!");
           }
       }
   
  @@ -1672,9 +1673,12 @@
   
       ap_daemons_min_free = atoi(arg);
       if (ap_daemons_min_free <= 0) {
  -       fprintf(stderr, "WARNING: detected MinSpareServers set to non-positive.\n");
  -       fprintf(stderr, "Resetting to 1 to avoid almost certain Apache failure.\n");
  -       fprintf(stderr, "Please read the documentation.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: detected MinSpareServers set to non-positive.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Resetting to 1 to avoid almost certain Apache failure.");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "Please read the documentation.");
          ap_daemons_min_free = 1;
       }
          
  @@ -1701,15 +1705,19 @@
   
       ap_daemons_limit = atoi(arg);
       if (ap_daemons_limit > HARD_SERVER_LIMIT) {
  -       fprintf(stderr, "WARNING: MaxClients of %d exceeds compile time limit "
  -           "of %d servers,\n", ap_daemons_limit, HARD_SERVER_LIMIT);
  -       fprintf(stderr, " lowering MaxClients to %d.  To increase, please "
  -           "see the\n", HARD_SERVER_LIMIT);
  -       fprintf(stderr, " HARD_SERVER_LIMIT define in src/include/httpd.h.\n");
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    "WARNING: MaxClients of %d exceeds compile time limit "
  +                    "of %d servers,", ap_daemons_limit, HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " lowering MaxClients to %d.  To increase, please "
  +                    "see the", HARD_SERVER_LIMIT);
  +       ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                    " HARD_SERVER_LIMIT define in src/include/httpd.h.");
          ap_daemons_limit = HARD_SERVER_LIMIT;
       } 
       else if (ap_daemons_limit < 1) {
  -	fprintf(stderr, "WARNING: Require MaxClients > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require MaxClients > 0, setting to 1");
   	ap_daemons_limit = 1;
       }
       return NULL;
  
  
  
  1.31      +12 -8     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.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- winnt.c	1999/11/16 18:31:55	1.30
  +++ winnt.c	1999/11/19 18:47:29	1.31
  @@ -630,7 +630,8 @@
   
       new_job = (joblist *) malloc(sizeof(joblist));
       if (new_job == NULL) {
  -	fprintf(stderr, "Ouch!  Out of memory in add_job()!\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Ouch!  Out of memory in add_job()!");
           return;
       }
       new_job->next = NULL;
  @@ -1755,15 +1756,18 @@
   
       ap_threads_per_child = atoi(arg);
       if (ap_threads_per_child > HARD_THREAD_LIMIT) {
  -        fprintf(stderr, "WARNING: ThreadsPerChild of %d exceeds compile time"
  -                " limit of %d threads,\n", ap_threads_per_child,
  -                HARD_THREAD_LIMIT);
  -        fprintf(stderr, " lowering ThreadsPerChild to %d. To increase, please"
  -                " see the\n", HARD_THREAD_LIMIT);
  -        fprintf(stderr, " HARD_THREAD_LIMIT define in src/include/httpd.h.\n");
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: ThreadsPerChild of %d exceeds compile time"
  +                     " limit of %d threads,", ap_threads_per_child,
  +                     HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,                             " lowering ThreadsPerChild to %d. To increase, please"
  +                     " see the", HARD_THREAD_LIMIT);
  +        ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     " HARD_THREAD_LIMIT define in src/include/httpd.h.");
       }
       else if (ap_threads_per_child < 1) {
  -	fprintf(stderr, "WARNING: Require ThreadsPerChild > 0, setting to 1\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "WARNING: Require ThreadsPerChild > 0, setting to 1");
   	ap_threads_per_child = 1;
       }
       return NULL;
  
  
  
  1.3       +10 -5     apache-2.0/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_proxy.c	1999/08/31 05:33:30	1.2
  +++ mod_proxy.c	1999/11/19 18:47:56	1.3
  @@ -581,26 +581,31 @@
   
   	if (ap_proxy_is_ipaddr(New, parms->pool)) {
   #if DEBUGGING
  -	    fprintf(stderr, "Parsed addr %s\n", inet_ntoa(New->addr));
  -	    fprintf(stderr, "Parsed mask %s\n", inet_ntoa(New->mask));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Parsed addr %s", inet_ntoa(New->addr));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Parsed mask %s", inet_ntoa(New->mask));
   #endif
   	}
   	else if (ap_proxy_is_domainname(New, parms->pool)) {
   	    ap_str_tolower(New->name);
   #if DEBUGGING
  -	    fprintf(stderr, "Parsed domain %s\n", New->name);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Parsed domain %s", New->name);
   #endif
   	}
   	else if (ap_proxy_is_hostname(New, parms->pool)) {
   	    ap_str_tolower(New->name);
   #if DEBUGGING
  -	    fprintf(stderr, "Parsed host %s\n", New->name);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Parsed host %s", New->name);
   #endif
   	}
   	else {
   	    ap_proxy_is_word(New, parms->pool);
   #if DEBUGGING
  -	    fprintf(stderr, "Parsed word %s\n", New->name);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Parsed word %s", New->name);
   #endif
   	}
       }
  
  
  
  1.5       +19 -11    apache-2.0/src/modules/proxy/proxy_cache.c
  
  Index: proxy_cache.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_cache.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- proxy_cache.c	1999/08/31 05:33:32	1.4
  +++ proxy_cache.c	1999/11/19 18:48:08	1.5
  @@ -228,22 +228,25 @@
   #ifndef NO_SETSID
   		    if ((pgrp = setsid()) == -1) {
   			perror("setsid");
  -			fprintf(stderr, "%s: setsid failed\n",
  -				ap_server_argv0);
  +			ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 
  +                                     0, NULL, "%s: setsid failed",
  +				     ap_server_argv0);
   			exit(1);
   		    }
   #elif defined(NEXT) || defined(NEWSOS)
   		    if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) {
   			perror("setpgrp");
  -			fprintf(stderr, "%S: setpgrp or getpgrp failed\n",
  -				ap_server_argv0);
  +			ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO,
  +                                     0, NULL, "%S: setpgrp or getpgrp failed",
  +				     ap_server_argv0);
   			exit(1);
   		    }
   #else
   		    if ((pgrp = setpgrp(getpid(), 0)) == -1) {
   			perror("setpgrp");
  -			fprintf(stderr, "%s: setpgrp failed\n",
  -				ap_server_argv0);
  +			ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO,
  +                                     0, NULL, "%s: setpgrp failed",
  +				     ap_server_argv0);
   			exit(1);
   		    }
   #endif
  @@ -373,7 +376,8 @@
   	sprintf(filename, "%s%s", cachedir, fent->file);
   	Explain3("GC Unlinking %s (expiry %ld, garbage_now %ld)", filename, fent->expire, garbage_now);
   #if TESTING
  -	fprintf(stderr, "Would unlink %s\n", filename);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "Would unlink %s", filename);
   #else
   	if (unlink(filename) == -1) {
   	    if (errno != ENOENT)
  @@ -440,7 +444,8 @@
   		ap_log_error(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, r->server,
   			     "proxy gc: deleting orphaned cache file %s", filename);
   #if TESTING
  -		fprintf(stderr, "Would unlink %s\n", filename);
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
  +                             NULL, "Would unlink %s", filename);
   #else
   		unlink(filename);
   #endif
  @@ -463,7 +468,8 @@
   		ap_snprintf(newcachedir, sizeof(newcachedir),
   			    "%s%s", cachedir, ent->d_name);
   #if TESTING
  -		fprintf(stderr, "Would remove directory %s\n", newcachedir);
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
  +                             NULL, "Would remove directory %s", newcachedir);
   #else
   		rmdir(newcachedir);
   #endif
  @@ -499,7 +505,8 @@
   		ap_snprintf(newcachedir, sizeof(newcachedir),
   			    "%s%s", cachedir, ent->d_name);
   #if TESTING
  -		fprintf(stderr, "Would remove directory %s\n", newcachedir);
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
  +                             NULL, "Would remove directory %s", newcachedir);
   #else
   		rmdir(newcachedir);
   #endif
  @@ -529,7 +536,8 @@
   		ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, r->server,
   			     "proxy: deleting bad cache file with future date: %s", filename);
   #if TESTING
  -		fprintf(stderr, "Would unlink bad file %s\n", filename);
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, 
  +                             NULL, "Would unlink bad file %s", filename);
   #else
   		unlink(filename);
   #endif
  
  
  
  1.6       +35 -18    apache-2.0/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- proxy_util.c	1999/10/11 22:39:46	1.5
  +++ proxy_util.c	1999/11/19 18:48:14	1.6
  @@ -981,17 +981,19 @@
   	bits = 8 * quads;
   
   	if (bits != 32)		/* no warning for fully qualified IP address */
  -	    fprintf(stderr, "Warning: NetMask not supplied with IP-Addr; guessing: %s/%ld\n",
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "Warning: NetMask not supplied with IP-Addr; guessing: %s/%ld",
   		    inet_ntoa(This->addr), bits);
       }
   
       This->mask.s_addr = htonl(INADDR_NONE << (32 - bits));
   
       if (*addr == '\0' && (This->addr.s_addr & ~This->mask.s_addr) != 0) {
  -	fprintf(stderr, "Warning: NetMask and IP-Addr disagree in %s/%ld\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, "Warning: NetMask and IP-Addr disagree in %s/%ld\n",
   		inet_ntoa(This->addr), bits);
   	This->addr.s_addr &= This->mask.s_addr;
  -	fprintf(stderr, "         Set to %s/%ld\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "         Set to %s/%ld",
   		inet_ntoa(This->addr), bits);
       }
   
  @@ -1026,17 +1028,23 @@
   
   	if (This->addr.s_addr == (addr.s_addr & This->mask.s_addr)) {
   #if DEBUGGING
  -	    fprintf(stderr, "1)IP-Match: %s[%s] <-> ", host, inet_ntoa(addr));
  -	    fprintf(stderr, "%s/", inet_ntoa(This->addr));
  -	    fprintf(stderr, "%s\n", inet_ntoa(This->mask));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "1)IP-Match: %s[%s] <-> ", host, inet_ntoa(addr));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s/", inet_ntoa(This->addr));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s", inet_ntoa(This->mask));
   #endif
   	    return 1;
   	}
   #if DEBUGGING
   	else {
  -	    fprintf(stderr, "1)IP-NoMatch: %s[%s] <-> ", host, inet_ntoa(addr));
  -	    fprintf(stderr, "%s/", inet_ntoa(This->addr));
  -	    fprintf(stderr, "%s\n", inet_ntoa(This->mask));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "1)IP-NoMatch: %s[%s] <-> ", host, inet_ntoa(addr));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s/", inet_ntoa(This->addr));
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "%s", inet_ntoa(This->mask));
   	}
   #endif
       }
  @@ -1048,7 +1056,8 @@
   
   	if (found != NULL) {
   #if DEBUGGING
  -	    fprintf(stderr, "2)IP-NoMatch: hostname=%s msg=%s\n", host, found);
  +	    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                         "2)IP-NoMatch: hostname=%s msg=%s", host, found);
   #endif
   	    return 0;
   	}
  @@ -1063,17 +1072,23 @@
   	    ip_list = (struct in_addr *) *ip_listptr;
   	    if (This->addr.s_addr == (ip_list->s_addr & This->mask.s_addr)) {
   #if DEBUGGING
  -		fprintf(stderr, "3)IP-Match: %s[%s] <-> ", found, inet_ntoa(*ip_list));
  -		fprintf(stderr, "%s/", inet_ntoa(This->addr));
  -		fprintf(stderr, "%s\n", inet_ntoa(This->mask));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "3)IP-Match: %s[%s] <-> ", found, inet_ntoa(*ip_list));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "%s/", inet_ntoa(This->addr));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "%s", inet_ntoa(This->mask));
   #endif
   		return 1;
   	    }
   #if DEBUGGING
   	    else {
  -		fprintf(stderr, "3)IP-NoMatch: %s[%s] <-> ", found, inet_ntoa(*ip_list));
  -		fprintf(stderr, "%s/", inet_ntoa(This->addr));
  -		fprintf(stderr, "%s\n", inet_ntoa(This->mask));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "3)IP-NoMatch: %s[%s] <-> ", found, inet_ntoa(*ip_list));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "%s/", inet_ntoa(This->addr));
  +		ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL,
  +                       "%s", inet_ntoa(This->mask));
   	    }
   #endif
   	}
  @@ -1098,7 +1113,8 @@
   
   #if 0
       if (addr[i] == ':') {
  -	fprintf(stderr, "@@@@ handle optional port in proxy_is_domainname()\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "@@@@ handle optional port in proxy_is_domainname()");
   	/* @@@@ handle optional port */
       }
   #endif
  @@ -1151,7 +1167,8 @@
   
   #if 0
       if (addr[i] == ':') {
  -	fprintf(stderr, "@@@@ handle optional port in proxy_is_hostname()\n");
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "@@@@ handle optional port in proxy_is_hostname()");
   	/* @@@@ handle optional port */
       }
   #endif
  
  
  
  1.4       +2 -1      apache-2.0/src/modules/standard/mod_auth_digest.c
  
  Index: mod_auth_digest.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_auth_digest.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_auth_digest.c	1999/11/04 06:09:54	1.3
  +++ mod_auth_digest.c	1999/11/19 18:48:28	1.4
  @@ -257,7 +257,8 @@
   #ifdef HAVE_SHMEM_MM
   static ap_status_t cleanup_tables(void *not_used)
   {
  -    fprintf(stderr, "Digest: cleaning up shared memory\n");
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                 "Digest: cleaning up shared memory");
       fflush(stderr);
   
       if (client_mm) {
  
  
  
  1.8       +6 -4      apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mod_include.c	1999/11/01 11:45:29	1.7
  +++ mod_include.c	1999/11/19 18:48:40	1.8
  @@ -202,8 +202,9 @@
      ap_status_t status = ap_getc(&c, f); \
      if (status != APR_SUCCESS) { /* either EOF or error -- needs error handling if latter */ \
          if (status != APR_EOF) { \
  -           fprintf(stderr, "encountered error in GET_CHAR macro, " \
  -                   "mod_include.\n"); \
  +           ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, \
  +                        "encountered error in GET_CHAR macro, " \
  +                        "mod_include."); \
          } \
          FLUSH_BUF(r); \
          ap_close(f); \
  @@ -247,8 +248,9 @@
      ap_status_t status = ap_getc(&c, f); \
      if (status != APR_SUCCESS) { /* either EOF or error -- needs error handling if latter */ \
          if (status != APR_EOF) { \
  -           fprintf(stderr, "encountered error in GET_CHAR macro, " \
  -                   "mod_include.\n"); \
  +           ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, \
  +                        "encountered error in GET_CHAR macro, " \
  +                        "mod_include."); \
          } \
          ap_close(f); \
          return r; \
  
  
  
  1.12      +9 -6      apache-2.0/src/modules/standard/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_negotiation.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- mod_negotiation.c	1999/10/20 12:50:08	1.11
  +++ mod_negotiation.c	1999/11/19 18:48:47	1.12
  @@ -580,8 +580,9 @@
       }
   
   #ifdef NEG_DEBUG
  -    fprintf(stderr, "dont_fiddle_headers=%d use_rvsa=%d ua_supports_trans=%d "
  -            "send_alternates=%d, may_choose=%d\n",
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +            "dont_fiddle_headers=%d use_rvsa=%d ua_supports_trans=%d "
  +            "send_alternates=%d, may_choose=%d",
               neg->dont_fiddle_headers, neg->use_rvsa,  
               neg->ua_supports_trans, neg->send_alternates, neg->may_choose);
   #endif
  @@ -1757,9 +1758,10 @@
       */
   
   #ifdef NEG_DEBUG
  -    fprintf(stderr, "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +           "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
              "mimeq=%1.3f langq=%1.3f charq=%1.3f encq=%1.3f "
  -           "q=%1.5f definite=%d\n",            
  +           "q=%1.5f definite=%d",            
               (variant->file_name ? variant->file_name : ""),
               (variant->mime_type ? variant->mime_type : ""),
               (variant->content_languages
  @@ -1827,8 +1829,9 @@
        */
   
   #ifdef NEG_DEBUG
  -    fprintf(stderr, "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
  -           "mimeq=%1.3f langq=%1.3f langidx=%d charq=%1.3f encq=%1.3f \n",
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +           "Variant: file=%s type=%s lang=%s sourceq=%1.3f "
  +           "mimeq=%1.3f langq=%1.3f langidx=%d charq=%1.3f encq=%1.3f ",
               (variant->file_name ? variant->file_name : ""),
               (variant->mime_type ? variant->mime_type : ""),
               (variant->content_languages
  
  
  
  1.6       +4 -2      apache-2.0/src/modules/standard/mod_so.c
  
  Index: mod_so.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_so.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_so.c	1999/11/14 06:07:40	1.5
  +++ mod_so.c	1999/11/19 18:48:54	1.6
  @@ -318,14 +318,16 @@
   
   static const char *load_file(cmd_parms *cmd, void *dummy, char *filename)
   {
  -    fprintf(stderr, "WARNING: LoadFile not supported on this platform\n");
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                 "WARNING: LoadFile not supported on this platform");
       return NULL;
   }
   
   static const char *load_module(cmd_parms *cmd, void *dummy, 
   	                       char *modname, char *filename)
   {
  -    fprintf(stderr, "WARNING: LoadModule not supported on this platform\n");
  +    ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                 "WARNING: LoadModule not supported on this platform");
       return NULL;
   }
   
  
  
  
  1.6       +8 -4      apache-2.0/src/os/beos/beosd.c
  
  Index: beosd.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/beos/beosd.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- beosd.c	1999/11/16 18:32:05	1.5
  +++ beosd.c	1999/11/19 18:49:09	1.6
  @@ -80,7 +80,8 @@
   	exit(0);
       else if (x == -1) {
   	perror("fork");
  -	fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to fork new process", ap_server_argv0);
   	exit(1);
       }
   */
  @@ -88,13 +89,15 @@
   
       if ((pgrp = setsid()) == -1) {
   	perror("setsid");
  -	fprintf(stderr, "%s: setsid failed\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: setsid failed", ap_server_argv0);
   	exit(1);
       }
   
       /* close out the standard file descriptors */
       if (freopen("/dev/null", "r", stdin) == NULL) {
  -	fprintf(stderr, "%s: unable to replace stdin with /dev/null: %s\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to replace stdin with /dev/null: %s",
   		ap_server_argv0, strerror(errno));
   	/* continue anyhow -- note we can't close out descriptor 0 because we
   	 * have nothing to replace it with, and if we didn't have a descriptor
  @@ -103,7 +106,8 @@
   	 */
       }
       if (freopen("/dev/null", "w", stdout) == NULL) {
  -	fprintf(stderr, "%s: unable to replace stdout with /dev/null: %s\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to replace stdout with /dev/null: %s",
   		ap_server_argv0, strerror(errno));
       }
       /* stderr is a tricky one, we really want it to be the error_log,
  
  
  
  1.5       +2 -2      apache-2.0/src/os/os2/Makefile.tmpl
  
  Index: Makefile.tmpl
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/os2/Makefile.tmpl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Makefile.tmpl	1999/09/23 19:08:16	1.4
  +++ Makefile.tmpl	1999/11/19 18:49:13	1.5
  @@ -55,7 +55,7 @@
    $(SRCDIR)/lib/apr/include/apr_config.h $(SRCDIR)/lib/apr/include/apr_errno.h \
    $(SRCDIR)/lib/apr/include/apr_lib.h $(SRCDIR)/lib/apr/include/apr_file_io.h \
    $(INCDIR)/buff.h \
  - $(INCDIR)/ap_iol.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  + $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
    $(INCDIR)/util_uri.h iol_socket.h
   os-inline.o: os-inline.c $(INCDIR)/ap_config.h \
    $(INCDIR)/ap_mmn.h $(INCDIR)/ap_config_auto.h \
  @@ -68,5 +68,5 @@
    $(SRCDIR)/lib/apr/include/apr_config.h $(SRCDIR)/lib/apr/include/apr_errno.h \
    $(SRCDIR)/lib/apr/include/apr_lib.h $(SRCDIR)/lib/apr/include/apr_file_io.h \
    $(INCDIR)/buff.h \
  - $(INCDIR)/ap_iol.h $(INCDIR)/ap.h $(INCDIR)/apr.h \
  + $(INCDIR)/ap_iol.h $(INCDIR)/ap.h \
    $(INCDIR)/util_uri.h $(INCDIR)/http_log.h
  
  
  
  1.6       +13 -7     apache-2.0/src/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/unix/unixd.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- unixd.c	1999/10/20 12:50:11	1.5
  +++ unixd.c	1999/11/19 18:49:20	1.6
  @@ -76,7 +76,8 @@
   	exit(0);
       else if (x == -1) {
   	perror("fork");
  -	fprintf(stderr, "%s: unable to fork new process\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to fork new process", ap_server_argv0);
   	exit(1);
       }
       RAISE_SIGSTOP(DETACH);
  @@ -84,13 +85,15 @@
   #ifndef NO_SETSID
       if ((pgrp = setsid()) == -1) {
   	perror("setsid");
  -	fprintf(stderr, "%s: setsid failed\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: setsid failed", ap_server_argv0);
   	exit(1);
       }
   #elif defined(NEXT) || defined(NEWSOS)
       if (setpgrp(0, getpid()) == -1 || (pgrp = getpgrp(0)) == -1) {
   	perror("setpgrp");
  -	fprintf(stderr, "%s: setpgrp or getpgrp failed\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: setpgrp or getpgrp failed", ap_server_argv0);
   	exit(1);
       }
   #elif defined(OS2) || defined(TPF)
  @@ -102,14 +105,16 @@
   #else
       if ((pgrp = setpgrp(getpid(), 0)) == -1) {
   	perror("setpgrp");
  -	fprintf(stderr, "%s: setpgrp failed\n", ap_server_argv0);
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: setpgrp failed", ap_server_argv0);
   	exit(1);
       }
   #endif
   
       /* close out the standard file descriptors */
       if (freopen("/dev/null", "r", stdin) == NULL) {
  -	fprintf(stderr, "%s: unable to replace stdin with /dev/null: %s\n",
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to replace stdin with /dev/null: %s",
   		ap_server_argv0, strerror(errno));
   	/* continue anyhow -- note we can't close out descriptor 0 because we
   	 * have nothing to replace it with, and if we didn't have a descriptor
  @@ -118,8 +123,9 @@
   	 */
       }
       if (freopen("/dev/null", "w", stdout) == NULL) {
  -	fprintf(stderr, "%s: unable to replace stdout with /dev/null: %s\n",
  -		ap_server_argv0, strerror(errno));
  +	ap_log_error(APLOG_MARK, APLOG_STARTUP | APLOG_NOERRNO, 0, NULL, 
  +                     "%s: unable to replace stdout with /dev/null: %s",
  +		     ap_server_argv0, strerror(errno));
       }
       /* stderr is a tricky one, we really want it to be the error_log,
        * but we haven't opened that yet.  So leave it alone for now and it'll
  
  
  

Mime
View raw message