httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: [PATCH] PR#344: 64-bit cleanups
Date Sat, 19 Apr 1997 21:55:20 GMT
Dean Gaudet wrote:
> 
> The patch supplied in PR#344 looks good.  I've included it here.  It
> cleans up various pointer/int 64-bit issues.   +1

Does it pass -Wall ?

I haven't looked too closely, but it agree it looks good...

> 
> Dean
> 
> Index: CHANGES
> ===================================================================
> RCS file: /export/home/cvs/apache/src/CHANGES,v
> retrieving revision 1.237
> diff -c -3 -r1.237 CHANGES
> *** CHANGES	1997/04/18 02:56:13	1.237
> --- CHANGES	1997/04/19 21:33:27
> ***************
> *** 1,5 ****
> --- 1,8 ----
>   Changes with Apache 1.2
>   
> +   *) Cleanup pointer/int casting on 64-bit architectures.
> +      [Uwe F. Mayer] PR#344
> + 
>     *) Fixed SIGSEGV problem when a DirectoryIndex file is also the source
>        of an external redirection.  [Roy Fielding and Paul Sutton]
>   
> Index: alloc.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/alloc.c,v
> retrieving revision 1.26
> diff -c -3 -r1.26 alloc.c
> *** alloc.c	1997/04/07 10:58:38	1.26
> --- alloc.c	1997/04/19 21:33:28
> ***************
> *** 778,793 ****
>    * generic cleanup interface.
>    */
>   
> ! static void fd_cleanup (void *fdv) { close ((int)fdv); }
>   
> ! void note_cleanups_for_fd (pool *p, int fd) {
> !   register_cleanup (p, (void *)fd, fd_cleanup, fd_cleanup);
>   }
>   
> ! void kill_cleanups_for_fd(pool *p,int fd)
> !     {
>       kill_cleanup(p,(void *)fd,fd_cleanup);
> !     }
>   
>   int popenf(pool *a, const char *name, int flg, int mode)
>   {
> --- 778,797 ----
>    * generic cleanup interface.
>    */
>   
> ! static void fd_cleanup (void *fdv)
> ! {
> !     close ((long)fdv);
> ! }
>   
> ! void note_cleanups_for_fd (pool *p, long fd)
> ! {
> !     register_cleanup (p, (void *)fd, fd_cleanup, fd_cleanup);
>   }
>   
> ! void kill_cleanups_for_fd(pool *p,long fd)
> ! {
>       kill_cleanup(p,(void *)fd,fd_cleanup);
> ! }
>   
>   int popenf(pool *a, const char *name, int flg, int mode)
>   {
> ***************
> *** 803,809 ****
>     return fd;
>   }
>   
> ! int pclosef(pool *a, int fd)
>   {
>     int res;
>     int save_errno;
> --- 807,813 ----
>     return fd;
>   }
>   
> ! int pclosef(pool *a, long fd)
>   {
>     int res;
>     int save_errno;
> Index: alloc.h
> ===================================================================
> RCS file: /export/home/cvs/apache/src/alloc.h,v
> retrieving revision 1.18
> diff -c -3 -r1.18 alloc.h
> *** alloc.h	1997/04/07 10:58:38	1.18
> --- alloc.h	1997/04/19 21:33:28
> ***************
> *** 207,214 ****
>   int popenf(struct pool *, const char *name, int flg, int mode); 
>   
>   void note_cleanups_for_file (pool *, FILE *);
> ! void note_cleanups_for_fd (pool *, int);
> ! void kill_cleanups_for_fd (pool *p, int fd);
>   
>   regex_t *pregcomp(pool *p, const char *pattern, int cflags);
>   
> --- 207,214 ----
>   int popenf(struct pool *, const char *name, int flg, int mode); 
>   
>   void note_cleanups_for_file (pool *, FILE *);
> ! void note_cleanups_for_fd (pool *, long);
> ! void kill_cleanups_for_fd (pool *p, long fd);
>   
>   regex_t *pregcomp(pool *p, const char *pattern, int cflags);
>   
> ***************
> *** 217,223 ****
>    */
>   
>   int pfclose(struct pool *, FILE *);
> ! int pclosef(struct pool *, int fd);
>   
>   /* ... even child processes (which we may want to wait for,
>    * or to kill outright, on unexpected termination).
> --- 217,223 ----
>    */
>   
>   int pfclose(struct pool *, FILE *);
> ! int pclosef(struct pool *, long fd);
>   
>   /* ... even child processes (which we may want to wait for,
>    * or to kill outright, on unexpected termination).
> Index: http_config.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_config.c,v
> retrieving revision 1.48
> diff -c -3 -r1.48 http_config.c
> *** http_config.c	1997/04/12 04:24:56	1.48
> --- http_config.c	1997/04/19 21:33:28
> ***************
> *** 702,708 ****
>   {
>       /* This one's pretty generic... */
>     
> !     int offset = (int)cmd->info; 
>       *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
>       return NULL;
>   }
> --- 702,708 ----
>   {
>       /* This one's pretty generic... */
>     
> !     long offset = (int)cmd->info; 
>       *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
>       return NULL;
>   }
> ***************
> *** 711,717 ****
>   {
>       /* This one's pretty generic too... */
>     
> !     int offset = (int)cmd->info; 
>       *(int *)(struct_ptr + offset) = arg ? 1 : 0;
>       return NULL;
>   }
> --- 711,717 ----
>   {
>       /* This one's pretty generic too... */
>     
> !     long offset = (int)cmd->info; 
>       *(int *)(struct_ptr + offset) = arg ? 1 : 0;
>       return NULL;
>   }
> Index: http_core.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/http_core.c,v
> retrieving revision 1.77
> diff -c -3 -r1.77 http_core.c
> *** http_core.c	1997/04/12 04:24:56	1.77
> --- http_core.c	1997/04/19 21:33:28
> ***************
> *** 843,849 ****
>   {
>       /* This one's pretty generic... */
>     
> !     int offset = (int)cmd->info;
>       char *struct_ptr = (char *)cmd->server;
>       
>       *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
> --- 843,849 ----
>   {
>       /* This one's pretty generic... */
>     
> !     long offset = (int)cmd->info;
>       char *struct_ptr = (char *)cmd->server;
>       
>       *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
> Index: mod_alias.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_alias.c,v
> retrieving revision 1.15
> diff -c -3 -r1.15 mod_alias.c
> *** mod_alias.c	1997/04/14 01:09:13	1.15
> --- mod_alias.c	1997/04/19 21:33:29
> ***************
> *** 137,143 ****
>       server_rec *s = cmd->server;
>       alias_server_conf *serverconf =
>           (alias_server_conf *)get_module_config(s->module_config,&alias_module);
> !     int status = (int)cmd->info;
>       char *f = arg2;
>       char *url = arg3;
>   
> --- 137,143 ----
>       server_rec *s = cmd->server;
>       alias_server_conf *serverconf =
>           (alias_server_conf *)get_module_config(s->module_config,&alias_module);
> !     long status = (long)cmd->info;
>       char *f = arg2;
>       char *url = arg3;
>   
> Index: mod_browser.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_browser.c,v
> retrieving revision 1.8
> diff -c -3 -r1.8 mod_browser.c
> *** mod_browser.c	1997/03/07 14:15:38	1.8
> --- mod_browser.c	1997/04/19 21:33:29
> ***************
> *** 98,104 ****
>         get_module_config (cmd->server->module_config, &browser_module);
>       browser_entry *new, *entries = (browser_entry *)sconf->browsers->elts;
>       char *var;
> !     int i, cflags = (int)cmd->info;
>   
>       /* First, try to merge into an existing entry */
>   
> --- 98,105 ----
>         get_module_config (cmd->server->module_config, &browser_module);
>       browser_entry *new, *entries = (browser_entry *)sconf->browsers->elts;
>       char *var;
> !     int i;
> !     long cflags = (long)cmd->info;
>   
>       /* First, try to merge into an existing entry */
>   
> Index: mod_dir.c
> ===================================================================
> RCS file: /export/home/cvs/apache/src/mod_dir.c,v
> retrieving revision 1.25
> diff -c -3 -r1.25 mod_dir.c
> *** mod_dir.c	1997/04/18 02:56:14	1.25
> --- mod_dir.c	1997/04/19 21:33:29
> ***************
> *** 175,181 ****
>   
>   
>   const char *add_opts_int(cmd_parms *cmd, void *d, int opts) {
> !     push_item(((dir_config_rec *)d)->opts_list, (char*)opts, NULL,
>   	      cmd->path, NULL);
>       return NULL;
>   }
> --- 175,181 ----
>   
>   
>   const char *add_opts_int(cmd_parms *cmd, void *d, int opts) {
> !     push_item(((dir_config_rec *)d)->opts_list, (char*)(long)opts, NULL,
>   	      cmd->path, NULL);
>       return NULL;
>   }
> ***************
> *** 382,388 ****
>       return 0;
>   }
>   
> ! int find_opts(dir_config_rec *d, request_rec *r) {
>       char *path = r->filename;
>       array_header *list = d->opts_list;
>       struct item *items = (struct item *)list->elts;
> --- 382,388 ----
>       return 0;
>   }
>   
> ! long find_opts(dir_config_rec *d, request_rec *r) {
>       char *path = r->filename;
>       array_header *list = d->opts_list;
>       struct item *items = (struct item *)list->elts;
> ***************
> *** 392,398 ****
>           struct item *p = &items[i];
>   	
>           if(!strcmp_match(path,p->apply_path))
> !             return (int)p->type;
>       }
>       return 0;
>   }
> --- 392,398 ----
>           struct item *p = &items[i];
>   	
>           if(!strcmp_match(path,p->apply_path))
> !             return (long)p->type;
>       }
>       return 0;
>   }
> 


-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
                  "Not the Craw... the CRAW!"

Mime
View raw message