mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 01:31:08 +00:00
MSYS and MSYS2 differ in the tricks to include both windows.h and winsock2.h, use __MINGW32_VERSION to differentiate them
This commit is contained in:
parent
5bbe378a79
commit
6ab0e3465f
1 changed files with 10 additions and 0 deletions
|
@ -306,8 +306,18 @@ typedef struct {
|
|||
#define WINVER Windows2000
|
||||
#endif
|
||||
|
||||
// Trick to distinguish between MSYS/MinGW and MSYS2/MinGW32, the latter defines
|
||||
// __MINGW32_MAJOR_VERSION and __MINGW32_MINOR_VERSION for compatibility
|
||||
// but to a lower version than older MSYS/MinGW, but not the compound version
|
||||
//
|
||||
#if defined(__MINGW32_VERSION)
|
||||
#define __USE_W32_SOCKETS
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#undef __OBJC_BOOL
|
||||
#undef BOOL
|
||||
|
|
Loading…
Reference in a new issue