Permalink
Browse files

Fix some warnings for Win32.

  • Loading branch information...
1 parent 98a35e6 commit 15abd43ad7fe9b6c05d464d679bd404742191705 @Themaister committed Aug 19, 2011
View
@@ -18,10 +18,12 @@
#include <poll.h>
#ifdef _WIN32
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#include <winsock2.h>
+#include <windows.h>
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
@@ -149,7 +151,7 @@ int main(int argc, char ** argv)
#ifdef _WIN32
printf( "==============================================================================\n"
- ":: RSD server : Win32 : %s - Copyright (C) 2010 Hans-Kristian Arntzen ::\n"
+ ":: RSD server : Win32 : %s - Copyright (C) 2010-2011 Hans-Kristian Arntzen ::\n"
"==============================================================================\n", RSD_VERSION);
#endif
@@ -21,7 +21,9 @@
#undef CONST_CAST
#ifdef _WIN32
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
View
@@ -19,7 +19,9 @@
#include <poll.h>
#ifdef _WIN32
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
View
@@ -31,10 +31,12 @@
#include <arpa/inet.h>
#include <sys/un.h>
#else
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
#include <winsock2.h>
+#include <windows.h>
#include <ws2tcpip.h>
#include <pthread.h>
#endif
@@ -21,7 +21,9 @@
// Trivial implementation of the subset of features that's needed for Win32,
// so we can avoid another DLL and link statically :)
+#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
+#endif
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -28,8 +28,8 @@
#include <stdio.h> /* for snprintf() */
#ifdef __WIN32
-#include <windows.h>
#include <winsock2.h>
+#include <windows.h>
#else
#include <errno.h> /* for errno keeping in _CLOSE() */
#define _HAVE_ERRNO
@@ -24,8 +24,8 @@
#include <unistd.h>
#ifdef __WIN32
-#include <windows.h>
#include <winsock2.h>
+#include <windows.h>
#else
#include <sys/types.h>
#include <sys/socket.h>

0 comments on commit 15abd43

Please sign in to comment.