]> Savannah Git Hosting - gnulib.git/commitdiff
getaddrinfo tests: Avoid compilation error on MSVC.
authorBruno Haible <bruno@clisp.org>
Sun, 18 Dec 2016 00:49:50 +0000 (01:49 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 18 Dec 2016 00:50:19 +0000 (01:50 +0100)
* tests/test-getaddrinfo.c: Don't check the prototypes of freeaddrinfo,
getaddrinfo on native Windows.

ChangeLog
tests/test-getaddrinfo.c

index 1ecdb7ff51eb488031c82ccd2f1f6a38c9e9a82b..fdf61ab0ffbdc355e759bfd8f6ec6687006db6ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
@@ -84860,7 +84866,7 @@ o       Test only that noncanonical values do not cause crashes, not that
 
 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.
index 0251632803312b3940e48a78ed62ba0516418b5e..f7d4caabfab4119cc904ea6f4d85baf69b3dbf30 100644 (file)
 #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>