Changes for mingw32 compatibility. Gave up using GetAddrInfoW. getaddrinfo is dynamically bound, gethostbyname is used if it is not available.

VC compilation is broken.

Make sure to use the dynamic boost-thread lib with mingw, as thread specific pointers are used!
This commit is contained in:
lotodore
2007-09-01 14:04:41 +00:00
parent 26397dee94
commit 1f6a10e2d1
9 changed files with 100 additions and 99 deletions
+11 -9
View File
@@ -35,10 +35,17 @@
#define SOCKET_ERR_NOTCONN WSAENOTCONN
#define SOCKET_ERR_NOTSOCK WSAENOTSOCK
typedef unsigned __int16 u_int16_t;
typedef unsigned __int32 u_int32_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
#ifdef __GNUC__ /* mingw provides stdint.h */
#include <stdint.h>
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
#else
typedef unsigned __int16 u_int16_t;
typedef unsigned __int32 u_int32_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
#endif
typedef unsigned char u_char;
#else
@@ -87,10 +94,5 @@ bool socket_resolve(const char *str, const char *port, int addrFamily, int sockT
*/
bool socket_set_port(unsigned port, int addrFamily, struct sockaddr *addr, int addrLen);
/**
* Internal function (common for all OSs).
*/
bool internal_socket_resolve(const char *str, const char *port, int addrFamily, int sockType, int protocol, struct sockaddr *addr, int addrLen);
#endif