]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/sockets.cpp
do not remember game was switched when selected at startup, <3 @Garux
[xonotic/netradiant.git] / radiant / sockets.cpp
index 79a7de95326101db7f621cc350bba3b9c7244b92..d2a27d7e01848315d92ff3aaf407a0ac3128f850 100644 (file)
@@ -1,25 +1,25 @@
-
 #include "sockets.h"
+#include "globaldefs.h"
 
-#if defined( WIN32 )
+#if GDEF_OS_WINDOWS
 #include <winsock2.h>
-#elif defined ( POSIX )
+#elif GDEF_OS_POSIX
 #include <sys/time.h>
-#define SOCKET_ERROR -1
+const int SOCKET_ERROR = -1;
 #else
 #error "unsupported platform"
 #endif
 
-#ifdef __APPLE__
+#if GDEF_OS_MACOS
 #include <unistd.h>
 #endif
 
 int Net_Wait( socket_t *sock, long sec, long usec ){
 // used for select()
-#ifdef WIN32
+#if GDEF_OS_WINDOWS
        TIMEVAL tout = { sec, usec };
 #endif
-#if defined ( POSIX )
+#if GDEF_OS_POSIX
        timeval tout;
        tout.tv_sec = sec;
        tout.tv_usec = usec;