+2025-01-08 Bruno Haible <bruno@clisp.org>
+
+ sys_select-h: Update for POSIX:2024.
+ * lib/sys_select.in.h (rpl_fd_isset): Change type of second parameter to
+ 'const fd_set *'.
+ * tests/test-sys_select-h.c: Check for some more types and for
+ FD_SETSIZE.
+ (FD_ISSET): Expect type of second parameter to be 'const fd_set *'.
+
2025-01-08 Bruno Haible <bruno@clisp.org>
doc: Document the previous change.
/* Re-define FD_ISSET to avoid a WSA call while we are not using
network sockets. */
static int
-rpl_fd_isset (SOCKET fd, fd_set * set)
+rpl_fd_isset (SOCKET fd, const fd_set * set)
{
u_int i;
if (set == NULL)
#include <config.h>
+/* Specification. */
#include <sys/select.h>
/* Check that the 'struct timeval' type is defined. */
/* Check that sigset_t is defined. */
sigset_t t2;
+/* Check that time_t, suseconds_t are defined. */
+time_t t3;
+suseconds_t t4;
+
+/* Check that the 'struct timespec' type is defined. */
+struct timespec t5;
+
+/* Check that the 'fd_set' type is defined. */
+fd_set t6;
+
+/* Check that FD_SETSIZE is defined. */
+#if !FD_SETSIZE
+# error "FD_SETSIZE not positive"
+#endif
+
#include "signature.h"
/* The following may be macros without underlying functions, so only
SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
#endif
#ifndef FD_ISSET
-SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
+SIGNATURE_CHECK (FD_ISSET, void, (int, const fd_set *));
#endif
#ifndef FD_SET
SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));