httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@locus.apache.org
Subject cvs commit: apache-2.0/src/os/unix unixd.c unixd.h
Date Sat, 17 Jun 2000 16:29:54 GMT
ben         00/06/17 09:29:53

  Modified:    src/include ap_listen.h httpd.h
               src/main Makefile.in http_config.c http_core.c
                        http_protocol.c http_request.c http_vhost.c
                        listen.c util.c util_uri.c
               src/modules/mpm/mpmt_pthread mpmt_pthread.c
               src/modules/standard mod_autoindex.c mod_include.c
               src/os/unix unixd.c unixd.h
  Added:       src/main util_debug.c
  Log:
  More consification, correct command initialisation.
  
  Revision  Changes    Path
  1.13      +10 -9     apache-2.0/src/include/ap_listen.h
  
  Index: ap_listen.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_listen.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ap_listen.h	2000/05/19 05:01:52	1.12
  +++ ap_listen.h	2000/06/17 16:29:46	1.13
  @@ -73,16 +73,17 @@
   
   void ap_listen_pre_config(void);
   int ap_listen_open(process_rec *process, unsigned port);
  -const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, char *arg);
  -const char *ap_set_listener(cmd_parms *cmd, void *dummy, char *ips);
  -const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, char *arg);
  +const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg);
  +const char *ap_set_listener(cmd_parms *cmd, void *dummy, const char *ips);
  +const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy,
  +				    const char *arg);
   
   #define LISTEN_COMMANDS	\
  -{ "ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, TAKE1, \
  -  "Maximum length of the queue of pending connections, as used by listen(2)" }, \
  -{ "Listen", ap_set_listener, NULL, RSRC_CONF, TAKE1, \
  -  "A port number or a numeric IP address and a port number"}, \
  -{ "SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, TAKE1, \
  -  "Send buffer size in bytes"},
  +AP_INIT_TAKE1("ListenBacklog", ap_set_listenbacklog, NULL, RSRC_CONF, \
  +  "Maximum length of the queue of pending connections, as used by listen(2)"), \
  +AP_INIT_TAKE1("Listen", ap_set_listener, NULL, RSRC_CONF, \
  +  "A port number or a numeric IP address and a port number"), \
  +AP_INIT_TAKE1("SendBufferSize", ap_set_send_buffer_size, NULL, RSRC_CONF, \
  +  "Send buffer size in bytes"),
   
   #endif
  
  
  
  1.58      +6 -1      apache-2.0/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- httpd.h	2000/06/17 11:13:04	1.57
  +++ httpd.h	2000/06/17 16:29:46	1.58
  @@ -931,7 +931,7 @@
   API_EXPORT(char *) ap_getword_nulls_nc(ap_pool_t *p, char **line, char stop);
   API_EXPORT(char *) ap_getword_conf(ap_pool_t *p, const char **line);
   API_EXPORT(char *) ap_getword_conf_nc(ap_pool_t *p, char **line);
  -API_EXPORT(char *) ap_resolve_env(ap_pool_t *p, const char * word); 
  +API_EXPORT(const char *) ap_resolve_env(ap_pool_t *p, const char * word); 
   
   API_EXPORT(const char *) ap_size_list_item(const char **field, int *len);
   API_EXPORT(char *) ap_get_list_item(ap_pool_t *p, const char **field);
  @@ -1050,13 +1050,18 @@
     */
   #ifdef AP_DEBUG
   
  +# define strchr(s, c)	ap_strchr(s,c)
   # define strrchr(s, c)  ap_strrchr(s,c)
   
  +char *ap_strchr(char *s, int c);
  +const char *ap_strchr_c(const char *s, int c);
   char *ap_strrchr(char *s, int c);
   const char *ap_strrchr_c(const char *s, int c);
   
   #else
   
  +# define ap_strchr(s, c)	strchr(s, c)
  +# define ap_strchr_c(s, c)	strchr(s, c)
   # define ap_strrchr(s, c)	strrchr(s, c)
   # define ap_strrchr_c(s, c)	strrchr(s, c)
   
  
  
  
  1.13      +2 -2      apache-2.0/src/main/Makefile.in
  
  Index: Makefile.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/Makefile.in,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Makefile.in	2000/06/11 11:20:58	1.12
  +++ Makefile.in	2000/06/17 16:29:47	1.13
  @@ -8,7 +8,7 @@
   	http_protocol.c http_request.c http_vhost.c util.c util_date.c \
   	util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
   	rfc1413.c http_connection.c iol_file.c listen.c mpm_common.c \
  -	util_charset.c
  +	util_charset.c util_debug.c
   
   include $(top_srcdir)/build/ltlib.mk
   
  @@ -16,7 +16,7 @@
   gen_uri_delims: $(gen_uri_delims_OBJECTS)
   	$(LINK) $(EXTRA_LDFLAGS) $(gen_uri_delims_OBJECTS)
   
  -gen_test_char_OBJECTS = gen_test_char.lo
  +gen_test_char_OBJECTS = gen_test_char.lo util_debug.lo
   gen_test_char: $(gen_test_char_OBJECTS)
   	$(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS)
   
  
  
  
  1.64      +6 -5      apache-2.0/src/main/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_config.c,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- http_config.c	2000/06/17 11:13:04	1.63
  +++ http_config.c	2000/06/17 16:29:47	1.64
  @@ -277,13 +277,13 @@
       int nwildhandlers = 0;
       const handler_rec *handp;
       fast_handler_rec *ph, *pw;
  -    char *starp;
  +    const char *starp;
   
       for (modp = top_module; modp; modp = modp->next) {
   	if (!modp->handlers)
   	    continue;
   	for (handp = modp->handlers; handp->content_type; ++handp) {
  -	    if (strchr(handp->content_type, '*')) {
  +	    if (ap_strchr_c(handp->content_type, '*')) {
                   nwildhandlers ++;
               } else {
                   nhandlers ++;
  @@ -296,7 +296,7 @@
   	if (!modp->handlers)
   	    continue;
   	for (handp = modp->handlers; handp->content_type; ++handp) {
  -	    if ((starp = strchr(handp->content_type, '*'))) {
  +	    if ((starp = ap_strchr_c(handp->content_type, '*'))) {
                   pw->hr.content_type = handp->content_type;
                   pw->hr.handler = handp->handler;
   		pw->len = starp - handp->content_type;
  @@ -319,7 +319,7 @@
   {
       fast_handler_rec *handp;
       const char *handler;
  -    char *p;
  +    const char *p;
       size_t handler_len;
       int result = HTTP_INTERNAL_SERVER_ERROR;
   
  @@ -329,7 +329,8 @@
       }
       else {
           handler = r->content_type ? r->content_type : ap_default_type(r);
  -        if ((p = strchr(handler, ';')) != NULL) { /* MIME type arguments */
  +        if ((p = ap_strchr_c(handler, ';')) != NULL) {
  +	    /* MIME type arguments */
               while (p > handler && p[-1] == ' ')
   	        --p;		/* strip trailing spaces */
   	    handler_len = p - handler;
  
  
  
  1.77      +1 -1      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- http_core.c	2000/06/17 12:33:30	1.76
  +++ http_core.c	2000/06/17 16:29:47	1.77
  @@ -1152,7 +1152,7 @@
       }
   
       /* Heuristic to determine second argument. */
  -    if (strchr(msg,' ')) 
  +    if (ap_strchr_c(msg,' ')) 
   	what = MSG;
       else if (msg[0] == '/')
   	what = LOCAL_PATH;
  
  
  
  1.82      +1 -1      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- http_protocol.c	2000/06/17 02:22:03	1.81
  +++ http_protocol.c	2000/06/17 16:29:48	1.82
  @@ -210,7 +210,7 @@
               return 0;
       }
   
  -    if (!strchr(range, ',')) {
  +    if (!ap_strchr_c(range, ',')) {
           /* A single range */
           if (!parse_byterange(ap_pstrdup(r->pool, range + 6), r->clength,
                                &range_start, &range_end))
  
  
  
  1.33      +1 -1      apache-2.0/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- http_request.c	2000/06/12 15:28:53	1.32
  +++ http_request.c	2000/06/17 16:29:48	1.33
  @@ -865,7 +865,7 @@
        * not even have to redo access checks.
        */
   
  -    if (strchr(new_file, '/') == NULL) {
  +    if (ap_strchr_c(new_file, '/') == NULL) {
           char *udir = ap_make_dirstr_parent(rnew->pool, r->uri);
   
           rnew->uri = ap_make_full_path(rnew->pool, udir, new_file);
  
  
  
  1.22      +4 -8      apache-2.0/src/main/http_vhost.c
  
  Index: http_vhost.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_vhost.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- http_vhost.c	2000/06/17 11:13:05	1.21
  +++ http_vhost.c	2000/06/17 16:29:48	1.22
  @@ -179,7 +179,7 @@
    * *paddr is the variable used to keep track of **paddr between calls
    * port is the default port to assume
    */
  -static const char *get_addresses(ap_pool_t *p, const char *w,
  +static const char *get_addresses(ap_pool_t *p, const char *w_,
   				 server_addr_rec ***paddr, unsigned port)
   {
       struct hostent *hep;
  @@ -187,10 +187,12 @@
       server_addr_rec *sar;
       char *t;
       int i, is_an_ip_addr;
  +    char *w;
   
  -    if (*w == 0)
  +    if (*w_ == 0)
   	return NULL;
   
  +    w=ap_pstrdup(p, w_);
       t = strchr(w, ':');
       if (t) {
   	if (strcmp(t + 1, "*") == 0) {
  @@ -225,8 +227,6 @@
   	sar->host_addr.s_addr = my_addr;
   	sar->host_port = port;
   	sar->virthost = ap_pstrdup(p, w);
  -	if (t != NULL)
  -	    *t = ':';
   	return NULL;
       }
   
  @@ -235,8 +235,6 @@
       if ((!hep) || (hep->h_addrtype != AF_INET || !hep->h_addr_list[0])) {
   	ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, NULL,
   	    "Cannot resolve host name %s --- ignoring!", w);
  -	if (t != NULL)
  -	    *t = ':';
   	return NULL;
       }
   
  @@ -249,8 +247,6 @@
   	sar->virthost = ap_pstrdup(p, w);
       }
   
  -    if (t != NULL)
  -	*t = ':';
       return NULL;
   }
   
  
  
  
  1.25      +4 -3      apache-2.0/src/main/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/listen.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- listen.c	2000/06/12 23:02:50	1.24
  +++ listen.c	2000/06/17 16:29:48	1.25
  @@ -250,8 +250,9 @@
   }
   
   
  -const char *ap_set_listener(cmd_parms *cmd, void *dummy, char *ips)
  +const char *ap_set_listener(cmd_parms *cmd, void *dummy, const char *ips_)
   {
  +    char *ips=ap_pstrdup(cmd->pool, ips_);
       char *ports;
       unsigned short port;
   
  @@ -290,7 +291,7 @@
       return NULL;
   }
   
  -const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, char *arg) 
  +const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, const char *arg) 
   {
       int b;
   
  @@ -307,7 +308,7 @@
       return NULL;
   }
   
  -const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, char *arg)
  +const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, const char *arg)
   {
       int s = atoi(arg);
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
  
  
  
  1.57      +13 -24    apache-2.0/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- util.c	2000/06/17 12:36:54	1.56
  +++ util.c	2000/06/17 16:29:48	1.57
  @@ -128,7 +128,7 @@
   
       if (intype == NULL) return NULL;
   
  -    semi = strchr(intype, ';');
  +    semi = ap_strchr_c(intype, ';');
       if (semi == NULL) {
   	return ap_pstrdup(p, intype);
       } 
  @@ -628,7 +628,7 @@
   
   API_EXPORT(char *) ap_getword(ap_pool_t *atrans, const char **line, char stop)
   {
  -    char *pos = strchr(*line, stop);
  +    const char *pos = ap_strchr_c(*line, stop);
       char *res;
   
       if (!pos) {
  @@ -689,7 +689,7 @@
   
   API_EXPORT(char *) ap_getword_nulls(ap_pool_t *atrans, const char **line, char stop)
   {
  -    char *pos = strchr(*line, stop);
  +    const char *pos = ap_strchr_c(*line, stop);
       char *res;
   
       if (!pos) {
  @@ -785,27 +785,27 @@
    * environment value does not exist, leave the ${ENV}
    * construct alone; it means something else.
    */
  -API_EXPORT(char *) ap_resolve_env(ap_pool_t *p, const char * word)
  +API_EXPORT(const char *) ap_resolve_env(ap_pool_t *p, const char * word)
   {
          char tmp[ MAX_STRING_LEN ];
  -       char * s, * e;
  +       const char *s, *e;
          tmp[0] = '\0';
   
  -       if (!(s=strchr(word,'$')))
  -               return (char *)word;
  +       if (!(s=ap_strchr_c(word,'$')))
  +               return word;
   
          do {
                  /* XXX - relies on strncat() to add '\0'
                   */
   	       strncat(tmp,word,s - word);
  -               if ((s[1] == '{') && (e=strchr(s,'}'))) {
  -                       *e = '\0';
  +               if ((s[1] == '{') && (e=ap_strchr_c(s,'}'))) {
  +                       const char *e2 = e;
                          word = e + 1;
                          e = getenv(s+2);
                          if (e) {
                              strcat(tmp,e);
                          } else {
  -                           strcat(tmp,s);
  +                           strncat(tmp, s, e2-s);
                              strcat(tmp,"}");
                          }
                  } else {
  @@ -813,7 +813,7 @@
                          word = s+1;
                          strcat(tmp,"$");
                  };
  -       } while ((s=strchr(word,'$')));
  +       } while ((s=ap_strchr_c(word,'$')));
          strcat(tmp,word);
   
          return ap_pstrdup(p,tmp);
  @@ -1605,8 +1605,8 @@
       unsigned c;
   
       if (!partial) {
  -	char *colon = strchr(path, ':');
  -	char *slash = strchr(path, '/');
  +	const char *colon = ap_strchr_c(path, ':');
  +	const char *slash = ap_strchr_c(path, '/');
   
   	if (colon && (!slash || colon < slash)) {
   	    *d++ = '.';
  @@ -2016,14 +2016,3 @@
       *outchr = '\0';
       return outstring;
   }
  -
  -#ifdef AP_DEBUG
  -# undef strrchr
  -
  -char *ap_strrchr(char *s, int c)
  -{ return strrchr(s,c); }
  -
  -const char *ap_strrchr_c(const char *s, int c)
  -{ return strrchr(s,c); }
  -
  -#endif
  
  
  
  1.13      +2 -2      apache-2.0/src/main/util_uri.c
  
  Index: util_uri.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_uri.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- util_uri.c	2000/06/12 23:02:51	1.12
  +++ util_uri.c	2000/06/17 16:29:49	1.13
  @@ -484,7 +484,7 @@
   	}
   	if (*s == '?') {
   	    ++s;
  -	    s1 = strchr(s, '#');
  +	    s1 = ap_strchr_c(s, '#');
   	    if (s1) {
   		uptr->fragment = ap_pstrdup(p, s1 + 1);
   		uptr->query = ap_pstrndup(p, s, s1 - s);
  @@ -588,7 +588,7 @@
       /* We expect hostinfo to point to the first character of
        * the hostname.  There must be a port, separated by a colon
        */
  -    s = strchr(hostinfo, ':');
  +    s = ap_strchr_c(hostinfo, ':');
       if (s == NULL) {
   	return HTTP_BAD_REQUEST;
       }
  
  
  
  1.1                  apache-2.0/src/main/util_debug.c
  
  Index: util_debug.c
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * Portions of this software are based upon public domain software
   * originally written at the National Center for Supercomputing Applications,
   * University of Illinois, Urbana-Champaign.
   */
  
  #include "httpd.h"
  
  #ifdef AP_DEBUG
  # undef strchr
  
  char *ap_strchr(char *s, int c)
  { return strchr(s,c); }
  
  const char *ap_strchr_c(const char *s, int c)
  { return strchr(s,c); }
  
  # undef strrchr
  
  char *ap_strrchr(char *s, int c)
  { return strrchr(s,c); }
  
  const char *ap_strrchr_c(const char *s, int c)
  { return strrchr(s,c); }
  
  #endif
  
  
  
  1.89      +41 -33    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.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- mpmt_pthread.c	2000/06/12 23:02:57	1.88
  +++ mpmt_pthread.c	2000/06/17 16:29:51	1.89
  @@ -93,8 +93,8 @@
   
   int ap_threads_per_child=0;         /* Worker threads per child */
   int ap_max_requests_per_child=0;
  -static char *ap_pid_fname=NULL;
  -API_VAR_EXPORT char *ap_scoreboard_fname=NULL;
  +static const char *ap_pid_fname=NULL;
  +API_VAR_EXPORT const char *ap_scoreboard_fname=NULL;
   static int ap_daemons_to_start=0;
   static int min_spare_threads=0;
   static int max_spare_threads=0;
  @@ -159,7 +159,7 @@
   /* Locks for accept serialization */
   static pthread_mutex_t thread_accept_mutex = PTHREAD_MUTEX_INITIALIZER;
   static ap_lock_t *process_accept_mutex;
  -static char *lock_fname;
  +static const char *lock_fname;
   
   #ifdef NO_SERIALIZED_ACCEPT
   #define SAFE_ACCEPT(stmt) APR_SUCCESS
  @@ -1291,7 +1291,7 @@
   }
   
   
  -static const char *set_pidfile(cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_pidfile(cmd_parms *cmd, void *dummy, const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1305,7 +1305,8 @@
       return NULL;
   }
   
  -static const char *set_scoreboard(cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_scoreboard(cmd_parms *cmd, void *dummy,
  +				  const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1316,7 +1317,7 @@
       return NULL;
   }
   
  -static const char *set_lockfile(cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_lockfile(cmd_parms *cmd, void *dummy, const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1327,7 +1328,8 @@
       return NULL;
   }
   
  -static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_daemons_to_start(cmd_parms *cmd, void *dummy,
  +					const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1338,7 +1340,8 @@
       return NULL;
   }
   
  -static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy, char *arg)
  +static const char *set_min_spare_threads(cmd_parms *cmd, void *dummy,
  +					 const char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1359,7 +1362,8 @@
       return NULL;
   }
   
  -static const char *set_max_spare_threads(cmd_parms *cmd, void *dummy, char *arg)
  +static const char *set_max_spare_threads(cmd_parms *cmd, void *dummy,
  +					 const char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1370,7 +1374,8 @@
       return NULL;
   }
   
  -static const char *set_server_limit (cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_server_limit (cmd_parms *cmd, void *dummy,
  +				     const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1396,7 +1401,8 @@
       return NULL;
   }
   
  -static const char *set_threads_per_child (cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_threads_per_child (cmd_parms *cmd, void *dummy,
  +					  const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1423,7 +1429,8 @@
       return NULL;
   }
   
  -static const char *set_max_requests(cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_max_requests(cmd_parms *cmd, void *dummy,
  +				    const char *arg) 
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -1435,7 +1442,8 @@
       return NULL;
   }
   
  -static const char *set_coredumpdir (cmd_parms *cmd, void *dummy, char *arg) 
  +static const char *set_coredumpdir (cmd_parms *cmd, void *dummy,
  +				    const char *arg) 
   {
       ap_finfo_t finfo;
       const char *fname;
  @@ -1457,26 +1465,26 @@
   static const command_rec mpmt_pthread_cmds[] = {
   UNIX_DAEMON_COMMANDS
   LISTEN_COMMANDS
  -{ "PidFile", set_pidfile, NULL, RSRC_CONF, TAKE1,
  -    "A file for logging the server process ID"},
  -{ "ScoreBoardFile", set_scoreboard, NULL, RSRC_CONF, TAKE1,
  -    "A file for Apache to maintain runtime process management information"},
  -{ "LockFile", set_lockfile, NULL, RSRC_CONF, TAKE1,
  -    "The lockfile used when Apache needs to lock the accept() call"},
  -{ "StartServers", set_daemons_to_start, NULL, RSRC_CONF, TAKE1,
  -  "Number of child processes launched at server startup" },
  -{ "MinSpareThreads", set_min_spare_threads, NULL, RSRC_CONF, TAKE1,
  -  "Minimum number of idle children, to handle request spikes" },
  -{ "MaxSpareThreads", set_max_spare_threads, NULL, RSRC_CONF, TAKE1,
  -  "Maximum number of idle children" },
  -{ "MaxClients", set_server_limit, NULL, RSRC_CONF, TAKE1,
  -  "Maximum number of children alive at the same time" },
  -{ "ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF, TAKE1,
  -  "Number of threads each child creates" },
  -{ "MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF, TAKE1,
  -  "Maximum number of requests a particular child serves before dying." },
  -{ "CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF, TAKE1,
  -  "The location of the directory Apache changes to before dumping core" },
  +AP_INIT_TAKE1("PidFile", set_pidfile, NULL, RSRC_CONF,
  +    "A file for logging the server process ID"),
  +AP_INIT_TAKE1("ScoreBoardFile", set_scoreboard, NULL, RSRC_CONF,
  +    "A file for Apache to maintain runtime process management information"),
  +AP_INIT_TAKE1("LockFile", set_lockfile, NULL, RSRC_CONF,
  +    "The lockfile used when Apache needs to lock the accept() call"),
  +AP_INIT_TAKE1("StartServers", set_daemons_to_start, NULL, RSRC_CONF,
  +  "Number of child processes launched at server startup"),
  +AP_INIT_TAKE1("MinSpareThreads", set_min_spare_threads, NULL, RSRC_CONF,
  +  "Minimum number of idle children, to handle request spikes"),
  +AP_INIT_TAKE1("MaxSpareThreads", set_max_spare_threads, NULL, RSRC_CONF,
  +  "Maximum number of idle children"),
  +AP_INIT_TAKE1("MaxClients", set_server_limit, NULL, RSRC_CONF,
  +  "Maximum number of children alive at the same time"),
  +AP_INIT_TAKE1("ThreadsPerChild", set_threads_per_child, NULL, RSRC_CONF,
  +  "Number of threads each child creates"),
  +AP_INIT_TAKE1("MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF,
  +  "Maximum number of requests a particular child serves before dying."),
  +AP_INIT_TAKE1("CoreDumpDirectory", set_coredumpdir, NULL, RSRC_CONF,
  +  "The location of the directory Apache changes to before dumping core"),
   { NULL }
   };
   
  
  
  
  1.33      +1 -1      apache-2.0/src/modules/standard/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_autoindex.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- mod_autoindex.c	2000/05/27 22:40:35	1.32
  +++ mod_autoindex.c	2000/06/17 16:29:52	1.33
  @@ -787,7 +787,7 @@
        * If the filename includes a path, extract just the name itself
        * for the simple matches.
        */
  -    if ((filename_only = strrchr(filename_full, '/')) == NULL) {
  +    if ((filename_only = ap_strrchr_c(filename_full, '/')) == NULL) {
   	filename_only = filename_full;
       }
       else {
  
  
  
  1.41      +2 -2      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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- mod_include.c	2000/06/17 11:00:57	1.40
  +++ mod_include.c	2000/06/17 16:29:52	1.41
  @@ -527,7 +527,7 @@
   		if (*in == '{') {
   		    ++in;
   		    start_of_var_name = in;
  -		    in = strchr(in, '}');
  +		    in = ap_strchr_c(in, '}');
   		    if (in == NULL) {
                           ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
   				    0, r, "Missing '}' on variable \"%s\"",
  @@ -791,7 +791,7 @@
       char *w;
       const char *args = r->args;
   
  -    if (!args || !args[0] || strchr(args, '=')) {
  +    if (!args || !args[0] || ap_strchr_c(args, '=')) {
          numwords = 1;
       }
       else {
  
  
  
  1.18      +2 -2      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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- unixd.c	2000/06/12 23:03:03	1.17
  +++ unixd.c	2000/06/17 16:29:53	1.18
  @@ -243,7 +243,7 @@
   }
   
   
  -const char *unixd_set_user(cmd_parms *cmd, void *dummy, char *arg)
  +const char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  @@ -269,7 +269,7 @@
       return NULL;
   }
   
  -const char *unixd_set_group(cmd_parms *cmd, void *dummy, char *arg)
  +const char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg)
   {
       const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
       if (err != NULL) {
  
  
  
  1.10      +6 -6      apache-2.0/src/os/unix/unixd.h
  
  Index: unixd.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/os/unix/unixd.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- unixd.h	2000/06/12 23:03:03	1.9
  +++ unixd.h	2000/06/17 16:29:53	1.10
  @@ -86,8 +86,8 @@
   void unixd_detach(void);
   int unixd_setup_child(void);
   void unixd_pre_config(void);
  -const char *unixd_set_user(cmd_parms *cmd, void *dummy, char *arg);
  -const char *unixd_set_group(cmd_parms *cmd, void *dummy, char *arg);
  +const char *unixd_set_user(cmd_parms *cmd, void *dummy, const char *arg);
  +const char *unixd_set_group(cmd_parms *cmd, void *dummy, const char *arg);
   #if defined(RLIMIT_CPU) || defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || \
       defined(RLIMIT_NPROC) || defined(RLIMIT_AS)
   API_EXPORT(void) unixd_set_rlimit(cmd_parms *cmd, struct rlimit **plimit,
  @@ -126,9 +126,9 @@
   #endif /* HAVE_KILLPG */
   
   #define UNIX_DAEMON_COMMANDS	\
  -{ "User", unixd_set_user, NULL, RSRC_CONF, TAKE1, \
  -  "Effective user id for this server"}, \
  -{ "Group", unixd_set_group, NULL, RSRC_CONF, TAKE1, \
  -  "Effective group id for this server"}, \
  +AP_INIT_TAKE1("User", unixd_set_user, NULL, RSRC_CONF, \
  +  "Effective user id for this server"), \
  +AP_INIT_TAKE1("Group", unixd_set_group, NULL, RSRC_CONF, \
  +  "Effective group id for this server"),
   
   #endif
  
  
  

Mime
View raw message