Commit 17e1877a authored by Howard Chu's avatar Howard Chu
Browse files

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.
parent aab546e5
......@@ -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 */
......
......@@ -14,6 +14,10 @@
#include <ac/string.h>
#include <ac/unistd.h>
#ifdef HAVE_IO_H
#include <io.h>
#endif
#include <ldap.h>
#include "ldif.h"
......
......@@ -31,6 +31,10 @@
#include <process.h>
#endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
#include <lber.h>
#include <ldap.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
......
......@@ -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
......
......@@ -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 */
......
......@@ -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];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment