mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
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.
This commit is contained in:
parent
aab546e567
commit
17e1877a12
7 changed files with 16 additions and 16 deletions
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in a new issue