]> 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)
committerBruno Haible <bruno@clisp.org>
Sat, 18 Jan 2025 08:06:15 +0000 (09:06 +0100)
* tests/test-servent.c (getservbyname, getservbyport)
[_WIN32 && !_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 78fb3c06b848e8630012d7fdfe3dba2e5d41657a..08b0b6f8f2f3615ba92cf155573e77a0d1945d3f 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)
+       [_WIN32 && !_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  Bruno Haible  <bruno@clisp.org>
 
        sigsegv tests: Work around a longjmp bug on GNU/Hurd.
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..3715944ca2cc645da5bb9b9cf38d8f50af130874 100644 (file)
 #include <netdb.h>
 
 #include "signature.h"
+
+#if !(defined _WIN32 && !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>