1 #if !defined(_LOCAL_WIN32_H) && defined(__WIN32__) && !defined(__CYGWIN__) 2 #define _LOCAL_WIN32_H 3 4 #ifdef HAVE_CONFIG_H 5 #include "config.h" 6 #endif 7 8 #ifdef __MINGW32__ 9 /* MingW32 specific stuff here. */ 10 # if defined(HAVE_WINSOCK2_H) && defined(HAVE_LIBWSOCK32) 11 /* We have to override the detected configuration 12 because it can't detect the network libraries. */ 13 # define HAVE_GETHOSTBYNAME 1 14 # define HAVE_INET_ADDR 1 15 # define HAVE_SOCKET 1 16 # endif 17 # define sleep(x) Sleep((x) * 1000) 18 #else 19 /* MSVC++ configuration follows */ 20 # undef HAVE_UNISTD_H 21 # define HAVE_STDLIB_H 1 22 # define HAVE_WINDOWS_H 1 23 # define HAVE_STDARG_H 1 24 # define HAVE_WINSOCK2_H 1 25 # define HAVE_WINDOWSX_H 1 26 #endif /* __MINGW32__ */ 27 28 #ifdef HAVE_WINDOWS_H 29 # include <windows.h> 30 #endif 31 #ifdef HAVE_WINDOWSX_H 32 # include <windowsx.h> 33 #endif 34 #ifdef HAVE_WINSOCK2_H 35 # include <winsock2.h> 36 #endif 37 38 #define _USE_WIN32_ 1 39 40 #endif /* _LOCAL_WIN32_H */ |