X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fsockets.cpp;h=d2a27d7e01848315d92ff3aaf407a0ac3128f850;hb=6d89c0d85ada682828059c3c69be4747a4933c19;hp=79a7de95326101db7f621cc350bba3b9c7244b92;hpb=62d99f889c0e98be65f779d3983109c84ce58cec;p=xonotic%2Fnetradiant.git diff --git a/radiant/sockets.cpp b/radiant/sockets.cpp index 79a7de95..d2a27d7e 100644 --- a/radiant/sockets.cpp +++ b/radiant/sockets.cpp @@ -1,25 +1,25 @@ - #include "sockets.h" +#include "globaldefs.h" -#if defined( WIN32 ) +#if GDEF_OS_WINDOWS #include -#elif defined ( POSIX ) +#elif GDEF_OS_POSIX #include -#define SOCKET_ERROR -1 +const int SOCKET_ERROR = -1; #else #error "unsupported platform" #endif -#ifdef __APPLE__ +#if GDEF_OS_MACOS #include #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;