Rename module sys_select to sys_select-h.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:39:55 +0000 (23:39 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:39:55 +0000 (23:39 +0100)
* modules/sys_select-h: Renamed from modules/sys_select.
* modules/sys_select-h-tests: Renamed from modules/sys_select-tests.
* modules/sys_select-h-c++-tests: Renamed from
modules/sys_select-c++-tests.
* tests/test-sys_select-h.c: Renamed from tests/test-sys_select.c.
* tests/test-sys_select-h-c++.cc: Renamed from
tests/test-sys_select-c++.cc.
* doc/posix-headers/sys_select.texi: Update.
* modules/* (Depends-on): Update.
* modules/sys_select: New file.

19 files changed:
ChangeLog
doc/posix-headers/sys_select.texi
modules/nanosleep
modules/pipe-filter-gi
modules/pipe-filter-ii
modules/poll
modules/posixcheck
modules/pselect
modules/select
modules/sys_select
modules/sys_select-c++-tests [deleted file]
modules/sys_select-h [new file with mode: 0644]
modules/sys_select-h-c++-tests [new file with mode: 0644]
modules/sys_select-h-tests [new file with mode: 0644]
modules/sys_select-tests [deleted file]
tests/test-sys_select-c++.cc [deleted file]
tests/test-sys_select-h-c++.cc [new file with mode: 0644]
tests/test-sys_select-h.c [new file with mode: 0644]
tests/test-sys_select.c [deleted file]

index 534102b8f3a0eb13fd64a2c56cb0c2658e27c82e..389564a428e9adbfab313594828e54f4abc80b28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module sys_select to sys_select-h.
+       * modules/sys_select-h: Renamed from modules/sys_select.
+       * modules/sys_select-h-tests: Renamed from modules/sys_select-tests.
+       * modules/sys_select-h-c++-tests: Renamed from
+       modules/sys_select-c++-tests.
+       * tests/test-sys_select-h.c: Renamed from tests/test-sys_select.c.
+       * tests/test-sys_select-h-c++.cc: Renamed from
+       tests/test-sys_select-c++.cc.
+       * doc/posix-headers/sys_select.texi: Update.
+       * modules/* (Depends-on): Update.
+       * modules/sys_select: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module sys_resource to sys_resource-h.
index 32e55b5aad13c90cee28e312de2f231bc54d1986..a0579b1f4fb8499fba2ae3af0cbb336f452845d5 100644 (file)
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_select.h.html}
 
-Gnulib module: sys_select
-@mindex sys_select
+Gnulib module: sys_select-h
+@mindex sys_select-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 034704d60b81aa8bf979e29390a511fd87b05782..10176a1ccaa9dea04e23459f898b953c70f811e0 100644 (file)
@@ -13,7 +13,7 @@ assert-h        [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 intprops        [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 pselect         [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 stdbool-h       [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
-sys_select      [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
+sys_select-h    [test $HAVE_NANOSLEEP = 0 || test $REPLACE_NANOSLEEP = 1]
 
 configure.ac:
 gl_FUNC_NANOSLEEP
index d32fecb8660df2108b32d4f66de1f3e8bc99ae02..6841bdd7e083a167b5b7ecb39e6b123b8547139d 100644 (file)
@@ -19,7 +19,7 @@ gnulib-i18n
 stdbool-h
 stdint-h
 stdlib-h
-sys_select
+sys_select-h
 unistd
 xalloc
 
index 4baae3067f9aafe8dc2d2e270ca9a48f3f53bf9f..c01d406f8c1201233ea3f386ed22f7022f1be67e 100644 (file)
@@ -18,7 +18,7 @@ gnulib-i18n
 stdbool-h
 stdint-h
 stdlib-h
-sys_select
+sys_select-h
 unistd
 
 configure.ac:
index 793f34506f9460309e87a6e735980cd051b8532e..ce77e998c91e38a9a26568652c01be4ef78e1cb0 100644 (file)
@@ -11,7 +11,7 @@ alloca          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 assure          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 select          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sockets         [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
-sys_select      [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
+sys_select-h    [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_socket      [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_time        [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 errno-h         [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
index a125194bcfbc94c6ec6bb3d982519f2b7618fd9e..04fc89cc16fca819e69fa5ad37d979e28751819e 100644 (file)
@@ -36,7 +36,7 @@ sys_file-h
 sys_ioctl-h
 sys_random-h
 sys_resource-h
-sys_select
+sys_select-h
 sys_socket
 sys_stat
 sys_time
index 36037a59b3061a2b5ee2fb88a2d1270077760a42..d2edfc780244d178d3ecc132f869391d5d073b9f 100644 (file)
@@ -6,7 +6,7 @@ lib/pselect.c
 m4/pselect.m4
 
 Depends-on:
-sys_select
+sys_select-h
 pthread_sigmask [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
 select          [test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1]
 dup2            [test $REPLACE_PSELECT = 1]
index eb1d13bbb5d405b3c0cef94c1ee07226d67a0406..7082f72eac934d7563538af3d4b5d3687e9cba08 100644 (file)
@@ -6,7 +6,7 @@ lib/select.c
 m4/select.m4
 
 Depends-on:
-sys_select
+sys_select-h
 alloca          [test $REPLACE_SELECT = 1]
 dup2            [test $REPLACE_SELECT = 1]
 sockets         [test $REPLACE_SELECT = 1]
index 5c8934ec290952a79d29aaab44104c86070896fe..fa7a18f06e519618ba512aa88609b7781725025f 100644 (file)
@@ -1,50 +1,20 @@
 Description:
 A <sys/select.h> for systems lacking it.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_select-h' instead.
+
 Files:
-lib/sys_select.in.h
-m4/sys_select_h.m4
-m4/sys_socket_h.m4
 
 Depends-on:
-gen-header
-include_next
-signal-h
-snippet/c++defs
-snippet/warn-on-use
-sys_time
+sys_select-h
 
 configure.ac:
-gl_SYS_SELECT_H
-gl_SYS_SELECT_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/select.h
-
-# We need the following in order to create <sys/select.h> when the system
-# doesn't have one that works with the given compiler.
-sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
-       $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
-       $(AM_V_at)$(SED_HEADER_STDOUT) \
-             -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
-             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-             -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
-             -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
-             -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
-             -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
-             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-             -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
-             -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
-             -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
-             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             $(srcdir)/sys_select.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += sys/select.h sys/select.h-t
-MOSTLYCLEANDIRS += sys
 
 Include:
 <sys/select.h>
@@ -53,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-Simon Josefsson
diff --git a/modules/sys_select-c++-tests b/modules/sys_select-c++-tests
deleted file mode 100644 (file)
index fc93cbf..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Files:
-tests/test-sys_select-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_select-c++
-check_PROGRAMS += test-sys_select-c++
-test_sys_select_c___SOURCES = test-sys_select-c++.cc
-test_sys_select_c___LDADD = $(LDADD) $(LIBINTL) $(SELECT_LIB) $(NANOSLEEP_LIB)
-endif
diff --git a/modules/sys_select-h b/modules/sys_select-h
new file mode 100644 (file)
index 0000000..5c8934e
--- /dev/null
@@ -0,0 +1,56 @@
+Description:
+A <sys/select.h> for systems lacking it.
+
+Files:
+lib/sys_select.in.h
+m4/sys_select_h.m4
+m4/sys_socket_h.m4
+
+Depends-on:
+gen-header
+include_next
+signal-h
+snippet/c++defs
+snippet/warn-on-use
+sys_time
+
+configure.ac:
+gl_SYS_SELECT_H
+gl_SYS_SELECT_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/select.h
+
+# We need the following in order to create <sys/select.h> when the system
+# doesn't have one that works with the given compiler.
+sys/select.h: sys_select.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+       $(AM_V_GEN)$(MKDIR_P) '%reldir%/sys'
+       $(AM_V_at)$(SED_HEADER_STDOUT) \
+             -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+             -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+             -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
+             -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
+             -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \
+             -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \
+             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+             -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \
+             -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \
+             -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             $(srcdir)/sys_select.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sys/select.h sys/select.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/select.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/sys_select-h-c++-tests b/modules/sys_select-h-c++-tests
new file mode 100644 (file)
index 0000000..11885a9
--- /dev/null
@@ -0,0 +1,19 @@
+Files:
+tests/test-sys_select-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_select-h-c++
+check_PROGRAMS += test-sys_select-h-c++
+test_sys_select_h_c___SOURCES = test-sys_select-h-c++.cc
+test_sys_select_h_c___LDADD = $(LDADD) $(LIBINTL) $(SELECT_LIB) $(NANOSLEEP_LIB)
+endif
diff --git a/modules/sys_select-h-tests b/modules/sys_select-h-tests
new file mode 100644 (file)
index 0000000..0823b90
--- /dev/null
@@ -0,0 +1,12 @@
+Files:
+tests/test-sys_select-h.c
+tests/signature.h
+
+Depends-on:
+sys_select-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_select-h
+check_PROGRAMS += test-sys_select-h
diff --git a/modules/sys_select-tests b/modules/sys_select-tests
deleted file mode 100644 (file)
index a8127b2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Files:
-tests/test-sys_select.c
-tests/signature.h
-
-Depends-on:
-sys_select-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-sys_select
-check_PROGRAMS += test-sys_select
diff --git a/tests/test-sys_select-c++.cc b/tests/test-sys_select-c++.cc
deleted file mode 100644 (file)
index 130fb89..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Test of <sys/select.h> substitute in C++ mode.
-   Copyright (C) 2010-2024 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <sys/select.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_PSELECT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::pselect, int,
-                 (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
-                  struct timespec const *restrict, sigset_t const *restrict));
-#endif
-
-#if GNULIB_TEST_SELECT
-SIGNATURE_CHECK (GNULIB_NAMESPACE::select, int,
-                 (int, fd_set *, fd_set *, fd_set *, struct timeval *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-sys_select-h-c++.cc b/tests/test-sys_select-h-c++.cc
new file mode 100644 (file)
index 0000000..130fb89
--- /dev/null
@@ -0,0 +1,42 @@
+/* Test of <sys/select.h> substitute in C++ mode.
+   Copyright (C) 2010-2024 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/select.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_PSELECT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::pselect, int,
+                 (int, fd_set *restrict, fd_set *restrict, fd_set *restrict,
+                  struct timespec const *restrict, sigset_t const *restrict));
+#endif
+
+#if GNULIB_TEST_SELECT
+SIGNATURE_CHECK (GNULIB_NAMESPACE::select, int,
+                 (int, fd_set *, fd_set *, fd_set *, struct timeval *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-sys_select-h.c b/tests/test-sys_select-h.c
new file mode 100644 (file)
index 0000000..db791de
--- /dev/null
@@ -0,0 +1,59 @@
+/* Test of <sys/select.h> substitute.
+   Copyright (C) 2007-2024 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
+
+#include <config.h>
+
+#include <sys/select.h>
+
+/* Check that the 'struct timeval' type is defined.  */
+struct timeval a;
+
+/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
+   signedness issues.  */
+typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
+
+/* Check that sigset_t is defined.  */
+sigset_t t2;
+
+#include "signature.h"
+
+/* The following may be macros without underlying functions, so only
+   check signature if they are not macros.  */
+#ifndef FD_CLR
+SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
+#endif
+#ifndef FD_ISSET
+SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
+#endif
+#ifndef FD_SET
+SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
+#endif
+#ifndef FD_ZERO
+SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
+#endif
+
+int
+main (void)
+{
+  /* Check that FD_ZERO can be used.  This should not yield a warning
+     such as "warning: implicit declaration of function 'memset'".  */
+  fd_set fds;
+  FD_ZERO (&fds);
+
+  return 0;
+}
diff --git a/tests/test-sys_select.c b/tests/test-sys_select.c
deleted file mode 100644 (file)
index db791de..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Test of <sys/select.h> substitute.
-   Copyright (C) 2007-2024 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2007.  */
-
-#include <config.h>
-
-#include <sys/select.h>
-
-/* Check that the 'struct timeval' type is defined.  */
-struct timeval a;
-
-/* Check that a.tv_sec is wide enough to hold a time_t, ignoring
-   signedness issues.  */
-typedef int verify_tv_sec_type[sizeof (time_t) <= sizeof (a.tv_sec) ? 1 : -1];
-
-/* Check that sigset_t is defined.  */
-sigset_t t2;
-
-#include "signature.h"
-
-/* The following may be macros without underlying functions, so only
-   check signature if they are not macros.  */
-#ifndef FD_CLR
-SIGNATURE_CHECK (FD_CLR, void, (int, fd_set *));
-#endif
-#ifndef FD_ISSET
-SIGNATURE_CHECK (FD_ISSET, void, (int, fd_set *));
-#endif
-#ifndef FD_SET
-SIGNATURE_CHECK (FD_SET, int, (int, fd_set *));
-#endif
-#ifndef FD_ZERO
-SIGNATURE_CHECK (FD_ZERO, void, (fd_set *));
-#endif
-
-int
-main (void)
-{
-  /* Check that FD_ZERO can be used.  This should not yield a warning
-     such as "warning: implicit declaration of function 'memset'".  */
-  fd_set fds;
-  FD_ZERO (&fds);
-
-  return 0;
-}