diff --git a/udp.c b/udp.c index 5b173a1..b292c5e 100644 --- a/udp.c +++ b/udp.c @@ -8,7 +8,7 @@ * store from ip + port in message ? */ -#ifdef __WIN32__ +#ifdef _WIN32 #include #else #include @@ -26,13 +26,13 @@ #undef while // G l o b a L E v i L // -#ifdef __WIN32__ +#ifdef _WIN32 static SOCKET udp_sock; #else static int udp_sock; #endif -#ifdef __WIN32__ +#ifdef _WIN32 void udp_init(Ampler_state *state) { // https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsastartup WSADATA wsa; @@ -71,7 +71,7 @@ void udp_init(Ampler_state *state) { } #endif -#ifdef __WIN32__ +#ifdef _WIN32 void udp_quit(Ampler_state *state) { closesocket(udp_sock); WSACleanup(); @@ -82,7 +82,7 @@ void udp_quit(Ampler_state *state) { } #endif -#ifdef __WIN32__ +#ifdef _WIN32 void recv_packet(Ampler_state *state) { char discard_buf[32] = { 0 }; // for dropped packets char *buf = discard_buf; @@ -128,7 +128,7 @@ void recv_packet(Ampler_state *state) { } #endif -#ifdef __WIN32__ +#ifdef _WIN32 void udp_frame(Ampler_state *state) { // https://docs.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-select fd_set recv_fd_set;