win32.h

Go to the documentation of this file.
00001 
00005 #ifndef __ENET_WIN32_H__
00006 #define __ENET_WIN32_H__
00007 
00008 #ifdef ENET_BUILDING_LIB
00009 #pragma warning (disable: 4996) // 'strncpy' was declared deprecated
00010 #pragma warning (disable: 4267) // size_t to int conversion
00011 #pragma warning (disable: 4244) // 64bit to 32bit int
00012 #pragma warning (disable: 4018) // signed/unsigned mismatch
00013 #endif
00014 
00015 #include <stdlib.h>
00016 #include <winsock2.h>
00017 
00018 typedef SOCKET ENetSocket;
00019 
00020 enum
00021 {
00022     ENET_SOCKET_NULL = INVALID_SOCKET
00023 };
00024 
00025 #define ENET_HOST_TO_NET_16(value) (htons (value))
00026 #define ENET_HOST_TO_NET_32(value) (htonl (value))
00027 
00028 #define ENET_NET_TO_HOST_16(value) (ntohs (value))
00029 #define ENET_NET_TO_HOST_32(value) (ntohl (value))
00030 
00031 typedef struct
00032 {
00033     size_t dataLength;
00034     void * data;
00035 } ENetBuffer;
00036 
00037 #define ENET_CALLBACK __cdecl
00038 
00039 #if defined ENET_DLL
00040 #if defined ENET_BUILDING_LIB
00041 #define ENET_API __declspec( dllexport )
00042 #else
00043 #define ENET_API __declspec( dllimport )
00044 #endif /* ENET_BUILDING_LIB */
00045 #else /* !ENET_DLL */
00046 #define ENET_API extern
00047 #endif /* ENET_DLL */
00048 
00049 #endif /* __ENET_WIN32_H__ */
00050 
00051 

Generated on Wed Jun 6 14:33:50 2007 for enet by  doxygen 1.5.1