Index: trunk/src_3rd/libporty_net/Makefile =================================================================== --- trunk/src_3rd/libporty_net/Makefile (revision 31414) +++ trunk/src_3rd/libporty_net/Makefile (revision 31415) @@ -1,3 +1,5 @@ +#CFLAGS = -Wall -O3 + libportytcp4.o: libportytcp4.c libportytcp4.h libportytcp4.c libportytcp4.h: concat.sh Index: trunk/src_3rd/libporty_net/hooks_net.c =================================================================== --- trunk/src_3rd/libporty_net/hooks_net.c (revision 31414) +++ trunk/src_3rd/libporty_net/hooks_net.c (revision 31415) @@ -36,6 +36,7 @@ require("libs/socket/readwrite/presents", 1, 0); require("libs/socket/shutdown/presents", 1, 1); require("libs/socket/ntoh/presents", 1, 1); + require("libs/socket/socklen_t/*", 1, 0); require("libs/socket/gethostname/presents", 1, 1); if (require("libs/socket/getaddrinfo/presents", 1, 0)) put("local/net/use_porty_resolver", strue); Index: trunk/src_3rd/libporty_net/libportytcp4.c =================================================================== --- trunk/src_3rd/libporty_net/libportytcp4.c (revision 31414) +++ trunk/src_3rd/libporty_net/libportytcp4.c (revision 31415) @@ -445,7 +445,7 @@ { struct sockaddr_in sin; int ret; - size_t len; /* should be socklen_t but that's not supported by many systems */ + P_socklen_t len; len = sizeof(sin); ret = accept(listen_sock, (struct sockaddr *)&sin, &len); @@ -632,12 +632,12 @@ char tmp[4]; char *d; const char *s; - int c, dots; + int c; *tmp = '\0'; tmp[3] = '\0'; - for(s = name, c = 3, dots = 0, d = tmp;; s++) { + for(s = name, c = 3, d = tmp;; s++) { if (isdigit(*s)) { /* None of the tags may be longer than 3 characters */ c--; Index: trunk/src_3rd/libporty_net/libportytcp4.h =================================================================== --- trunk/src_3rd/libporty_net/libportytcp4.h (revision 31414) +++ trunk/src_3rd/libporty_net/libportytcp4.h (revision 31415) @@ -4,6 +4,12 @@ #include "phost_types.h" +#ifdef P_HAVE_SOCKLEN_T + typedef socklen_t P_socklen_t; +#else + typedef int P_socklen_t; +#endif + /* UNIX */ #if defined(UNIX) @@ -37,7 +43,6 @@ # if !(defined(__MINGW32__) || defined(__CYGWIN__)) typedef SSIZE_T ssize_t; - typedef int socklen_t; # endif # define GET_LAST_ERROR() WSAGetLastError() Index: trunk/src_3rd/libporty_net/os_includes.h.in =================================================================== --- trunk/src_3rd/libporty_net/os_includes.h.in (revision 31414) +++ trunk/src_3rd/libporty_net/os_includes.h.in (revision 31415) @@ -1,3 +1,3 @@ -###uniq \n libs/socket/poll/includes libs/socket/select/includes libs/socket/closesocket/includes libs/socket/socketpair/includes libs/socket/ioctl/includes libs/socket/ioctl/fionbio/includes libs/socket/sockaddr_in/includes libs/socket/lac/includes libs/socket/recvsend/includes libs/socket/readwrite/includes libs/socket/shutdown/includes libs/socket/SHUT/includes libs/socket/getnameinfo/includes libs/socket/gethostname/includes### +###uniq \n libs/socket/poll/includes libs/socket/select/includes libs/socket/closesocket/includes libs/socket/socketpair/includes libs/socket/ioctl/includes libs/socket/ioctl/fionbio/includes libs/socket/sockaddr_in/includes libs/socket/lac/includes libs/socket/recvsend/includes libs/socket/readwrite/includes libs/socket/shutdown/includes libs/socket/SHUT/includes libs/socket/getnameinfo/includes libs/socket/gethostname/includes libs/socket/socklent/includes### #define P_AF_LOCAL ###libs/socket/socketpair/af_local### Index: trunk/src_3rd/libporty_net/pnet_config.h.in =================================================================== --- trunk/src_3rd/libporty_net/pnet_config.h.in (revision 31414) +++ trunk/src_3rd/libporty_net/pnet_config.h.in (revision 31415) @@ -19,6 +19,15 @@ /*#define P_HAVE_SOCKETPAIR */ ###endif### +/* === socklen_t */ +###if libs/socket/socklen_t/presents### +#define P_HAVE_SOCKLEN_T +###else### +/*#define P_HAVE_SOCKLEN_T */ +###endif### + + + /* === precision time query and sleep */ ###if libs/time/usleep/presents### /* we have usleep, we won't need select() or Sleep() for subsecond sleeping */