From d0764152e4dbeaef56c60389257258f557a73947 Mon Sep 17 00:00:00 2001 From: eihrul Date: Tue, 23 Nov 2004 16:23:36 +0000 Subject: [PATCH] win32 bug fixes --- include/enet/win32.h | 2 ++ win32.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/enet/win32.h b/include/enet/win32.h index c2b4ba8..ae231c2 100644 --- a/include/enet/win32.h +++ b/include/enet/win32.h @@ -35,6 +35,8 @@ typedef struct #else #define ENET_API __declspec( dllimport ) #endif /* ENET_BUILDING_LIB */ +#else /* !ENET_DLL */ +#define ENET_API extern #endif /* ENET_DLL */ #endif /* __ENET_WIN32_H__ */ diff --git a/win32.c b/win32.c index d10aceb..c5c1959 100644 --- a/win32.c +++ b/win32.c @@ -88,7 +88,7 @@ ENetSocket enet_socket_create (ENetSocketType type, const ENetAddress * address) { ENetSocket newSocket = socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); - int nonBlocking = 1, + u_long nonBlocking = 1, receiveBufferSize = ENET_HOST_RECEIVE_BUFFER_SIZE; struct sockaddr_in sin; @@ -216,8 +216,8 @@ enet_socket_receive (ENetSocket socket, ENetBuffer * buffers, size_t bufferCount) { - DWORD sinLength = sizeof (struct sockaddr_in), - flags = 0, + INT sinLength = sizeof (struct sockaddr_in); + DWORD flags = 0, recvLength; struct sockaddr_in sin;