--- mswindows.c Mon Jan 19 04:14:16 1970 +++ mswindows.c Mon Jan 19 04:14:16 1970 @@ -694,11 +694,11 @@ /* An inet_ntop implementation that uses WSAAddressToString. Prototype complies with POSIX 1003.1-2004. This is only used under IPv6 because Wget prints IPv4 addresses using inet_ntoa. */ - +//vista has this function, but it's incompatible const char * -inet_ntop (int af, const void *src, char *dst, socklen_t cnt) +inet_ntop_custom (int af, const void *src, char *dst, socklen_t cnt) { - /* struct sockaddr can't accomodate struct sockaddr_in6. */ + //struct sockaddr can't accomodate struct sockaddr_in6. union { struct sockaddr_in6 sin6; struct sockaddr_in sin; @@ -723,7 +723,8 @@ abort (); } - if (WSAAddressToString ((struct sockaddr *) &sa, srcsize, NULL, dst, &dstlen) != 0) + //changed from WSAAddressToString because wget is not handling unicode strings + if (WSAAddressToStringA ((struct sockaddr *) &sa, srcsize, NULL, dst, &dstlen) != 0) { errno = WSAGetLastError(); return NULL; --- mswindows.h Mon Jan 19 04:14:16 1970 +++ mswindows.h Mon Jan 19 04:14:16 1970 @@ -70,12 +70,23 @@ # define S_ISLNK(a) 0 #endif +#define utime _utime +#define utimbuf _utimbuf +//inet_ntop was introduced in vista, do not use it +#define inet_ntop inet_ntop_custom +//don't know why this is needed +#define getpid GetCurrentProcessId + /* We have strcasecmp and strncasecmp, just under different names. */ #ifndef HAVE_STRCASECMP # define strcasecmp stricmp +//avoid redefinition of stricmp +# define HAVE_STRCASECMP #endif #ifndef HAVE_STRNCASECMP # define strncasecmp strnicmp +//avoid redefinition of strnicmp +# define HAVE_STRNCASECMP #endif /* The same for snprintf() and vsnprintf(). */ @@ -162,8 +173,8 @@ right thing with Winsock errors. */ #ifndef INHIBIT_WRAP # define strerror windows_strerror -#endif const char *windows_strerror (int); +#endif /* Declarations of various socket errors: */