]> Savannah Git Hosting - gnulib.git/commitdiff
servent tests: Fix failure on 32-bit native Windows.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 6 Jan 2025 21:56:40 +0000 (13:56 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 6 Jan 2025 21:56:40 +0000 (13:56 -0800)
* tests/test-servent.c (getservbyname, getservbyport)
[_WIN64 && !__CYGWIN__]: Disable signature check.
* doc/posix-functions/getservbyname.texi: Document the incompatible
__stdcall function signature.
* doc/posix-functions/getservbyport.texi: Likewise.

ChangeLog
doc/posix-functions/getservbyname.texi
doc/posix-functions/getservbyport.texi
tests/test-servent.c

index d9819dbc50303ccc3b78b4bde6091f574dbd15bf..601407cce3e744b5ea853feb53fdfa700a2a077e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-01-06  Collin Funk  <collin.funk1@gmail.com>
+
+       servent tests: Fix failure on 32-bit native Windows.
+       * tests/test-servent.c (getservbyname, getservbyport)
+       [_WIN64 && !__CYGWIN__]: Disable signature check.
+       * doc/posix-functions/getservbyname.texi: Document the incompatible
+       __stdcall function signature.
+       * doc/posix-functions/getservbyport.texi: Likewise.
+
 2025-01-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        parse-datetime-tests: port to Gnulib mktime
index f52be6dab85f466606c979eddddc76716f6f3385..93eddab92e84873408017af9781050a5ba8c0858 100644 (file)
@@ -17,4 +17,7 @@ mingw, MSVC 14.
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+On Windows, in 32-bit mode, this function is defined with a calling
+convention that is different from @code{cdecl}.
 @end itemize
index 03c04e6769beb79ced3b412f8a4bafc71a4ce573..01665136c4218cca92f77af6373da826a86c919f 100644 (file)
@@ -17,4 +17,7 @@ mingw, MSVC 14.
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+On Windows, in 32-bit mode, this function is defined with a calling
+convention that is different from @code{cdecl}.
 @end itemize
index fb93e1ae832b2985c8ed9c83dbec362836a92e15..0e774bdfcc473423742afb753505bd40998d4fd7 100644 (file)
 #include <netdb.h>
 
 #include "signature.h"
+
+#if defined _WIN64 && !defined __CYGWIN__
+/* On 32-bit native Windows, these two functions may have the __stdcall calling
+   convention.  But the SIGNATURE_CHECK works only for functions with __cdecl
+   calling convention.  */
 SIGNATURE_CHECK (getservbyname, struct servent *,
                  (char const *, char const *));
 SIGNATURE_CHECK (getservbyport, struct servent *, (int, char const *));
+#endif
 
 #include <stdio.h>
 #include <arpa/inet.h>