httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@hyperreal.org>
Subject cvs commit: apachen/src/os/unix os.h
Date Thu, 25 Sep 1997 01:03:30 GMT
dgaudet     97/09/24 18:03:28

  Modified:    src/main buff.c conf.h http_core.c http_main.c
               src/os/unix os.h
  Log:
  Cleanup inline a bit.  Use ap_inline, which expands to __inline__ under
  gcc (and so is valid even when using -ansi -pedantic).
  
  Clean up JMP_BUF multiple definitions in conf.h.
  
  Reviewed by:	Dean Gaudet, Brian Behlendorf
  
  Revision  Changes    Path
  1.46      +3 -3      apachen/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/buff.c,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- buff.c	1997/09/14 11:13:52	1.45
  +++ buff.c	1997/09/25 01:03:19	1.46
  @@ -182,7 +182,7 @@
   #endif /* WIN32 */
   
   /* the lowest level reading primitive */
  -static inline int buff_read(BUFF *fb, void *buf, int nbyte)
  +static ap_inline int buff_read(BUFF *fb, void *buf, int nbyte)
   {
       int rv;
   
  @@ -201,7 +201,7 @@
   }
   
   /* the lowest level writing primitive */
  -static inline int buff_write(BUFF *fb, const void *buf, int nbyte)
  +static ap_inline int buff_write(BUFF *fb, const void *buf, int nbyte)
   {
       int rv;
   
  @@ -483,7 +483,7 @@
       }
   }
   
  -static inline int saferead_guts(BUFF *fb, void *buf, int nbyte)
  +static ap_inline int saferead_guts(BUFF *fb, void *buf, int nbyte)
   {
       int rv;
   
  
  
  
  1.142     +10 -31    apachen/src/main/conf.h
  
  Index: conf.h
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/conf.h,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- conf.h	1997/09/16 03:49:56	1.141
  +++ conf.h	1997/09/25 01:03:20	1.142
  @@ -69,7 +69,6 @@
   /* Define one of these according to your system. */
   #if defined(MPE)
   #include <sys/times.h>
  -#define JMP_BUF sigjmp_buf
   #define NO_SETSID
   #define NO_KILLPG
   #define NO_WRITEV
  @@ -90,7 +89,6 @@
   #undef NO_SETSID
   char *crypt(const char *pw, const char *salt);
   char *mktemp(char *template);
  -#define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
   #define USE_MMAP_FILES
   #include <sys/time.h>
  @@ -108,7 +106,6 @@
   #undef NO_SETSID
   #define HAVE_SYS_RESOURCE_H
   #define bzero(a,b) memset(a,0,b)
  -#define JMP_BUF sigjmp_buf
   /*#define USE_FCNTL_SERIALIZED_ACCEPT */
   /*#define USE_SYSVSEM_SERIALIZED_ACCEPT */
   #if SOLARIS2 < 250
  @@ -129,7 +126,6 @@
    * there's some weird conflict with non-BSD signals */
   #define NO_KILLPG
   #undef NO_SETSID
  -#define JMP_BUF sigjmp_buf
   /*#define USE_FCNTL_SERIALIZED_ACCEPT */
   #define USE_SYSVSEM_SERIALIZED_ACCEPT
   #define HAVE_SHMGET
  @@ -148,7 +144,6 @@
   #ifndef _HIUX_SOURCE
   #define _HIUX_SOURCE
   #endif
  -#define JMP_BUF sigjmp_buf
   #define HAVE_SHMGET
   #define SELECT_NEEDS_CAST
   #define HAVE_SYSLOG
  @@ -161,7 +156,6 @@
   #ifndef _HPUX_SOURCE
   #define _HPUX_SOURCE
   #endif
  -#define JMP_BUF sigjmp_buf
   #define HAVE_SHMGET
   #define HAVE_SYSLOG
   #ifndef HPUX10
  @@ -174,7 +168,6 @@
   #undef NO_KILLPG
   #undef NO_SETSID
   #define HAVE_SYS_SELECT_H
  -#define JMP_BUF sigjmp_buf
   #ifndef __ps2__
   #define HAVE_MMAP
   #define USE_MMAP_FILES
  @@ -200,14 +193,12 @@
   #ifndef __ultrix__		/* Hack to check for pre-Ultrix 4.4 cc */
   #define const			/* Not implemented */
   #endif
  -#define JMP_BUF sigjmp_buf
   #define HAVE_SYSLOG
   
   #elif defined(OSF1)
   #define HAVE_GMTOFF
   #undef NO_KILLPG
   #undef NO_SETSID
  -#define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
   #define USE_MMAP_FILES
   #define HAVE_CRYPT_H
  @@ -218,7 +209,6 @@
   #define HAVE_GMTOFF
   #undef NO_KILLPG
   #undef NO_SETSID
  -#define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
   #define USE_MMAP_FILES
   #define HAVE_CRYPT_H
  @@ -289,7 +279,6 @@
   #define STDERR_FILENO 2
   #define waitpid(a,b,c) wait4((a) == -1 ? 0 : (a),(union wait *)(b),c,NULL)
   typedef int pid_t;
  -#define JMP_BUF jmp_buf
   #define USE_LONGJMP
   #define NO_USE_SIGACTION
   #define HAVE_SYSLOG
  @@ -315,7 +304,6 @@
   #undef NO_KILLPG
   #undef NO_SETSID
   #undef NEED_STRDUP
  -#define JMP_BUF sigjmp_buf
   #include <sys/time.h>
   #define HAVE_SYSLOG
   
  @@ -325,14 +313,12 @@
   #undef NO_SETSID
   #define NEED_INITGROUPS
   #define NO_WRITEV
  -#define JMP_BUF sigjmp_buf
   #define SIGURG SIGUSR1		/* but note, this signal will be sent to a process group if enabled
(for OOB data). It is not currently enabled. */
   #include <sys/time.h>
   #define HAVE_SYSLOG
   
   #elif defined(SCO5)
   
  -#define JMP_BUF sigjmp_buf
   #define SIGURG SIGUSR1
   #define HAVE_SYS_SELECT_H
   #define USE_FCNTL_SERIALIZED_ACCEPT
  @@ -366,7 +352,6 @@
   #undef NO_KILLPG
   #undef NO_SETSID
   #define NEED_STRDUP
  -#define JMP_BUF sigjmp_buf
   /* fcntl() locking is expensive with NFS */
   #define USE_FLOCK_SERIALIZED_ACCEPT
   #define HAVE_SHMGET
  @@ -391,7 +376,6 @@
   #define NEED_STRNCASECMP
   #endif
   #define bzero(a,b) memset(a,0,b)
  -#define JMP_BUF sigjmp_buf
   /* A lot of SVR4 systems need this */
   #define USE_FCNTL_SERIALIZED_ACCEPT
   #define HAVE_SYSLOG
  @@ -407,7 +391,6 @@
   #define NEED_STRCASECMP
   #define NEED_STRNCASECMP
   #define bzero(a,b) memset(a,0,b)
  -#define JMP_BUF sigjmp_buf
   #define HAVE_RESOURCE
   #define HAVE_MMAP
   #define USE_MMAP_FILES
  @@ -427,7 +410,6 @@
   #define NEED_STRCASECMP
   #define NEED_STRNCASECMP
   #define bzero(a,b) memset(a,0,b)
  -#define JMP_BUF sigjmp_buf
   /* A lot of SVR4 systems need this */
   #define USE_FCNTL_SERIALIZED_ACCEPT
   #define ap_inet_addr inet_network
  @@ -438,7 +420,6 @@
   #define HAVE_GMTOFF
   #undef NO_KILLPG
   #undef NO_SETSID
  -#define JMP_BUF sigjmp_buf
   #define HAVE_SYSLOG
   #ifndef DEFAULT_USER
   #define DEFAULT_USER "nobody"
  @@ -474,7 +455,6 @@
   #define HAVE_GMTOFF
   #undef NO_KILLPG
   #undef NO_SETSID
  -#define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
   #define USE_MMAP_FILES
   #ifndef DEFAULT_USER
  @@ -507,7 +487,6 @@
   #define NEED_PROCESS_H
   #define HAVE_SYS_SELECT_H
   #include <unix.h>
  -#define JMP_BUF sigjmp_buf
   #define HAVE_MMAP
   #define HAVE_SYSLOG
   
  @@ -517,7 +496,6 @@
   #define NEED_STRCASECMP
   #define NEED_STRNCASECMP
   #define NEED_INITGROUPS
  -#define JMP_BUF jmp_buf
   #define HAVE_SYSLOG
   
   #elif defined(UXPDS)
  @@ -529,7 +507,6 @@
   #undef NO_SETSID
   #define HAVE_RESOURCE 1
   #define bzero(a,b) memset(a,0,b)
  -#define JMP_BUF sigjmp_buf
   #define USE_FCNTL_SERIALIZED_ACCEPT
   #define HAVE_MMAP
   #define USE_MMAP_FILES
  @@ -538,7 +515,6 @@
   
   #elif defined(__EMX__)
   /* Defines required for EMX OS/2 port. */
  -#define JMP_BUF sigjmp_buf
   #define NO_KILLPG
   #define NEED_STRCASECMP
   #define NEED_STRNCASECMP
  @@ -553,7 +529,6 @@
   
   #elif defined(__MACHTEN__)
   typedef int rlim_t;
  -#define JMP_BUF sigjmp_buf
   #undef NO_KILLPG
   #define NO_SETSID
   #define HAVE_GMTOFF
  @@ -563,6 +538,7 @@
   #endif
   #define USE_FLOCK_SERIALIZED_ACCEPT
   #define NO_USE_SIGACTION
  +#define JMP_BUF sigjmp_buf
   #define USE_LONGJMP
   #undef NEED_STRDUP
   #else
  @@ -583,7 +559,6 @@
   #define NO_TIMEZONE
   #include <stdio.h>
   #include <sys/types.h>
  -#define JMP_BUF jmp_buf
   typedef int rlim_t;
   
   #elif defined(ISC)
  @@ -592,7 +567,6 @@
   #undef NO_SETSID
   #define HAVE_SHMGET
   #define SIGURG SIGUSR1
  -#define JMP_BUF sigjmp_buf
   #define USE_FCNTL_SERIALIZED_ACCEPT
   #define HAVE_SYSLOG
   
  @@ -600,7 +574,6 @@
   #define HAVE_SYS_RESOURCE_H
   #define HAVE_SHMGET
   #define USE_LONGJMP
  -#define JMP_BUF jmp_buf
   #define NO_SETSID
   #define NO_USE_SIGACTION
   #define NEED_WAITPID
  @@ -615,7 +588,6 @@
   
   #elif defined(RISCIX)
   #include <sys/time.h>
  -#define JMP_BUF jmp_buf
   typedef int rlim_t;
   #define NO_USE_SIGACTION
   #define USE_LONGJMP
  @@ -626,7 +598,6 @@
   #elif defined(BEOS)
   #include <stddef.h>
   
  -#define JMP_BUF sigjmp_buf
   #define NO_WRITEV
   #define NO_KILLPG
   #define NEED_INITGROUPS
  @@ -831,9 +802,15 @@
   #if defined(USE_LONGJMP)
   #define ap_longjmp(x, y)        longjmp((x), (y))
   #define ap_setjmp(x)            setjmp(x)
  +#ifndef JMP_BUF
  +#define JMP_BUF jmp_buf
  +#endif
   #else
   #define ap_longjmp(x, y)        siglongjmp((x), (y))
   #define ap_setjmp(x)            sigsetjmp((x), 1)
  +#ifndef JMP_BUF
  +#define JMP_BUF sigjmp_buf
  +#endif
   #endif
   
   #ifdef SELECT_NEEDS_CAST
  @@ -849,7 +826,9 @@
   
   /* so that we can use inline on some critical functions */
   #if !defined(__GNUC__)
  -#define inline
  +#define ap_inline
  +#else
  +#define ap_inline __inline__
   #endif
   
   #ifdef NO_OTHER_CHILD
  
  
  
  1.123     +1 -1      apachen/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_core.c,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- http_core.c	1997/09/12 21:49:17	1.122
  +++ http_core.c	1997/09/25 01:03:21	1.123
  @@ -443,7 +443,7 @@
   
   
   /* Code from Harald Hanche-Olsen <hanche@imf.unit.no> */
  -static inline void do_double_reverse (conn_rec *conn)
  +static ap_inline void do_double_reverse (conn_rec *conn)
   {
       struct hostent *hptr;
   
  
  
  
  1.226     +4 -4      apachen/src/main/http_main.c
  
  Index: http_main.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
  retrieving revision 1.225
  retrieving revision 1.226
  diff -u -r1.225 -r1.226
  --- http_main.c	1997/09/18 18:56:09	1.225
  +++ http_main.c	1997/09/25 01:03:22	1.226
  @@ -1538,7 +1538,7 @@
    * anyway.
    */
   
  -inline void sync_scoreboard_image(void)
  +ap_inline void sync_scoreboard_image(void)
   {
   #ifdef SCOREBOARD_FILE
       lseek(scoreboard_fd, 0L, 0);
  @@ -1553,7 +1553,7 @@
       return (scoreboard_image ? 1 : 0);
   }
   
  -static inline void put_scoreboard_info(int child_num,
  +static ap_inline void put_scoreboard_info(int child_num,
   				       short_score *new_score_rec)
   {
   #ifdef SCOREBOARD_FILE
  @@ -2170,7 +2170,7 @@
    *
    * Hash function provided by David Hankins.
    */
  -static inline unsigned hash_inaddr(unsigned key)
  +static ap_inline unsigned hash_inaddr(unsigned key)
   {
       key ^= (key >> 16);
       return ((key >> 8) ^ key) % VHASH_TABLE_SIZE;
  @@ -2680,7 +2680,7 @@
    * Find a listener which is ready for accept().  This advances the
    * head_listener global.
    */
  -static inline listen_rec *find_ready_listener(fd_set * main_fds)
  +static ap_inline listen_rec *find_ready_listener(fd_set * main_fds)
   {
       listen_rec *lr;
   
  
  
  
  1.3       +1 -1      apachen/src/os/unix/os.h
  
  Index: os.h
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/os/unix/os.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- os.h	1997/09/12 07:28:50	1.2
  +++ os.h	1997/09/25 01:03:28	1.3
  @@ -8,7 +8,7 @@
   /* Compiler supports inline, so include the inlineable functions as
    * part of the header
    */
  -#define INLINE extern inline
  +#define INLINE extern __inline__
   #include "os-inline.c"
   #endif
   
  
  
  

Mime
View raw message