From: William A. Rowe Jr Date: Wed, 17 May 2000 01:52:48 +0000 (+0000) Subject: Cleanup ap_config.h fallout for Win32. Only a few very minor X-Git-Tag: APACHE_2_0_ALPHA_4~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=710c1945d1cb1123bb503a7c23392647edb0365f;p=apache Cleanup ap_config.h fallout for Win32. Only a few very minor changes to ap_config.h and util.c, but they might hurt someone... please watch those two carefully. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@85237 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_config.h b/include/ap_config.h index 231cf5445d..cc592951b2 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -62,7 +62,6 @@ extern "C" { #include "ap_mmn.h" /* MODULE_MAGIC_NUMBER_ */ #ifdef WIN32 -#include "ap_config_win32.h" #include "../os/win32/os.h" #else #include "ap_config_auto.h" @@ -121,17 +120,17 @@ extern "C" { /* We have a POSIX wait interface */ #include -#define ap_wait_t int - -#else /* HAVE_SYS_WAIT_H */ +#ifdef WEXITSTATUS +#define ap_wait_t int +#else /* We don't have a POSIX wait interface. Assume we have the old-style. Is this * a bad assumption? */ -#include +/* Yessiree bob, it was... but will this work instead? */ #define ap_wait_t union wait #define WEXITSTATUS(status) (int)((status).w_retcode) #define WTERMSIG(status) (int)((status).w_termsig) - +#endif /* !WEXITSTATUS */ #endif /* HAVE_SYS_WAIT_H */ /* ap_ versions of ctype macros to make sure they deal with 8-bit chars */ @@ -178,7 +177,7 @@ extern "C" { #endif /* EAGAIN apparently isn't defined on some systems */ -#ifndef HAVE_EAGAIN +#if !defined(HAVE_EAGAIN) && !defined(EAGAIN) #define EAGAIN EWOULDBLOCK #endif diff --git a/os/win32/os.h b/os/win32/os.h index bee53b9171..30e58227cd 100644 --- a/os/win32/os.h +++ b/os/win32/os.h @@ -136,12 +136,17 @@ every configuration function as __stdcall. #define MODULE_VAR_EXPORT __declspec(dllexport) - +#define HAVE_MEMMOVE #define HAVE_STRCASECMP #define HAVE_STRNCASECMP +#define HAVE_STRERROR +#define HAVE_STRDUP +#define HAVE_STRSTR #define strcasecmp(s1, s2) stricmp(s1, s2) #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n) + +#define HAVE_SYS_STAT_H #define lstat(x, y) stat(x, y) #define S_ISLNK(m) (0) #define S_ISREG(m) ((m & _S_IFREG) == _S_IFREG) diff --git a/server/util.c b/server/util.c index 2821f2423b..a7d2cc2386 100644 --- a/server/util.c +++ b/server/util.c @@ -1771,7 +1771,7 @@ char *strstr(char *s1, char *s2) #ifndef HAVE_INITGROUPS int initgroups(const char *name, gid_t basegid) { -#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) +#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) || defined(WIN32) /* QNX, MPE and BeOS do not appear to support supplementary groups. */ return 0; #else /* ndef QNX */ @@ -1799,7 +1799,7 @@ int initgroups(const char *name, gid_t basegid) } #endif /* def NEED_INITGROUPS */ -#ifndef HAVE_WAITPID +#if !defined(HAVE_WAITPID) && !defined(WIN32) /* From ikluft@amdahl.com * this is not ideal but it works for SVR3 variants * Modified by dwd@bell-labs.com to call wait3 instead of wait because