httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/server util.c
Date Sat, 20 Jan 2001 05:18:07 GMT
rbb         01/01/19 21:18:06

  Modified:    .        CHANGES
               include  httpd.h
               modules/filters mod_include.c mod_include.h
               server   util.c
  Log:
  Remove ap_chdir_file.  This function is not thread-safe, and nobody
  is currently using it.  The proper way to do this, is to use the
  apr_create_process API.
  
  Revision  Changes    Path
  1.47      +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- CHANGES	2001/01/19 21:47:43	1.46
  +++ CHANGES	2001/01/20 05:18:02	1.47
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0b1
   
  +  *) Remove ap_chdir_file().  This function is not thread-safe,
  +     and nobody is currently using it.  [Ryan Bloom]
  +
     *) Do not try to run make depend if there are no .c files in the
        current directory, doing so makes `make depend` fail.
        [Ryan Bloom]
  
  
  
  1.130     +0 -6      httpd-2.0/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/httpd.h,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- httpd.h	2001/01/05 20:44:39	1.129
  +++ httpd.h	2001/01/20 05:18:03	1.130
  @@ -1536,12 +1536,6 @@
    */
   AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *name);
   /**
  - * Given a pathname in file, extract the directory and chdir to that directory
  - * @param file The file who's directory we wish to switch to
  - * @deffunc void ap_chdir_file(const char *file)
  - */
  -AP_DECLARE(void) ap_chdir_file(const char *file);
  -/**
    * Get the maximum number of daemons processes for this version of Apache
    * @return The maximum number of daemon processes
    * @deffunc int ap_get_max_daemons(void)
  
  
  
  1.88      +0 -5      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- mod_include.c	2001/01/19 07:04:19	1.87
  +++ mod_include.c	2001/01/20 05:18:04	1.88
  @@ -752,7 +752,6 @@
       }
   
       ap_destroy_sub_req(rr);
  -    ap_chdir_file(r->filename);
   
       return 0;
   }
  @@ -901,7 +900,6 @@
                           error_fmt = "unable to include \"%s\" in parsed file %s";
                       }
                   }
  -                ap_chdir_file(r->filename);
                   if (error_fmt) {
                       ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR,
       			    0, r, error_fmt, tag_val, r->filename);
  @@ -1113,7 +1111,6 @@
                           CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head);
                       }
                       /* just in case some stooge changed directories */
  -                    ap_chdir_file(r->filename);
                   }
                   else if (!strcmp(tag, "cgi")) {
                       parse_string(r, tag_val, parsed_string, sizeof(parsed_string), 0);
  @@ -1123,7 +1120,6 @@
                                       "invalid CGI ref \"%s\" in %s", tag_val, file);
                           CREATE_ERROR_BUCKET(ctx, tmp_buck, head_ptr, *inserted_head);
                       }
  -                    ap_chdir_file(r->filename);
                   }
                   else {
                       ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
  @@ -2615,7 +2611,6 @@
       apr_bucket_brigade *tag_and_after;
       int ret;
   
  -    ap_chdir_file(r->filename);
       if (r->args) {              /* add QUERY stuff to env cause it ain't yet */
           char *arg_copy = apr_pstrdup(r->pool, r->args);
   
  
  
  
  1.8       +0 -4      httpd-2.0/modules/filters/mod_include.h
  
  Index: mod_include.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- mod_include.h	2001/01/19 07:04:19	1.7
  +++ mod_include.h	2001/01/20 05:18:05	1.8
  @@ -80,10 +80,6 @@
   /* just need some arbitrary non-NULL pointer which can't also be a request_rec */
   #define NESTED_INCLUDE_MAGIC	(&includes_module)
   
  -/* TODO: changing directory should be handled by CreateProcess */
  -#define ap_chdir_file(x) do {} while(0)
  -
  -
   /****************************************************************************
    * Used to keep context information during parsing of a request for SSI tags.
    * This is especially useful if the tag stretches across multiple buckets or
  
  
  
  1.92      +0 -19     httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- util.c	2001/01/19 07:04:29	1.91
  +++ util.c	2001/01/20 05:18:06	1.92
  @@ -630,25 +630,6 @@
       return n;
   }
   
  -
  -AP_DECLARE(void) ap_chdir_file(const char *file)
  -{
  -    const char *x;
  -    char buf[HUGE_STRING_LEN];
  -
  -    x = ap_strrchr_c(file, '/');
  -    if (x == NULL) {
  -	chdir(file);
  -    }
  -    else if (x - file < sizeof(buf) - 1) {
  -	memcpy(buf, file, x - file);
  -	buf[x - file] = '\0';
  -	chdir(buf);
  -    }
  -    /* XXX: well, this is a silly function, no method of reporting an
  -     * error... ah well. */
  -}
  -
   AP_DECLARE(char *) ap_getword_nc(apr_pool_t *atrans, char **line, char stop)
   {
       return ap_getword(atrans, (const char **) line, stop);
  
  
  

Mime
View raw message