randy 96/07/27 09:21:21
Modified: src conf.h http_core.c http_core.h Log: Further setrlimit cleanup. Revert to existing HAVE_RESOURCE mechanism. Added rlim_t type for FreeBSD, BSDI, SUNOS4 and NetBSD Revision Changes Path 1.27 +13 -8 apache/src/conf.h Index: conf.h =================================================================== RCS file: /export/home/cvs/apache/src/conf.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C3 -r1.26 -r1.27 *** conf.h 1996/07/27 13:08:27 1.26 --- conf.h 1996/07/27 16:21:16 1.27 *************** *** 64,70 **** /* Define one of these according to your system. */ #if defined(SUNOS4) #define HAVE_GMTOFF ! #define HAVE_RESOURCE #undef NO_KILLPG #undef NO_SETSID char *crypt(char *pw, char *salt); --- 64,70 ---- /* Define one of these according to your system. */ #if defined(SUNOS4) #define HAVE_GMTOFF ! #define HAVE_SYS_RESOURCE_H #undef NO_KILLPG #undef NO_SETSID char *crypt(char *pw, char *salt); *************** *** 72,83 **** #define HAVE_MMAP #include <sys/time.h> #define NEED_STRERROR #elif defined(SOLARIS2) #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID ! #define HAVE_RESOURCE #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf --- 72,84 ---- #define HAVE_MMAP #include <sys/time.h> #define NEED_STRERROR + typedef int rlim_t; #elif defined(SOLARIS2) #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID ! #define HAVE_SYS_RESOURCE_H #define bzero(a,b) memset(a,0,b) #define getwd(d) getcwd(d,MAX_STRING_LEN) #define JMP_BUF sigjmp_buf *************** *** 97,103 **** #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) ! #define HAVE_RESOURCE #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID --- 98,104 ---- #define BROKEN_WAIT #elif defined(HPUX) || defined(HPUX10) ! #define HAVE_SYS_RESOURCE_H #undef HAVE_GMTOFF #define NO_KILLPG #undef NO_SETSID *************** *** 217,223 **** #define HAVE_SYS_SELECT_H #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP ! #define NEED_SYS_RESOURCE_H #define SecureWare /* Although SCO 5 defines these in <strings.h> (note the "s") they don't have --- 218,224 ---- #define HAVE_SYS_SELECT_H #define USE_FCNTL_SERIALIZED_ACCEPT #define HAVE_MMAP ! #define HAVE_SYS_RESOURCE_H #define SecureWare /* Although SCO 5 defines these in <strings.h> (note the "s") they don't have *************** *** 270,279 **** --- 271,282 ---- #define USE_FCNTL_SERIALIZED_ACCEPT #elif defined(__NetBSD__) + #define HAVE_SYS_RESOURCE_H #define HAVE_GMTOFF #undef NO_KILLPG #undef NO_SETSID #define JMP_BUF sigjmp_buf + typedef quad_t rlim_t; #elif defined(UTS21) #undef HAVE_GMTOFF *************** *** 293,303 **** --- 296,308 ---- #define timezone _bky_timezone #elif defined(__FreeBSD__) || defined(__bsdi__) + #define HAVE_SYS_RESOURCE_H #define HAVE_GMTOFF #undef NO_KILLPG #undef NO_SETSID #define JMP_BUF sigjmp_buf #define HAVE_MMAP + typedef quad_t rlim_t; #elif defined(QNX) #undef NO_KILLPG *************** *** 341,351 **** #endif /* Do we have sys/resource.h; assume that BSD does. */ ! #ifndef HAVE_RESOURCE #ifdef BSD ! #define HAVE_RESOURCE #endif ! #endif /* HAVE_RESOURCE */ /* * The particular directory style your system supports. If you have dirent.h --- 346,356 ---- #endif /* Do we have sys/resource.h; assume that BSD does. */ ! #ifndef HAVE_SYS_RESOURCE_H #ifdef BSD ! #define HAVE_SYS_RESOURCE_H #endif ! #endif /* HAVE_SYS_RESOURCE_H */ /* * The particular directory style your system supports. If you have dirent.h *************** *** 392,398 **** #endif #include "regex/regex.h" ! #ifdef HAVE_RESOURCE #include <sys/resource.h> #ifdef SUNOS4 int getrlimit( int, struct rlimit *); --- 397,403 ---- #endif #include "regex/regex.h" ! #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> #ifdef SUNOS4 int getrlimit( int, struct rlimit *); 1.23 +1 -1 apache/src/http_core.c Index: http_core.c =================================================================== RCS file: /export/home/cvs/apache/src/http_core.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C3 -r1.22 -r1.23 *** http_core.c 1996/07/27 13:25:05 1.22 --- http_core.c 1996/07/27 16:21:17 1.23 *************** *** 1021,1027 **** { "MaxClients", set_server_limit, NULL, RSRC_CONF, TAKE1, NULL }, { "MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF, TAKE1, NULL }, { "RLimitCPU", ! #ifdef RMLIMIT_CPU set_limit_cpu, (void*)XtOffsetOf(core_dir_config, limit_cpu), #else no_set_limit, NULL, --- 1021,1027 ---- { "MaxClients", set_server_limit, NULL, RSRC_CONF, TAKE1, NULL }, { "MaxRequestsPerChild", set_max_requests, NULL, RSRC_CONF, TAKE1, NULL }, { "RLimitCPU", ! #ifdef RLIMIT_CPU set_limit_cpu, (void*)XtOffsetOf(core_dir_config, limit_cpu), #else no_set_limit, NULL, 1.10 +0 -3 apache/src/http_core.h Index: http_core.h =================================================================== RCS file: /export/home/cvs/apache/src/http_core.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C3 -r1.9 -r1.10 *** http_core.h 1996/07/27 13:08:29 1.9 --- http_core.h 1996/07/27 16:21:18 1.10 *************** *** 108,116 **** #ifdef CORE_PRIVATE - #ifdef NEED_SYS_RESOURCE_H - #include <sys/resource.h> - #endif /* * Core is also unlike other modules in being implemented in more than * one file... so, data structures are declared here, even though most of --- 108,113 ----