You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2002/07/06 04:49:59 UTC

cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c

stoddard    2002/07/05 19:49:59

  Modified:    modules/arch/win32 mod_win32.c
               modules/experimental mod_mem_cache.c
  Log:
  Fix some Win32 compile breaks caused by Brian Pane's making apr_table_t
  a full incomplete type.
  
  Revision  Changes    Path
  1.21      +3 -2      httpd-2.0/modules/arch/win32/mod_win32.c
  
  Index: mod_win32.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_win32.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_win32.c	24 Jun 2002 04:55:24 -0000	1.20
  +++ mod_win32.c	6 Jul 2002 02:49:59 -0000	1.21
  @@ -419,7 +419,8 @@
                                            request_rec *r, apr_pool_t *p, 
                                            cgi_exec_info_t *e_info)
   {
  -    const apr_table_entry_t *elts = (apr_table_entry_t *)r->subprocess_env->a.elts;
  +    const apr_array_header_t *elts_arr = apr_table_elts(r->subprocess_env);
  +    const apr_table_entry_t *elts = (apr_table_entry_t *) elts_arr->elts;
       const char *ext = NULL;
       const char *interpreter = NULL;
       win32_dir_conf *d;
  @@ -547,7 +548,7 @@
        * (using 0x0080-0x00ff) or is linked as a command or windows
        * application (following the OEM or Ansi code page in effect.)
        */
  -    for (i = 0; i < r->subprocess_env->a.nelts; ++i) {
  +    for (i = 0; i < elts_arr->nelts; ++i) {
           if (win_nt && elts[i].key && *elts[i].key 
                   && (strncmp(elts[i].key, "HTTP_", 5) == 0
                    || strncmp(elts[i].key, "SERVER_", 7) == 0
  
  
  
  1.74      +5 -4      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- mod_mem_cache.c	22 Jun 2002 19:22:40 -0000	1.73
  +++ mod_mem_cache.c	6 Jul 2002 02:49:59 -0000	1.74
  @@ -657,22 +657,23 @@
                                       apr_ssize_t *nelts, 
                                       apr_table_t *table)
   {
  -    apr_table_entry_t *elts = (apr_table_entry_t *) table->a.elts;
  +    const apr_array_header_t *elts_arr = apr_table_elts(table);
  +    apr_table_entry_t *elts = (apr_table_entry_t *) elts_arr->elts;
       apr_ssize_t i;
       apr_size_t len = 0;
       apr_size_t idx = 0;
       char *buf;
      
  -    *nelts = table->a.nelts;
  +    *nelts = elts_arr->nelts;
       if (*nelts == 0 ) {
           *obj=NULL;
           return APR_SUCCESS;
       }
  -    *obj = calloc(1, sizeof(cache_header_tbl_t) * table->a.nelts);
  +    *obj = calloc(1, sizeof(cache_header_tbl_t) * elts_arr->nelts);
       if (NULL == *obj) {
           return APR_ENOMEM;
       }
  -    for (i = 0; i < table->a.nelts; ++i) {
  +    for (i = 0; i < elts_arr->nelts; ++i) {
           len += strlen(elts[i].key);
           len += strlen(elts[i].val);
           len += 2;  /* Extra space for NULL string terminator for key and val */
  
  
  

Re: cvs commit: httpd-2.0/modules/experimental mod_mem_cache.c

Posted by Brian Pane <bp...@pacbell.net>.
stoddard@apache.org wrote:

>stoddard    2002/07/05 19:49:59
>
>  Modified:    modules/arch/win32 mod_win32.c
>               modules/experimental mod_mem_cache.c
>  Log:
>  Fix some Win32 compile breaks caused by Brian Pane's making apr_table_t
>  a full incomplete type.
>

Sorry about that.  Thanks for the fix.

--Brian