Define WIN32_LEAN_AND_MEAN before #include <windows.h>
Otherwise, winsock.h is implicitly #included by the Win32 API, which might then conflict with winsock2.h. git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9543 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 804a2f7686eef1b656a63225cbda4f89d7b36639 Former-commit-id: e52e533be7785034b1fdebad19bce1e9940c26f8
This commit is contained in:
parent
707bd2e28b
commit
d43f9b039a
4 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include "portability.h"
|
#include "portability.h"
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <wincrypt.h>
|
#include <wincrypt.h>
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include "portability.h"
|
#include "portability.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
|
@ -87,6 +87,10 @@ typedef struct ModInfoNC {
|
||||||
typedef void* tSOHandle;
|
typedef void* tSOHandle;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
/* Prevent inclusion of winsock.h in windows.h */
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define SOHandle(h) ((HMODULE)(h))
|
#define SOHandle(h) ((HMODULE)(h))
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include "tgf.hpp"
|
#include "tgf.hpp"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
/* Prevent inclusion of winsock.h in windows.h */
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
# define dlopen(pszShLibFileName) (void*)LoadLibrary(pszShLibFileName)
|
# define dlopen(pszShLibFileName) (void*)LoadLibrary(pszShLibFileName)
|
||||||
# define dlsym(pvHandle, pszFuncName) GetProcAddress((HMODULE)pvHandle, pszFuncName)
|
# define dlsym(pvHandle, pszFuncName) GetProcAddress((HMODULE)pvHandle, pszFuncName)
|
||||||
|
|
Loading…
Reference in a new issue