]> Savannah Git Hosting - gnulib.git/commitdiff
Rename module sys_random to sys_random-h.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:39:52 +0000 (23:39 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Dec 2024 22:39:52 +0000 (23:39 +0100)
* modules/sys_random-h: Renamed from modules/sys_random.
* modules/sys_random-h-tests: Renamed from modules/sys_random-tests.
* modules/sys_random-h-c++-tests: Renamed from
modules/sys_random-c++-tests.
* tests/test-sys_random-h.c: Renamed from tests/test-sys_random.c.
* tests/test-sys_random-h-c++.cc: Renamed from
tests/test-sys_random-c++.cc.
* doc/glibc-headers/sys_random.texi: Update.
* modules/* (Depends-on): Update.
* modules/sys_random: New file.

14 files changed:
ChangeLog
doc/glibc-headers/sys_random.texi
modules/getrandom
modules/posixcheck
modules/sys_random
modules/sys_random-c++-tests [deleted file]
modules/sys_random-h [new file with mode: 0644]
modules/sys_random-h-c++-tests [new file with mode: 0644]
modules/sys_random-h-tests [new file with mode: 0644]
modules/sys_random-tests [deleted file]
tests/test-sys_random-c++.cc [deleted file]
tests/test-sys_random-h-c++.cc [new file with mode: 0644]
tests/test-sys_random-h.c [new file with mode: 0644]
tests/test-sys_random.c [deleted file]

index 81bc906b37b34f09dab5c93167ecf8b84f84f2ee..549d5b34d8728704198e770f296d787e1da9e02e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module sys_random to sys_random-h.
+       * modules/sys_random-h: Renamed from modules/sys_random.
+       * modules/sys_random-h-tests: Renamed from modules/sys_random-tests.
+       * modules/sys_random-h-c++-tests: Renamed from
+       modules/sys_random-c++-tests.
+       * tests/test-sys_random-h.c: Renamed from tests/test-sys_random.c.
+       * tests/test-sys_random-h-c++.cc: Renamed from
+       tests/test-sys_random-c++.cc.
+       * doc/glibc-headers/sys_random.texi: Update.
+       * modules/* (Depends-on): Update.
+       * modules/sys_random: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module sys_msg to sys_msg-h.
index 4a5184026598d6d0cf9ba2ddf4b33c00a741ad4c..05437a81c86857cc9f9ef2d717c7c344c5099664 100644 (file)
@@ -16,8 +16,8 @@ Documentation:
 @uref{https://www.kernel.org/doc/man-pages/online/pages/man2/getrandom.2.html,,man getrandom}.
 @end itemize
 
-Gnulib module: sys_random
-@mindex sys_random
+Gnulib module: sys_random-h
+@mindex sys_random-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 845e352ae2705065f8a6ef2770d041d7702aa579..7a75292675f3def91ea67e75f1e4d57c9c1942e1 100644 (file)
@@ -6,7 +6,7 @@ lib/getrandom.c
 m4/getrandom.m4
 
 Depends-on:
-sys_random
+sys_random-h
 fcntl-h             [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
 minmax              [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
 stdbool-h           [test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1]
index a73443bbac97c1d0a47df71c8f1b498a4c12f671..56743bba974054bfa2d169aa2984ed49c16863d0 100644 (file)
@@ -34,7 +34,7 @@ string-h
 strings-h
 sys_file-h
 sys_ioctl-h
-sys_random
+sys_random-h
 sys_resource
 sys_select
 sys_socket
index 1f86b97b9bf7d34552a5bcaba39a0a699e3dbcee..cd4e4f627b55e4c80204ed75ea2b57717b626292 100644 (file)
@@ -1,46 +1,20 @@
 Description:
 A GNU-like <sys/random.h>.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_random-h' instead.
+
 Files:
-lib/sys_random.in.h
-m4/sys_random_h.m4
 
 Depends-on:
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
+sys_random-h
 
 configure.ac:
-gl_SYS_RANDOM_H
-gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/random.h
-
-# We need the following in order to create <sys/random.h> when the system
-# doesn't have one.
-sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_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_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \
-             -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \
-             -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \
-             -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \
-             -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \
-             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
-             $(srcdir)/sys_random.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += sys/random.h sys/random.h-t
-MOSTLYCLEANDIRS += sys
 
 Include:
 <sys/random.h>
@@ -49,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-all
diff --git a/modules/sys_random-c++-tests b/modules/sys_random-c++-tests
deleted file mode 100644 (file)
index 3c006ed..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Files:
-tests/test-sys_random-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_random-c++
-check_PROGRAMS += test-sys_random-c++
-test_sys_random_c___SOURCES = test-sys_random-c++.cc
-test_sys_random_c___LDADD = $(LDADD) $(GETRANDOM_LIB)
-endif
diff --git a/modules/sys_random-h b/modules/sys_random-h
new file mode 100644 (file)
index 0000000..1f86b97
--- /dev/null
@@ -0,0 +1,52 @@
+Description:
+A GNU-like <sys/random.h>.
+
+Files:
+lib/sys_random.in.h
+m4/sys_random_h.m4
+
+Depends-on:
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+
+configure.ac:
+gl_SYS_RANDOM_H
+gl_SYS_RANDOM_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/random.h
+
+# We need the following in order to create <sys/random.h> when the system
+# doesn't have one.
+sys/random.h: sys_random.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_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_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \
+             -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \
+             -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \
+             -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \
+             -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \
+             -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+             -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+             -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+             $(srcdir)/sys_random.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sys/random.h sys/random.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/random.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/sys_random-h-c++-tests b/modules/sys_random-h-c++-tests
new file mode 100644 (file)
index 0000000..3b0e61b
--- /dev/null
@@ -0,0 +1,19 @@
+Files:
+tests/test-sys_random-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_random-h-c++
+check_PROGRAMS += test-sys_random-h-c++
+test_sys_random_h_c___SOURCES = test-sys_random-h-c++.cc
+test_sys_random_h_c___LDADD = $(LDADD) $(GETRANDOM_LIB)
+endif
diff --git a/modules/sys_random-h-tests b/modules/sys_random-h-tests
new file mode 100644 (file)
index 0000000..b5f3803
--- /dev/null
@@ -0,0 +1,11 @@
+Files:
+tests/test-sys_random-h.c
+
+Depends-on:
+sys_random-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_random-h
+check_PROGRAMS += test-sys_random-h
diff --git a/modules/sys_random-tests b/modules/sys_random-tests
deleted file mode 100644 (file)
index 2208c5a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Files:
-tests/test-sys_random.c
-
-Depends-on:
-sys_random-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-sys_random
-check_PROGRAMS += test-sys_random
diff --git a/tests/test-sys_random-c++.cc b/tests/test-sys_random-c++.cc
deleted file mode 100644 (file)
index 1146f31..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Test of <sys/random.h> substitute in C++ mode.
-   Copyright (C) 2020-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>, 2020.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <sys/random.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_GETRANDOM
-SIGNATURE_CHECK (GNULIB_NAMESPACE::getrandom, ssize_t, (void *, size_t, unsigned int));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-sys_random-h-c++.cc b/tests/test-sys_random-h-c++.cc
new file mode 100644 (file)
index 0000000..1146f31
--- /dev/null
@@ -0,0 +1,35 @@
+/* Test of <sys/random.h> substitute in C++ mode.
+   Copyright (C) 2020-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>, 2020.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/random.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_GETRANDOM
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getrandom, ssize_t, (void *, size_t, unsigned int));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-sys_random-h.c b/tests/test-sys_random-h.c
new file mode 100644 (file)
index 0000000..16cacd3
--- /dev/null
@@ -0,0 +1,32 @@
+/* Test of <sys/random.h> substitute.
+   Copyright (C) 2020-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/>.  */
+
+#include <config.h>
+
+#include <sys/random.h>
+
+/* Check that the necessary constants are defined.  */
+int flags[] =
+  {
+    GRND_RANDOM,
+    GRND_NONBLOCK
+  };
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-sys_random.c b/tests/test-sys_random.c
deleted file mode 100644 (file)
index 16cacd3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Test of <sys/random.h> substitute.
-   Copyright (C) 2020-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/>.  */
-
-#include <config.h>
-
-#include <sys/random.h>
-
-/* Check that the necessary constants are defined.  */
-int flags[] =
-  {
-    GRND_RANDOM,
-    GRND_NONBLOCK
-  };
-
-int
-main (void)
-{
-  return 0;
-}