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

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

index 549d5b34d8728704198e770f296d787e1da9e02e..534102b8f3a0eb13fd64a2c56cb0c2658e27c82e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module sys_resource to sys_resource-h.
+       * modules/sys_resource-h: Renamed from modules/sys_resource.
+       * modules/sys_resource-h-tests: Renamed from modules/sys_resource-tests.
+       * modules/sys_resource-h-c++-tests: Renamed from
+       modules/sys_resource-c++-tests.
+       * tests/test-sys_resource-h.c: Renamed from tests/test-sys_resource.c.
+       * tests/test-sys_resource-h-c++.cc: Renamed from
+       tests/test-sys_resource-c++.cc.
+       * doc/posix-headers/sys_resource.texi: Update.
+       * modules/* (Depends-on): Update.
+       * modules/sys_resource: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module sys_random to sys_random-h.
index 44ec2794b3c9172af2dbb9097814f1c51017c603..ac4b90ae1713487423c7621b8a90127539585490 100644 (file)
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_resource.h.html}
 
-Gnulib module: sys_resource
-@mindex sys_resource
+Gnulib module: sys_resource-h
+@mindex sys_resource-h
 
 Portability problems fixed by Gnulib:
 @itemize
index cc36f8d93481dee360bfe4656cb06b93b20c3002..e50a378d2a37c10034f23bcaff5ca9f4bf7352f8 100644 (file)
@@ -6,7 +6,7 @@ lib/getrusage.c
 m4/getrusage.m4
 
 Depends-on:
-sys_resource
+sys_resource-h
 stdint-h        [test $HAVE_GETRUSAGE = 0]
 
 configure.ac:
index 56743bba974054bfa2d169aa2984ed49c16863d0..a125194bcfbc94c6ec6bb3d982519f2b7618fd9e 100644 (file)
@@ -35,7 +35,7 @@ strings-h
 sys_file-h
 sys_ioctl-h
 sys_random-h
-sys_resource
+sys_resource-h
 sys_select
 sys_socket
 sys_stat
index 3cdac75a18326a8832f61e0e273d602ac2b3d41c..1735096ecb8349a2705059b42065881ce1e7853e 100644 (file)
@@ -1,46 +1,20 @@
 Description:
 A POSIX-like <sys/resource.h>.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_resource-h' instead.
+
 Files:
-lib/sys_resource.in.h
-m4/sys_resource_h.m4
 
 Depends-on:
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-sys_time
+sys_resource-h
 
 configure.ac:
-gl_SYS_RESOURCE_H
-gl_SYS_RESOURCE_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/resource.h
-
-# We need the following in order to create <sys/resource.h> when the system
-# doesn't have one.
-sys/resource.h: sys_resource.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_RESOURCE_H''@|$(NEXT_SYS_RESOURCE_H)|g' \
-             -e 's|@''HAVE_SYS_RESOURCE_H''@|$(HAVE_SYS_RESOURCE_H)|g' \
-             -e 's/@''GNULIB_GETRUSAGE''@/$(GNULIB_GETRUSAGE)/g' \
-             -e 's/@''HAVE_GETRUSAGE''@/$(HAVE_GETRUSAGE)/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_resource.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += sys/resource.h sys/resource.h-t
-MOSTLYCLEANDIRS += sys
 
 Include:
 <sys/resource.h>
@@ -49,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-all
diff --git a/modules/sys_resource-c++-tests b/modules/sys_resource-c++-tests
deleted file mode 100644 (file)
index 89c9893..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-Files:
-tests/test-sys_resource-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_resource-c++
-check_PROGRAMS += test-sys_resource-c++
-test_sys_resource_c___SOURCES = test-sys_resource-c++.cc
-endif
diff --git a/modules/sys_resource-h b/modules/sys_resource-h
new file mode 100644 (file)
index 0000000..3cdac75
--- /dev/null
@@ -0,0 +1,52 @@
+Description:
+A POSIX-like <sys/resource.h>.
+
+Files:
+lib/sys_resource.in.h
+m4/sys_resource_h.m4
+
+Depends-on:
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+sys_time
+
+configure.ac:
+gl_SYS_RESOURCE_H
+gl_SYS_RESOURCE_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/resource.h
+
+# We need the following in order to create <sys/resource.h> when the system
+# doesn't have one.
+sys/resource.h: sys_resource.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_RESOURCE_H''@|$(NEXT_SYS_RESOURCE_H)|g' \
+             -e 's|@''HAVE_SYS_RESOURCE_H''@|$(HAVE_SYS_RESOURCE_H)|g' \
+             -e 's/@''GNULIB_GETRUSAGE''@/$(GNULIB_GETRUSAGE)/g' \
+             -e 's/@''HAVE_GETRUSAGE''@/$(HAVE_GETRUSAGE)/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_resource.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sys/resource.h sys/resource.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/resource.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/sys_resource-h-c++-tests b/modules/sys_resource-h-c++-tests
new file mode 100644 (file)
index 0000000..22e9c07
--- /dev/null
@@ -0,0 +1,18 @@
+Files:
+tests/test-sys_resource-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_resource-h-c++
+check_PROGRAMS += test-sys_resource-h-c++
+test_sys_resource_h_c___SOURCES = test-sys_resource-h-c++.cc
+endif
diff --git a/modules/sys_resource-h-tests b/modules/sys_resource-h-tests
new file mode 100644 (file)
index 0000000..96acbe5
--- /dev/null
@@ -0,0 +1,11 @@
+Files:
+tests/test-sys_resource-h.c
+
+Depends-on:
+sys_resource-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_resource-h
+check_PROGRAMS += test-sys_resource-h
diff --git a/modules/sys_resource-tests b/modules/sys_resource-tests
deleted file mode 100644 (file)
index 9c40ba0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Files:
-tests/test-sys_resource.c
-
-Depends-on:
-sys_resource-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-sys_resource
-check_PROGRAMS += test-sys_resource
diff --git a/tests/test-sys_resource-c++.cc b/tests/test-sys_resource-c++.cc
deleted file mode 100644 (file)
index c1c8cc4..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Test of <sys/resource.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>, 2017.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <sys/resource.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_GETRUSAGE
-SIGNATURE_CHECK (GNULIB_NAMESPACE::getrusage, int, (int, struct rusage *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-sys_resource-h-c++.cc b/tests/test-sys_resource-h-c++.cc
new file mode 100644 (file)
index 0000000..c1c8cc4
--- /dev/null
@@ -0,0 +1,35 @@
+/* Test of <sys/resource.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>, 2017.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <sys/resource.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_GETRUSAGE
+SIGNATURE_CHECK (GNULIB_NAMESPACE::getrusage, int, (int, struct rusage *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-sys_resource-h.c b/tests/test-sys_resource-h.c
new file mode 100644 (file)
index 0000000..0d7a0f5
--- /dev/null
@@ -0,0 +1,72 @@
+/* Test of <sys/resource.h> substitute.
+   Copyright (C) 2012-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/resource.h>
+
+/* Check that necessary types are defined.  */
+#ifdef TODO /* Not implemented in gnulib yet */
+rlim_t t1;
+struct rlimit t2;
+#endif
+struct rusage t3;
+#ifdef TODO
+struct timeval t4;
+id_t t5;
+time_t t10;
+suseconds_t t11;
+fd_set t12;
+#endif
+
+/* Check that the necessary constants are defined.  */
+#ifdef TODO /* Not implemented in gnulib yet */
+int prios[] =
+  {
+    PRIO_PROCESS,
+    PRIO_PGRP,
+    PRIO_USER
+  };
+int rlims[] =
+  {
+    RLIM_INFINITY,
+    RLIM_SAVED_MAX,
+    RLIM_SAVED_CUR
+  };
+#endif
+int rusages[] =
+  {
+    RUSAGE_SELF,
+    RUSAGE_CHILDREN
+  };
+#ifdef TODO
+int rlimits[] =
+  {
+    RLIMIT_CORE,
+    RLIMIT_CPU,
+    RLIMIT_DATA,
+    RLIMIT_FSIZE,
+    RLIMIT_NOFILE,
+    RLIMIT_STACK,
+    RLIMIT_AS
+  };
+#endif
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-sys_resource.c b/tests/test-sys_resource.c
deleted file mode 100644 (file)
index 0d7a0f5..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Test of <sys/resource.h> substitute.
-   Copyright (C) 2012-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/resource.h>
-
-/* Check that necessary types are defined.  */
-#ifdef TODO /* Not implemented in gnulib yet */
-rlim_t t1;
-struct rlimit t2;
-#endif
-struct rusage t3;
-#ifdef TODO
-struct timeval t4;
-id_t t5;
-time_t t10;
-suseconds_t t11;
-fd_set t12;
-#endif
-
-/* Check that the necessary constants are defined.  */
-#ifdef TODO /* Not implemented in gnulib yet */
-int prios[] =
-  {
-    PRIO_PROCESS,
-    PRIO_PGRP,
-    PRIO_USER
-  };
-int rlims[] =
-  {
-    RLIM_INFINITY,
-    RLIM_SAVED_MAX,
-    RLIM_SAVED_CUR
-  };
-#endif
-int rusages[] =
-  {
-    RUSAGE_SELF,
-    RUSAGE_CHILDREN
-  };
-#ifdef TODO
-int rlimits[] =
-  {
-    RLIMIT_CORE,
-    RLIMIT_CPU,
-    RLIMIT_DATA,
-    RLIMIT_FSIZE,
-    RLIMIT_NOFILE,
-    RLIMIT_STACK,
-    RLIMIT_AS
-  };
-#endif
-
-int
-main (void)
-{
-  return 0;
-}