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

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

index b4fcea1b774acb86a2b0a8d93bd4eb7f40e95a68..e67e0c52b344f6802f86671d0106f1f2bada3b2e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module sys_un to sys_un-h.
+       * modules/sys_un-h: Renamed from modules/sys_un.
+       * modules/sys_un-h-tests: Renamed from modules/sys_un-tests.
+       * modules/sys_un-h-c++-tests: Renamed from modules/sys_un-c++-tests.
+       * tests/test-sys_un-h.c: Renamed from tests/test-sys_un.c.
+       * tests/test-sys_un-h-c++.cc: Renamed from tests/test-sys_un-c++.cc.
+       * doc/posix-headers/sys_un.texi: Update.
+       * modules/sys_un: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module sys_uio to sys_uio-h.
index e25b1edc0f2c66b8ae1772dff55b516b7db7a426..63be81d8d2bf853534b2a336447c80e594c005b2 100644 (file)
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_un.h.html}
 
-Gnulib module: sys_un
-@mindex sys_un
+Gnulib module: sys_un-h
+@mindex sys_un-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 3c1b3ba505f71d66a031faf2f3888e5d209c3f0a..dccb411966086996d3a624395b8499cecaa9e214 100644 (file)
@@ -1,45 +1,20 @@
 Description:
 A POSIX-like <sys/un.h>.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_un-h' instead.
+
 Files:
-lib/sys_un.in.h
-m4/sys_un_h.m4
 
 Depends-on:
-gen-header
-include_next
-sys_socket-h
+sys_un-h
 
 configure.ac:
