httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject bug-report (fwd)
Date Fri, 19 Sep 1997 22:44:24 GMT

no acked. I think this has been dealt with in the -dev code, but just
in case...

---------- Forwarded message ----------
Date: Fri, 19 Sep 1997 07:56:15 -0500 (CDT)
From: "Uwe F. Mayer" <mayer@math.Vanderbilt.Edu>
To: apache-bugs@apache.org
Subject: bug-report


Severity: serious
Category: OSF-1

When compiling under OSF (also known as DEC UNIX) there are various
problems related to the fact that pointers are 64 bit long while
integers are only 32 bit long. In particular, it is a pretty bad idea
to store a pointer in an integer variable.

FIX: Change directory to "src", run "Configure" to create the
"http_config.c" file, then apply the patch included below, then run make
and get a clean compile with gcc.

---------------------------------------------------------------------
------------ excerpts from the compile log below these lines --------
---------------------------------------------------------------------
atlas:~/tmp/apache_1.2.4/src $ Configure 
Using config file: Configuration
Using Makefile template file: Makefile.tmpl
 + configured for DEC OSF/1 platform
 + setting C compiler to gcc
 + setting C compiler optimization-level to -O2
atlas:~/tmp/apache_1.2.4/src $ make
gcc -c   -O2 -DOSF1   alloc.c
alloc.c: In function `fd_cleanup':
alloc.c:784: warning: cast from pointer to integer of different size
alloc.c: In function `note_cleanups_for_fd':
alloc.c:787: warning: cast to pointer from integer of different size
alloc.c: In function `kill_cleanups_for_fd':
alloc.c:792: warning: cast to pointer from integer of different size
alloc.c: In function `pclosef':
alloc.c:820: warning: cast to pointer from integer of different size
gcc -c   -O2 -DOSF1   http_core.c
http_core.c: In function `set_server_string_slot':
http_core.c:847: warning: cast from pointer to integer of different size
gcc -c   -O2 -DOSF1   http_config.c
http_config.c: In function `set_string_slot':
http_config.c:705: warning: cast from pointer to integer of different size
http_config.c: In function `set_flag_slot':
http_config.c:714: warning: cast from pointer to integer of different size
gcc -c   -O2 -DOSF1   mod_dir.c
mod_dir.c: In function `add_opts_int':
mod_dir.c:184: warning: cast to pointer from integer of different size
mod_dir.c: In function `find_opts':
mod_dir.c:401: warning: cast from pointer to integer of different size
gcc -c   -O2 -DOSF1   mod_alias.c
mod_alias.c: In function `add_redirect':
mod_alias.c:140: warning: cast from pointer to integer of different size
gcc -c   -O2 -DOSF1   mod_browser.c
mod_browser.c: In function `add_browser':
mod_browser.c:101: warning: cast from pointer to integer of different size
---------------------------------------------------------------------
-------------------- patch file below these lines -------------------
---------------------------------------------------------------------
diff -cr ./Configuration /usr/local/etc/httpd/src/Configuration
*** ./Configuration	Fri Aug 22 02:18:30 1997
--- /usr/local/etc/httpd/src/Configuration	Wed Sep 17 14:02:15 1997
***************
*** 101,107 ****
  #  out the Rule. The "default" action is "no" unless overruled
  #  by OS specifics
  
! Rule WANTHSREGEX=default
  
  ################################################################
  # Module configuration
--- 101,107 ----
  #  out the Rule. The "default" action is "no" unless overruled
  #  by OS specifics
  
! Rule WANTHSREGEX=no
  
  ################################################################
  # Module configuration
diff -cr ./Makefile /usr/local/etc/httpd/src/Makefile
*** ./Makefile	Wed Sep 17 14:02:08 1997
--- /usr/local/etc/httpd/src/Makefile	Wed Sep 17 14:01:21 1997
***************
*** 30,36 ****
  ##Rule:STATUS=yes
  ##Rule:SOCKS4=no
  ##Rule:IRIXNIS=no
! ##Rule:WANTHSREGEX=default
  ###############
  
  ###############
--- 30,36 ----
  ##Rule:STATUS=yes
  ##Rule:SOCKS4=no
  ##Rule:IRIXNIS=no
! ##Rule:WANTHSREGEX=no
  ###############
  
  ###############
diff -cr ./alloc.c /usr/local/etc/httpd/src/alloc.c
*** ./alloc.c	Thu Jun 26 20:47:44 1997
--- /usr/local/etc/httpd/src/alloc.c	Wed Sep 17 13:54:00 1997
***************
*** 781,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);
      }
--- 781,793 ----
   * 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);
      }
***************
*** 809,815 ****
    return fd;
  }
  
! int pclosef(pool *a, int fd)
  {
    int res;
    int save_errno;
--- 809,815 ----
    return fd;
  }
  
! int pclosef(pool *a, long fd)
  {
    int res;
    int save_errno;
diff -cr ./alloc.h /usr/local/etc/httpd/src/alloc.h
*** ./alloc.h	Mon May 26 23:14:19 1997
--- /usr/local/etc/httpd/src/alloc.h	Wed Sep 17 13:54:00 1997
***************
*** 210,217 ****
  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);
  void pregfree (pool *p, regex_t *reg);
--- 210,217 ----
  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);
  void pregfree (pool *p, regex_t *reg);
***************
*** 221,227 ****
   */
  
  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).
--- 221,227 ----
   */
  
  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).
diff -cr ./http_config.c /usr/local/etc/httpd/src/http_config.c
*** ./http_config.c	Sun Jun 29 13:08:36 1997
--- /usr/local/etc/httpd/src/http_config.c	Wed Sep 17 13:56:30 1997
***************
*** 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 = (long)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 = (long)cmd->info; 
      *(int *)(struct_ptr + offset) = arg ? 1 : 0;
      return NULL;
  }
diff -cr ./http_core.c /usr/local/etc/httpd/src/http_core.c
*** ./http_core.c	Tue Aug  5 03:20:54 1997
--- /usr/local/etc/httpd/src/http_core.c	Wed Sep 17 13:54:19 1997
***************
*** 844,850 ****
  {
      /* This one's pretty generic... */
    
!     int offset = (int)cmd->info;
      char *struct_ptr = (char *)cmd->server;
      
      *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
--- 844,850 ----
  {
      /* This one's pretty generic... */
    
!     long offset = (long)cmd->info;
      char *struct_ptr = (char *)cmd->server;
      
      *(char **)(struct_ptr + offset) = pstrdup (cmd->pool, arg);
diff -cr ./mod_alias.c /usr/local/etc/httpd/src/mod_alias.c
*** ./mod_alias.c	Sun Apr 13 20:09:13 1997
--- /usr/local/etc/httpd/src/mod_alias.c	Wed Sep 17 13:54:19 1997
***************
*** 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;
  
diff -cr ./mod_browser.c /usr/local/etc/httpd/src/mod_browser.c
*** ./mod_browser.c	Thu Jul 31 03:19:50 1997
--- /usr/local/etc/httpd/src/mod_browser.c	Wed Sep 17 13:54:19 1997
***************
*** 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 */
  
diff -cr ./mod_dir.c /usr/local/etc/httpd/src/mod_dir.c
*** ./mod_dir.c	Thu Jun 26 21:21:22 1997
--- /usr/local/etc/httpd/src/mod_dir.c	Wed Sep 17 13:54:20 1997
***************
*** 181,187 ****
  
  
  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;
  }
--- 181,187 ----
  
  
  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;
  }
***************
*** 388,394 ****
      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;
--- 388,394 ----
      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;
***************
*** 398,404 ****
          struct item *p = &items[i];
  	
          if(!strcmp_match(path,p->apply_path))
!             return (int)p->type;
      }
      return 0;
  }
--- 398,404 ----
          struct item *p = &items[i];
  	
          if(!strcmp_match(path,p->apply_path))
!             return (long)p->type;
      }
      return 0;
  }



Mime
View raw message