]> git.sur5r.net Git - openldap/commitdiff
Fix broken MSVC builds. The previous round of Mingw32 patches changed some
authorHoward Chu <hyc@openldap.org>
Sun, 31 Oct 1999 02:26:41 +0000 (02:26 +0000)
committerHoward Chu <hyc@openldap.org>
Sun, 31 Oct 1999 02:26:41 +0000 (02:26 +0000)
ifdefs to depend on _WINNT, which is bogus. Added _WIN32 back on these ifs,
and fixed some other include problems.

acconfig.h
clients/tools/ldapsearch.c
clients/ud/edit.c
include/ac/signal.h
include/ldap_pvt_thread.h
include/portable.h.in
libraries/liblutil/nt_err.c

index a803f191485bb2c451129edf9025f2b3849b37c8..60cfe22420bd505f36adc681632c8cc59f7e64c8 100644 (file)
 /* --------------------------------------------------- */
 /* 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 */
index 1eba56399a33e0d4f1394a109a765ac6dae10059..6a66a80ad16f96c7e421d2075dcdb92317580252 100644 (file)
 #include <ac/string.h>
 #include <ac/unistd.h>
 
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
 #include <ldap.h>
 
 #include "ldif.h"
index 67f2ed9a865c8e093c6c7852eaccf780bfe12f0b..003ff60abf0023f9fc65aa256226c0a86f60c2f5 100644 (file)
 #include <process.h>
 #endif
 
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
 #include <lber.h>
 #include <ldap.h>
 
index 96d9bf67865ec3811047414f9a7d2021cf1841f7..f2ca1b13a182f8432a0b1daaf6c631b13dd24b39 100644 (file)
@@ -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
 
index 2861681bad2a06ed9bb6612aeab3c2fc48598d7d..03feb219df08a7d09ba351cad235a427aba5b6ac 100644 (file)
@@ -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
 
index 49016317b43ef4d5b50087671d7ec2027d2cfdfd..9280da38246caa1fc34ff5b2bb7a8ccd07081958 100644 (file)
 /* --------------------------------------------------- */
 /* 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 */
index 15c9ec573c7b1849320debd5e5162c66a396ad98..691c19caa61f89497d582de5c115c90c69c5ae67 100644 (file)
@@ -3,8 +3,11 @@
 
 #include <windows.h>
 
-#ifdef HAVE_WINSOCK
+#ifdef HAVE_WINSOCK2
+#include <winsock2.h>
+#elif HAVE_WINSOCK
 #include <winsock.h>
+#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];