From: Bruno Haible <bruno@clisp.org>
Date: Fri, 27 Dec 2024 22:11:34 +0000 (+0100)
Subject: Rename module arpa_inet to arpa_inet-h.
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=49f2771d586ff15994f6c38ba79e1ea512ff73b9;p=gnulib.git

Rename module arpa_inet to arpa_inet-h.

* modules/arpa_inet-h: Renamed from modules/arpa_inet.
* modules/arpa_inet-h-tests: Renamed from modules/arpa_inet-tests.
* modules/arpa_inet-h-c++-tests: Renamed from
modules/arpa_inet-c++-tests.
* tests/test-arpa_inet-h.c: Renamed from tests/test-arpa_inet.c.
* tests/test-arpa_inet-h-c++.cc: Renamed from
tests/test-arpa_inet-c++.cc.
* doc/posix-headers/arpa_inet.texi: Update.
* modules/* (Depends-on): Update.
* modules/arpa_inet: New file.
---

diff --git a/ChangeLog b/ChangeLog
index 2856562659..f55968a730 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+	Rename module arpa_inet to arpa_inet-h.
+	* modules/arpa_inet-h: Renamed from modules/arpa_inet.
+	* modules/arpa_inet-h-tests: Renamed from modules/arpa_inet-tests.
+	* modules/arpa_inet-h-c++-tests: Renamed from
+	modules/arpa_inet-c++-tests.
+	* tests/test-arpa_inet-h.c: Renamed from tests/test-arpa_inet.c.
+	* tests/test-arpa_inet-h-c++.cc: Renamed from
+	tests/test-arpa_inet-c++.cc.
+	* doc/posix-headers/arpa_inet.texi: Update.
+	* modules/* (Depends-on): Update.
+	* modules/arpa_inet: New file.
+
 2024-12-27  Simon Josefsson  <simon@josefsson.org>
 
 	git-version-gen: Support git-archive tarballs.
diff --git a/MODULES.html.sh b/MODULES.html.sh
index 5c0ebf9c2a..4307189a0d 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -2532,7 +2532,7 @@ func_all_modules ()
   func_begin_table
   func_module accept
   func_module alphasort
-  func_module arpa_inet
+  func_module arpa_inet-h
   func_module bind
   func_module calloc-posix
   func_module chmod
diff --git a/doc/posix-headers/arpa_inet.texi b/doc/posix-headers/arpa_inet.texi
index 6fad45f428..4d15eace8f 100644
--- a/doc/posix-headers/arpa_inet.texi
+++ b/doc/posix-headers/arpa_inet.texi
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html}
 
-Gnulib module: arpa_inet
-@mindex arpa_inet
+Gnulib module: arpa_inet-h
+@mindex arpa_inet-h
 
 Portability problems fixed by Gnulib:
 @itemize
diff --git a/modules/arpa_inet b/modules/arpa_inet
index b18fe8ff98..b2a799e391 100644
--- a/modules/arpa_inet
+++ b/modules/arpa_inet
@@ -1,61 +1,20 @@
 Description:
 A GNU-like <arpa/inet.h>.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'arpa_inet-h' instead.
+
 Files:
-lib/arpa_inet.in.h
-lib/arpa_inet.c
-m4/arpa_inet_h.m4
-m4/sys_socket_h.m4
-m4/socklen.m4
 
 Depends-on:
-extern-inline
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-sys_socket
+arpa_inet-h
 
 configure.ac:
-gl_ARPA_INET_H
-gl_ARPA_INET_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += arpa/inet.h
-lib_SOURCES += arpa_inet.c
-
-# We need the following in order to create <arpa/inet.h> when the system
-# doesn't have one.
-arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
-	$(AM_V_GEN)$(MKDIR_P) '%reldir%/arpa'
-	$(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|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
-	      -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
-	      -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
-	      -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
-	      -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
-	      -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
-	      -e 's|@''HAVE_DECL_HTONL''@|$(HAVE_DECL_HTONL)|g' \
-	      -e 's|@''HAVE_DECL_HTONS''@|$(HAVE_DECL_HTONS)|g' \
-	      -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
-	      -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
-	      -e 's|@''HAVE_DECL_NTOHL''@|$(HAVE_DECL_NTOHL)|g' \
-	      -e 's|@''HAVE_DECL_NTOHS''@|$(HAVE_DECL_NTOHS)|g' \
-	      -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
-	      -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|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)/arpa_inet.in.h > $@-t
-	$(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
-MOSTLYCLEANDIRS += arpa
 
 Include:
 <arpa/inet.h>
@@ -64,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-Simon Josefsson
diff --git a/modules/arpa_inet-c++-tests b/modules/arpa_inet-c++-tests
deleted file mode 100644
index 5d20170457..0000000000
--- a/modules/arpa_inet-c++-tests
+++ /dev/null
@@ -1,19 +0,0 @@
-Files:
-tests/test-arpa_inet-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-arpa_inet-c++
-check_PROGRAMS += test-arpa_inet-c++
-test_arpa_inet_c___SOURCES = test-arpa_inet-c++.cc
-test_arpa_inet_c___LDADD = $(LDADD) $(INET_NTOP_LIB) $(INET_PTON_LIB) $(LIBSOCKET)
-endif
diff --git a/modules/arpa_inet-h b/modules/arpa_inet-h
new file mode 100644
index 0000000000..b18fe8ff98
--- /dev/null
+++ b/modules/arpa_inet-h
@@ -0,0 +1,67 @@
+Description:
+A GNU-like <arpa/inet.h>.
+
+Files:
+lib/arpa_inet.in.h
+lib/arpa_inet.c
+m4/arpa_inet_h.m4
+m4/sys_socket_h.m4
+m4/socklen.m4
+
+Depends-on:
+extern-inline
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+sys_socket
+
+configure.ac:
+gl_ARPA_INET_H
+gl_ARPA_INET_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += arpa/inet.h
+lib_SOURCES += arpa_inet.c
+
+# We need the following in order to create <arpa/inet.h> when the system
+# doesn't have one.
+arpa/inet.h: arpa_inet.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+	$(AM_V_GEN)$(MKDIR_P) '%reldir%/arpa'
+	$(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|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \
+	      -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
+	      -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
+	      -e 's/@''GNULIB_INET_NTOP''@/$(GNULIB_INET_NTOP)/g' \
+	      -e 's/@''GNULIB_INET_PTON''@/$(GNULIB_INET_PTON)/g' \
+	      -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+	      -e 's|@''HAVE_DECL_HTONL''@|$(HAVE_DECL_HTONL)|g' \
+	      -e 's|@''HAVE_DECL_HTONS''@|$(HAVE_DECL_HTONS)|g' \
+	      -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
+	      -e 's|@''HAVE_DECL_INET_PTON''@|$(HAVE_DECL_INET_PTON)|g' \
+	      -e 's|@''HAVE_DECL_NTOHL''@|$(HAVE_DECL_NTOHL)|g' \
+	      -e 's|@''HAVE_DECL_NTOHS''@|$(HAVE_DECL_NTOHS)|g' \
+	      -e 's|@''REPLACE_INET_NTOP''@|$(REPLACE_INET_NTOP)|g' \
+	      -e 's|@''REPLACE_INET_PTON''@|$(REPLACE_INET_PTON)|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)/arpa_inet.in.h > $@-t
+	$(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += arpa/inet.h arpa/inet.h-t
+MOSTLYCLEANDIRS += arpa
+
+Include:
+<arpa/inet.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/arpa_inet-h-c++-tests b/modules/arpa_inet-h-c++-tests
new file mode 100644
index 0000000000..851aef0e58
--- /dev/null
+++ b/modules/arpa_inet-h-c++-tests
@@ -0,0 +1,19 @@
+Files:
+tests/test-arpa_inet-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-arpa_inet-h-c++
+check_PROGRAMS += test-arpa_inet-h-c++
+test_arpa_inet_h_c___SOURCES = test-arpa_inet-h-c++.cc
+test_arpa_inet_h_c___LDADD = $(LDADD) $(INET_NTOP_LIB) $(INET_PTON_LIB) $(LIBSOCKET)
+endif
diff --git a/modules/arpa_inet-h-tests b/modules/arpa_inet-h-tests
new file mode 100644
index 0000000000..212a06b988
--- /dev/null
+++ b/modules/arpa_inet-h-tests
@@ -0,0 +1,11 @@
+Files:
+tests/test-arpa_inet-h.c
+
+Depends-on:
+arpa_inet-h-c++-tests
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-arpa_inet-h
+check_PROGRAMS += test-arpa_inet-h
diff --git a/modules/arpa_inet-tests b/modules/arpa_inet-tests
deleted file mode 100644
index d6706f93c9..0000000000
--- a/modules/arpa_inet-tests
+++ /dev/null
@@ -1,11 +0,0 @@
-Files:
-tests/test-arpa_inet.c
-
-Depends-on:
-arpa_inet-c++-tests
-
-configure.ac:
-
-Makefile.am:
-TESTS += test-arpa_inet
-check_PROGRAMS += test-arpa_inet
diff --git a/modules/getsockname-tests b/modules/getsockname-tests
index 9141254054..bf542b12ad 100644
--- a/modules/getsockname-tests
+++ b/modules/getsockname-tests
@@ -5,7 +5,7 @@ tests/macros.h
 
 Depends-on:
 netinet_in
-arpa_inet
+arpa_inet-h
 inet_pton
 errno
 perror
diff --git a/modules/htonl b/modules/htonl
index 29f95501c4..9d4a8bba00 100644
--- a/modules/htonl
+++ b/modules/htonl
@@ -7,7 +7,7 @@ m4/htonl.m4
 m4/sys_socket_h.m4
 
 Depends-on:
-arpa_inet
+arpa_inet-h
 endian
 
 configure.ac:
diff --git a/modules/inet_ntop b/modules/inet_ntop
index 0c552d90e0..5acec5f371 100644
--- a/modules/inet_ntop
+++ b/modules/inet_ntop
@@ -7,7 +7,7 @@ m4/inet_ntop.m4
 m4/sys_socket_h.m4
 
 Depends-on:
-arpa_inet
+arpa_inet-h
 extensions
 sys_socket      [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
 errno           [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
diff --git a/modules/inet_pton b/modules/inet_pton
index 237f947eb1..ca62a47751 100644
--- a/modules/inet_pton
+++ b/modules/inet_pton
@@ -6,7 +6,7 @@ lib/inet_pton.c
 m4/inet_pton.m4
 
 Depends-on:
-arpa_inet
+arpa_inet-h
 extensions
 c-ctype         [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1]
 sys_socket      [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1]
diff --git a/modules/nonblocking-socket-tests b/modules/nonblocking-socket-tests
index e2545ea082..526dd541b5 100644
--- a/modules/nonblocking-socket-tests
+++ b/modules/nonblocking-socket-tests
@@ -19,7 +19,7 @@ wait-process
 environ
 posix_spawnp
 netinet_in
-arpa_inet
+arpa_inet-h
 socket
 setsockopt
 bind
diff --git a/modules/poll-tests b/modules/poll-tests
index b5b3ce4fbe..1952c730b5 100644
--- a/modules/poll-tests
+++ b/modules/poll-tests
@@ -7,7 +7,7 @@ Depends-on:
 stdbool
 sys_socket
 netinet_in
-arpa_inet
+arpa_inet-h
 sys_ioctl
 extensions
 inet_pton
diff --git a/modules/posixcheck b/modules/posixcheck
index 838d3bb40d..f1cc19b1ae 100644
--- a/modules/posixcheck
+++ b/modules/posixcheck
@@ -7,7 +7,7 @@ m4/posixcheck.m4
 
 Depends-on:
 # All modules that depend on 'snippet/warn-on-use'.
-arpa_inet
+arpa_inet-h
 ctype
 dirent
 fcntl-h
diff --git a/modules/pselect-tests b/modules/pselect-tests
index dd41a7026f..72381ed21a 100644
--- a/modules/pselect-tests
+++ b/modules/pselect-tests
@@ -7,7 +7,7 @@ tests/signature.h
 Depends-on:
 stdbool
 netinet_in
-arpa_inet
+arpa_inet-h
 unistd
 sys_ioctl
 extensions
diff --git a/modules/select-tests b/modules/select-tests
index f62130dd9c..1f78cc0d2b 100644
--- a/modules/select-tests
+++ b/modules/select-tests
@@ -12,7 +12,7 @@ Depends-on:
 stdbool
 sys_socket
 netinet_in
-arpa_inet
+arpa_inet-h
 unistd
 sys_ioctl
 extensions
diff --git a/tests/test-arpa_inet-c++.cc b/tests/test-arpa_inet-c++.cc
deleted file mode 100644
index 4987679ac8..0000000000
--- a/tests/test-arpa_inet-c++.cc
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Test of <arpa/inet.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 <arpa/inet.h>
-
-#include "signature.h"
-
-
-#if GNULIB_TEST_INET_NTOP
-SIGNATURE_CHECK (GNULIB_NAMESPACE::inet_ntop, const char *,
-                 (int, const void *, char *, socklen_t));
-#endif
-
-#if GNULIB_TEST_INET_PTON
-SIGNATURE_CHECK (GNULIB_NAMESPACE::inet_pton, int,
-                 (int, const char *, void *));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-arpa_inet-h-c++.cc b/tests/test-arpa_inet-h-c++.cc
new file mode 100644
index 0000000000..4987679ac8
--- /dev/null
+++ b/tests/test-arpa_inet-h-c++.cc
@@ -0,0 +1,41 @@
+/* Test of <arpa/inet.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 <arpa/inet.h>
+
+#include "signature.h"
+
+
+#if GNULIB_TEST_INET_NTOP
+SIGNATURE_CHECK (GNULIB_NAMESPACE::inet_ntop, const char *,
+                 (int, const void *, char *, socklen_t));
+#endif
+
+#if GNULIB_TEST_INET_PTON
+SIGNATURE_CHECK (GNULIB_NAMESPACE::inet_pton, int,
+                 (int, const char *, void *));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-arpa_inet-h.c b/tests/test-arpa_inet-h.c
new file mode 100644
index 0000000000..77222638ef
--- /dev/null
+++ b/tests/test-arpa_inet-h.c
@@ -0,0 +1,27 @@
+/* Test of <arpa/inet.h> substitute.
+   Copyright (C) 2007, 2009-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 <arpa/inet.h>
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-arpa_inet.c b/tests/test-arpa_inet.c
deleted file mode 100644
index 77222638ef..0000000000
--- a/tests/test-arpa_inet.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Test of <arpa/inet.h> substitute.
-   Copyright (C) 2007, 2009-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 <arpa/inet.h>
-
-int
-main (void)
-{
-  return 0;
-}