diff options
author | Diego Nehab <diego@impa.br> | 2013-05-27 21:17:00 +0800 |
---|---|---|
committer | Diego Nehab <diego@impa.br> | 2013-05-27 21:17:00 +0800 |
commit | 3d61b0fe36708bce78bd087c7f7247e93e07a667 (patch) | |
tree | 51727c3f53b3e550467ee60eca54a2a202a828f3 /src/inet.h | |
parent | afe04943184c95adfbb2d05b8b7f0f4b3c36c3b5 (diff) | |
parent | 834a3cf520637df0af9967e1f8ad9e40837771cb (diff) | |
download | luasocket-3d61b0fe36708bce78bd087c7f7247e93e07a667.tar.gz luasocket-3d61b0fe36708bce78bd087c7f7247e93e07a667.tar.bz2 luasocket-3d61b0fe36708bce78bd087c7f7247e93e07a667.zip |
Merge branch 'pkulchenko' into unstable
Diffstat (limited to 'src/inet.h')
-rw-r--r-- | src/inet.h | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -19,13 +19,13 @@ | |||
19 | #include "timeout.h" | 19 | #include "timeout.h" |
20 | 20 | ||
21 | #ifdef _WIN32 | 21 | #ifdef _WIN32 |
22 | #define INET_ATON | 22 | #define LUASOCKET_INET_ATON |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | int inet_open(lua_State *L); | 25 | int inet_open(lua_State *L); |
26 | 26 | ||
27 | const char *inet_trycreate(p_socket ps, int family, int type); | 27 | const char *inet_trycreate(p_socket ps, int family, int type); |
28 | const char *inet_tryconnect(p_socket ps, const char *address, | 28 | const char *inet_tryconnect(p_socket ps, int *family, const char *address, |
29 | const char *serv, p_timeout tm, struct addrinfo *connecthints); | 29 | const char *serv, p_timeout tm, struct addrinfo *connecthints); |
30 | const char *inet_trybind(p_socket ps, const char *address, const char *serv, | 30 | const char *inet_trybind(p_socket ps, const char *address, const char *serv, |
31 | struct addrinfo *bindhints); | 31 | struct addrinfo *bindhints); |
@@ -38,8 +38,13 @@ int inet_meth_getsockname(lua_State *L, p_socket ps, int family); | |||
38 | int inet_optfamily(lua_State* L, int narg, const char* def); | 38 | int inet_optfamily(lua_State* L, int narg, const char* def); |
39 | int inet_optsocktype(lua_State* L, int narg, const char* def); | 39 | int inet_optsocktype(lua_State* L, int narg, const char* def); |
40 | 40 | ||
41 | #ifdef INET_ATON | 41 | #ifdef LUASOCKET_INET_ATON |
42 | int inet_aton(const char *cp, struct in_addr *inp); | 42 | int inet_aton(const char *cp, struct in_addr *inp); |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #ifdef LUASOCKET_INET_PTON | ||
46 | const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); | ||
47 | int inet_pton(int af, const char *src, void *dst); | ||
48 | #endif | ||
49 | |||
45 | #endif /* INET_H */ | 50 | #endif /* INET_H */ |