On AIX there is the following warning in a testdir of all modules:

    test-pselect.c:23:18: warning: initialization of 'int (*)(int,  fd_set * 
restrict,  fd_set * restrict,  fd_set * restrict,  const struct timespec 
    * restrict,  const sigset_t * restrict)' from incompatible pointer type 
'int (*)(int,  void * restrict,  void * restrict,  void * restrict,  const
     struct timespec * restrict,  const sigset_t * restrict)' 
[-Wincompatible-pointer-types]
       23 | SIGNATURE_CHECK (pselect, int,
          |                  ^~~~~~~

It was documented in 2021 that this occurs when _ALL_SOURCE is defined
and I confirmed this was still the case in sys/time.h on
AIX 7.3 (cfarm119).

In that testdir _ALL_SOURCE was defined from extensions.m4. Since any
testdir with pselect will have _ALL_SOURCE defined I have disabled the
signature check:

    $ gnulib-tool --extract-recursive-dependencies pselect | grep extension
    extensions
    extensions-aix

Collin

>From 8ec056e11a5e0f4bb1aaffb623ecb5b7aebac757 Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Fri, 25 Apr 2025 18:02:51 -0700
Subject: [PATCH] pselect: Disable signature check on AIX.

* tests/test-pselect.c [_AIX]: Skip pselect signature check.
---
 ChangeLog            | 5 +++++
 tests/test-pselect.c | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 37bfcc814a..e8821c9a3d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2025-04-25  Collin Funk  <collin.fu...@gmail.com>
+
+	pselect: Disable signature check on AIX.
+	* tests/test-pselect.c [_AIX]: Skip pselect signature check.
+
 2025-04-25  Paul Eggert  <egg...@cs.ucla.edu>
 
 	stddef-h: port better to future GCC 13.4, 14.3
diff --git a/tests/test-pselect.c b/tests/test-pselect.c
index 46c6a1316b..eef7a0f5a2 100644
--- a/tests/test-pselect.c
+++ b/tests/test-pselect.c
@@ -20,9 +20,11 @@
 
 #include "signature.h"
 
+#if !defined _AIX
 SIGNATURE_CHECK (pselect, int,
                  (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
                   struct timespec const *restrict, const sigset_t *restrict));
+#endif
 
 #define TEST_PORT 12347
 #include "test-select.h"
-- 
2.49.0

Reply via email to