From 17e1877a121c5744f3f64e6e20cc524d1f31ddef Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 31 Oct 1999 02:26:41 +0000 Subject: [PATCH] Fix broken MSVC builds. The previous round of Mingw32 patches changed some ifdefs to depend on _WINNT, which is bogus. Added _WIN32 back on these ifs, and fixed some other include problems. --- acconfig.h | 6 +----- clients/tools/ldapsearch.c | 4 ++++ clients/ud/edit.c | 4 ++++ include/ac/signal.h | 2 +- include/ldap_pvt_thread.h | 2 +- include/portable.h.in | 6 +----- libraries/liblutil/nt_err.c | 8 ++++---- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/acconfig.h b/acconfig.h index a803f19148..60cfe22420 100644 --- a/acconfig.h +++ b/acconfig.h @@ -14,15 +14,11 @@ /* --------------------------------------------------- */ /* begin of WINNT specific entries */ -#ifdef WINNT +#if defined(WINNT) || defined(_WIN32) /* don't suck in all of the win32 api */ #define WIN32_LEAN_AND_MEAN -/* WindowsNT specific features */ -#define HAVE_NT_SERVICE_MANAGER 1 -#define HAVE_NT_EVENT_LOG 1 - #define MAXPATHLEN _MAX_PATH /* preprocess out undefined functions */ diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 1eba56399a..6a66a80ad1 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -14,6 +14,10 @@ #include #include +#ifdef HAVE_IO_H +#include +#endif + #include #include "ldif.h" diff --git a/clients/ud/edit.c b/clients/ud/edit.c index 67f2ed9a86..003ff60abf 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -31,6 +31,10 @@ #include #endif +#ifdef HAVE_IO_H +#include +#endif + #include #include diff --git a/include/ac/signal.h b/include/ac/signal.h index 96d9bf6786..f2ca1b13a1 100644 --- a/include/ac/signal.h +++ b/include/ac/signal.h @@ -26,7 +26,7 @@ #undef LDAP_SIGUSR1 #undef LDAP_SIGUSR2 -# if defined(WINNT) || defined(_WINNT) +# if defined(WINNT) || defined(_WINNT) || defined(_WIN32) # define LDAP_SIGUSR1 SIGILL # define LDAP_SIGUSR2 SIGTERM diff --git a/include/ldap_pvt_thread.h b/include/ldap_pvt_thread.h index 2861681bad..03feb219df 100644 --- a/include/ldap_pvt_thread.h +++ b/include/ldap_pvt_thread.h @@ -138,7 +138,7 @@ typedef struct ldap_pvt_thread_lwp_cv ldap_pvt_thread_cond_t; LDAP_END_DECL /* If we're in the NT env at all, we want these defs, threaded or not */ -#elif defined(WINNT) || defined(_WINNT) /* HAVE_NT_THREADS */ +#elif defined(WINNT) || defined(_WINNT) || defined(_WIN32) /* HAVE_NT_THREADS */ LDAP_BEGIN_DECL diff --git a/include/portable.h.in b/include/portable.h.in index 49016317b4..9280da3824 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -15,15 +15,11 @@ /* --------------------------------------------------- */ /* begin of WINNT specific entries */ -#ifdef WINNT +#if defined(WINNT) || defined(_WIN32) /* don't suck in all of the win32 api */ #define WIN32_LEAN_AND_MEAN -/* WindowsNT specific features */ -#define HAVE_NT_SERVICE_MANAGER 1 -#define HAVE_NT_EVENT_LOG 1 - #define MAXPATHLEN _MAX_PATH /* preprocess out undefined functions */ diff --git a/libraries/liblutil/nt_err.c b/libraries/liblutil/nt_err.c index 15c9ec573c..691c19caa6 100644 --- a/libraries/liblutil/nt_err.c +++ b/libraries/liblutil/nt_err.c @@ -3,8 +3,11 @@ #include -#ifdef HAVE_WINSOCK +#ifdef HAVE_WINSOCK2 +#include +#elif HAVE_WINSOCK #include +#endif /* HAVE_WINSOCK(2) */ #define __RETSTR( x ) case x: return #x; @@ -88,9 +91,6 @@ char *WSAGetLastErrorString( void ) #undef __RETSTR -#endif /* HAVE_WINSOCK */ - - char *GetErrorString( int err ) { static char msgBuf[1024]; -- 2.39.5