-gl_SYS_UN_H
-gl_CONDITIONAL_HEADER([sys/un.h])
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += $(SYS_UN_H)
-
-# We need the following in order to create <sys/un.h> when the system
-# doesn't have one.
-if GL_GENERATE_SYS_UN_H
-sys/un.h: sys_un.in.h $(top_builddir)/config.status
-@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
-       $(gl_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_UN_H''@|$(NEXT_SYS_UN_H)|g' \
-             -e 's|@''HAVE_SYS_UN_H''@|$(HAVE_SYS_UN_H)|g' \
-             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-             -e 's|@''HAVE_AFUNIX_H''@|$(HAVE_AFUNIX_H)|g' \
-             $(srcdir)/sys_un.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-else
-sys/un.h: $(top_builddir)/config.status
-       rm -f $@
-endif
-MOSTLYCLEANFILES += sys/un.h sys/un.h-t
-MOSTLYCLEANDIRS += sys
 
 Include:
 <sys/un.h>
@@ -48,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-all
diff --git a/modules/sys_un-c++-tests b/modules/sys_un-c++-tests
deleted file mode 100644 (file)
index d5aac51..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Files:
-tests/test-sys_un-c++.cc
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_un-c++
-check_PROGRAMS += test-sys_un-c++
-test_sys_un_c___SOURCES = test-sys_un-c++.cc
-endif
diff --git a/modules/sys_un-h b/modules/sys_un-h
new file mode 100644 (file)
index 0000000..3c1b3ba
--- /dev/null
@@ -0,0 +1,51 @@
+Description:
+A POSIX-like <sys/un.h>.
+
+Files:
+lib/sys_un.in.h
+m4/sys_un_h.m4
+
+Depends-on:
+gen-header
+include_next
+sys_socket-h
+
+configure.ac:
+gl_SYS_UN_H
+gl_CONDITIONAL_HEADER([sys/un.h])
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += $(SYS_UN_H)
+
+# We need the following in order to create <sys/un.h> when the system
+# doesn't have one.
+if GL_GENERATE_SYS_UN_H
+sys/un.h: sys_un.in.h $(top_builddir)/config.status
+@NMD@  $(AM_V_GEN)$(MKDIR_P) '%reldir%'
+       $(gl_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_UN_H''@|$(NEXT_SYS_UN_H)|g' \
+             -e 's|@''HAVE_SYS_UN_H''@|$(HAVE_SYS_UN_H)|g' \
+             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+             -e 's|@''HAVE_AFUNIX_H''@|$(HAVE_AFUNIX_H)|g' \
+             $(srcdir)/sys_un.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+else
+sys/un.h: $(top_builddir)/config.status
+       rm -f $@
+endif
+MOSTLYCLEANFILES += sys/un.h sys/un.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/un.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/sys_un-h-c++-tests b/modules/sys_un-h-c++-tests
new file mode 100644 (file)
index 0000000..b9e260a
--- /dev/null
@@ -0,0 +1,17 @@
+Files:
+tests/test-sys_un-h-c++.cc
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_un-h-c++
+check_PROGRAMS += test-sys_un-h-c++
+test_sys_un_h_c___SOURCES = test-sys_un-h-c++.cc
+endif
diff --git a/modules/sys_un-h-tests b/modules/sys_un-h-tests
new file mode 100644 (file)
index 0000000..e2e3bf7
--- /dev/null
@@ -0,0 +1,12 @@
+Files:
+tests/test-sys_un-h.c
+
+Depends-on:
+assert-h
+sys_un-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-sys_un-h
+check_PROGRAMS += test-sys_un-h
diff --git a/modules/sys_un-tests b/modules/sys_un-tests
deleted file mode 100644 (file)
index ef4e81b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-Files:
-tests/test-sys_un.c
-
-Depends-on:
-assert-h
-sys_un-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-sys_un
-check_PROGRAMS += test-sys_un
diff --git a/tests/test-sys_un-c++.cc b/tests/test-sys_un-c++.cc
deleted file mode 100644 (file)
index 5b2e391..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Test of the <sys/un.h> substitute in C++ mode.
-   Copyright (C) 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 Collin Funk <collin.funk1@gmail.com>, 2024.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#if HAVE_UNIXSOCKET
-
-# include <sys/un.h>
-
-int
-main ()
-{
-}
-
-#else
-
-/* UNIX domain sockets unsupported.  */
-
-# include <iostream>
-
-int
-main ()
-{
-  std::cout << "Skipping test: UNIX domain sockets not supported" << std::endl;
-  return 77;
-}
-
-#endif
diff --git a/tests/test-sys_un-h-c++.cc b/tests/test-sys_un-h-c++.cc
new file mode 100644 (file)
index 0000000..5b2e391
--- /dev/null
@@ -0,0 +1,44 @@
+/* Test of the <sys/un.h> substitute in C++ mode.
+   Copyright (C) 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 Collin Funk <collin.funk1@gmail.com>, 2024.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#if HAVE_UNIXSOCKET
+
+# include <sys/un.h>
+
+int
+main ()
+{
+}
+
+#else
+
+/* UNIX domain sockets unsupported.  */
+
+# include <iostream>
+
+int
+main ()
+{
+  std::cout << "Skipping test: UNIX domain sockets not supported" << std::endl;
+  return 77;
+}
+
+#endif
diff --git a/tests/test-sys_un-h.c b/tests/test-sys_un-h.c
new file mode 100644 (file)
index 0000000..c6b2931
--- /dev/null
@@ -0,0 +1,50 @@
+/* Test of the <sys/un.h> substitute.
+   Copyright (C) 2024 Free Software Foundation, Inc.
+
+   This file 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 file 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 Collin Funk <collin.funk1@gmail.com>, 2024.  */
+
+#include <config.h>
+
+#if HAVE_UNIXSOCKET
+
+/* Specification.  */
+# include <sys/un.h>
+
+int
+main (void)
+{
+  struct sockaddr_un sa;
+
+  /* POSIX requires sun_path is 92 bytes or greater.  */
+  static_assert (92 <= sizeof sa.sun_path);
+
+  return 0;
+}
+
+#else
+
+/* UNIX domain sockets unsupported.  */
+
+# include <stdio.h>
+
+int
+main (void)
+{
+  fputs ("Skipping test: UNIX domain sockets not supported\n", stderr);
+  return 77;
+}
+
+#endif
diff --git a/tests/test-sys_un.c b/tests/test-sys_un.c
deleted file mode 100644 (file)
index c6b2931..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/* Test of the <sys/un.h> substitute.
-   Copyright (C) 2024 Free Software Foundation, Inc.
-
-   This file 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 file 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 Collin Funk <collin.funk1@gmail.com>, 2024.  */
-
-#include <config.h>
-
-#if HAVE_UNIXSOCKET
-
-/* Specification.  */
-# include <sys/un.h>
-
-int
-main (void)
-{
-  struct sockaddr_un sa;
-
-  /* POSIX requires sun_path is 92 bytes or greater.  */
-  static_assert (92 <= sizeof sa.sun_path);
-
-  return 0;
-}
-
-#else
-
-/* UNIX domain sockets unsupported.  */
-
-# include <stdio.h>
-
-int
-main (void)
-{
-  fputs ("Skipping test: UNIX domain sockets not supported\n", stderr);
-  return 77;
-}
-
-#endif