+2016-12-17 Bruno Haible <bruno@clisp.org>
+
+ getaddrinfo tests: Avoid compilation error on MSVC.
+ * tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
+ getaddrinfo on native Windows.
+
2016-12-17 Bruno Haible <bruno@clisp.org>
getlogin, getlogin_r: Fix link errors on MSVC.
2006-11-16 Paul Eggert <eggert@cs.ucla.edu>
- * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
+ * modules/getaddrinfo (Depends-on): Remove inttostr; add snprintf.
* lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
and inttostr.h. Use snprintf rather than uinttostr, so that
LGPLed code doesn't depend on GPLed.
#include <netdb.h>
#include "signature.h"
-SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *));
SIGNATURE_CHECK (gai_strerror, char const *, (int));
+/* On native Windows, these two functions may have the __stdcall calling
+ convention. But the SIGNATURE_CHECK works only for functions with __cdecl
+ calling convention. */
+#if !((defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__)
+SIGNATURE_CHECK (freeaddrinfo, void, (struct addrinfo *));
SIGNATURE_CHECK (getaddrinfo, int, (char const *, char const *,
struct addrinfo const *,
struct addrinfo **));
+#endif
#include <arpa/inet.h>
#include <errno.h>