"Derek R. Price" <[EMAIL PROTECTED]> writes: > Jim Hyslop reported needing the attached patch to compile getaddrinfo.c > in MSVC6. > > 2006-07-06 Jim Hyslop <[EMAIL PROTECTED]> > > * lib/getaddrinfo.c: Changes to compile under MSVC6: changed > '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside > brackets. Other minor changes to suppress some compiler > warnings.
Installed, thanks! If there are more changes from Jim, I think he must do some paper-work for gnulib, we now have two "tiny change" from him in this file. /Simon > Cheers, > > Derek > -- > Derek R. Price > CVS Solutions Architect > Get CVS support at Ximbiot <http://ximbiot.com>! > v: +1 248.835.1260 > f: +1 248.835.1263 > <mailto:[EMAIL PROTECTED]> > --- lib/.#getaddrinfo.c.1.12 2006-07-06 22:28:14.000000000 -0400 > +++ lib/getaddrinfo.c 2006-07-06 22:33:29.000000000 -0400 > @@ -47,11 +47,11 @@ > #endif > > #ifdef WIN32_NATIVE > -typedef int WSAAPI (*getaddrinfo_func) (const char*, const char*, > +typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*, > const struct addrinfo*, > struct addrinfo**); > -typedef void WSAAPI (*freeaddrinfo_func) (struct addrinfo*); > -typedef int WSAAPI (*getnameinfo_func) (const struct sockaddr*, > +typedef void (WSAAPI *freeaddrinfo_func) (struct addrinfo*); > +typedef int (WSAAPI *getnameinfo_func) (const struct sockaddr*, > socklen_t, char*, DWORD, > char*, DWORD, int); > > @@ -74,9 +74,9 @@ > > if (h) > { > - getaddrinfo_ptr = GetProcAddress (h, "getaddrinfo"); > - freeaddrinfo_ptr = GetProcAddress (h, "freeaddrinfo"); > - getnameinfo_ptr = GetProcAddress (h, "getnameinfo"); > + getaddrinfo_ptr = (getaddrinfo_func) GetProcAddress (h, "getaddrinfo"); > + freeaddrinfo_ptr = (freeaddrinfo_func) GetProcAddress (h, > "freeaddrinfo"); > + getnameinfo_ptr = (getnameinfo_func) GetProcAddress (h, "getnameinfo"); > } > > /* If either is missing, something is odd. */ > @@ -296,7 +296,10 @@ > { > #ifdef WIN32_NATIVE > if (use_win32_p ()) > - return freeaddrinfo_ptr (ai); > + { > + freeaddrinfo_ptr (ai); > + return; > + } > #endif > > while (ai) > @@ -316,7 +319,7 @@ > char *restrict service, socklen_t servicelen, > int flags) > { > -#if WIN32_NATIVE > +#ifdef WIN32_NATIVE > if (use_win32_p ()) > return getnameinfo_ptr (sa, salen, node, nodelen, > service, servicelen, flags);