win32 bug fixes

This commit is contained in:
eihrul 2004-11-23 16:23:36 +00:00
parent 8b475848f1
commit d0764152e4
2 changed files with 5 additions and 3 deletions

View file

@ -35,6 +35,8 @@ typedef struct
#else #else
#define ENET_API __declspec( dllimport ) #define ENET_API __declspec( dllimport )
#endif /* ENET_BUILDING_LIB */ #endif /* ENET_BUILDING_LIB */
#else /* !ENET_DLL */
#define ENET_API extern
#endif /* ENET_DLL */ #endif /* ENET_DLL */
#endif /* __ENET_WIN32_H__ */ #endif /* __ENET_WIN32_H__ */

View file

@ -88,7 +88,7 @@ ENetSocket
enet_socket_create (ENetSocketType type, const ENetAddress * address) enet_socket_create (ENetSocketType type, const ENetAddress * address)
{ {
ENetSocket newSocket = socket (PF_INET, type == ENET_SOCKET_TYPE_DATAGRAM ? SOCK_DGRAM : SOCK_STREAM, 0); 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; receiveBufferSize = ENET_HOST_RECEIVE_BUFFER_SIZE;
struct sockaddr_in sin; struct sockaddr_in sin;
@ -216,8 +216,8 @@ enet_socket_receive (ENetSocket socket,
ENetBuffer * buffers, ENetBuffer * buffers,
size_t bufferCount) size_t bufferCount)
{ {
DWORD sinLength = sizeof (struct sockaddr_in), INT sinLength = sizeof (struct sockaddr_in);
flags = 0, DWORD flags = 0,
recvLength; recvLength;
struct sockaddr_in sin; struct sockaddr_in sin;