From f2b130983d09e0dcf3fe594bc75e3dca2a1cc963 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 27 Dec 2024 23:14:35 +0100 Subject: [PATCH] Rename module netinet_in to netinet_in-h. * modules/netinet_in-h: Renamed from modules/netinet_in. * modules/netinet_in-h-tests: Renamed from modules/netinet_in-tests. * modules/netinet_in-h-c++-tests: Renamed from modules/netinet_in-c++-tests. * tests/test-netinet_in-h.c: Renamed from tests/test-netinet_in.c. * tests/test-netinet_in-h-c++.cc: Renamed from tests/test-netinet_in-c++.cc. * doc/posix-headers/netinet_in.texi: Update. * modules/* (Depends-on): Update. * modules/netinet_in: New file. --- ChangeLog | 14 ++++++ doc/posix-headers/netinet_in.texi | 4 +- modules/accept-tests | 2 +- modules/accept4-tests | 2 +- modules/bind-tests | 2 +- modules/connect-tests | 2 +- modules/getpeername-tests | 2 +- modules/getsockname-tests | 2 +- modules/getsockopt-tests | 2 +- modules/inet_ntop | 2 +- modules/inet_ntop-tests | 2 +- modules/inet_pton | 2 +- modules/inet_pton-tests | 2 +- modules/netinet_in | 38 +++----------- modules/netinet_in-c++-tests | 17 ------- modules/netinet_in-h | 49 +++++++++++++++++++ modules/netinet_in-h-c++-tests | 17 +++++++ modules/netinet_in-h-tests | 11 +++++ modules/netinet_in-tests | 11 ----- modules/nonblocking-socket-tests | 2 +- modules/poll-tests | 2 +- modules/pselect-tests | 2 +- modules/recvfrom-tests | 2 +- modules/select-tests | 2 +- modules/sendto-tests | 2 +- modules/setsockopt-tests | 2 +- ...net_in-c++.cc => test-netinet_in-h-c++.cc} | 0 ...{test-netinet_in.c => test-netinet_in-h.c} | 0 28 files changed, 118 insertions(+), 79 deletions(-) delete mode 100644 modules/netinet_in-c++-tests create mode 100644 modules/netinet_in-h create mode 100644 modules/netinet_in-h-c++-tests create mode 100644 modules/netinet_in-h-tests delete mode 100644 modules/netinet_in-tests rename tests/{test-netinet_in-c++.cc => test-netinet_in-h-c++.cc} (100%) rename tests/{test-netinet_in.c => test-netinet_in-h.c} (100%) diff --git a/ChangeLog b/ChangeLog index a47950f80e..e5b0812b24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2024-12-27 Bruno Haible + + Rename module netinet_in to netinet_in-h. + * modules/netinet_in-h: Renamed from modules/netinet_in. + * modules/netinet_in-h-tests: Renamed from modules/netinet_in-tests. + * modules/netinet_in-h-c++-tests: Renamed from + modules/netinet_in-c++-tests. + * tests/test-netinet_in-h.c: Renamed from tests/test-netinet_in.c. + * tests/test-netinet_in-h-c++.cc: Renamed from + tests/test-netinet_in-c++.cc. + * doc/posix-headers/netinet_in.texi: Update. + * modules/* (Depends-on): Update. + * modules/netinet_in: New file. + 2024-12-27 Bruno Haible Rename module net_if to net_if-h. diff --git a/doc/posix-headers/netinet_in.texi b/doc/posix-headers/netinet_in.texi index 03d3811a58..2fc5cec7fa 100644 --- a/doc/posix-headers/netinet_in.texi +++ b/doc/posix-headers/netinet_in.texi @@ -3,8 +3,8 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/netinet_in.h.html} -Gnulib module: netinet_in -@mindex netinet_in +Gnulib module: netinet_in-h +@mindex netinet_in-h Portability problems fixed by Gnulib: @itemize diff --git a/modules/accept-tests b/modules/accept-tests index a03be0abbe..9e1c584036 100644 --- a/modules/accept-tests +++ b/modules/accept-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets configure.ac: diff --git a/modules/accept4-tests b/modules/accept4-tests index ad8f5fcd88..c5319cb349 100644 --- a/modules/accept4-tests +++ b/modules/accept4-tests @@ -5,7 +5,7 @@ tests/macros.h Depends-on: fcntl-h -netinet_in +netinet_in-h binary-io sockets diff --git a/modules/bind-tests b/modules/bind-tests index 9ffb71f5b6..3d2971e55c 100644 --- a/modules/bind-tests +++ b/modules/bind-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets inet_pton diff --git a/modules/connect-tests b/modules/connect-tests index 8b3c7105e0..b66b0b8a6a 100644 --- a/modules/connect-tests +++ b/modules/connect-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets inet_pton diff --git a/modules/getpeername-tests b/modules/getpeername-tests index b77f58ad1e..15e834de08 100644 --- a/modules/getpeername-tests +++ b/modules/getpeername-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets configure.ac: diff --git a/modules/getsockname-tests b/modules/getsockname-tests index cfa326732e..7599ad0149 100644 --- a/modules/getsockname-tests +++ b/modules/getsockname-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h arpa_inet-h inet_pton errno-h diff --git a/modules/getsockopt-tests b/modules/getsockopt-tests index c6e5c16def..25cc1909c7 100644 --- a/modules/getsockopt-tests +++ b/modules/getsockopt-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets configure.ac: diff --git a/modules/inet_ntop b/modules/inet_ntop index c5b63311e4..d83f742a0b 100644 --- a/modules/inet_ntop +++ b/modules/inet_ntop @@ -11,7 +11,7 @@ arpa_inet-h extensions sys_socket [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1] errno-h [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1] -netinet_in [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1] +netinet_in-h [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1] configure.ac: gl_FUNC_INET_NTOP diff --git a/modules/inet_ntop-tests b/modules/inet_ntop-tests index cab3d51a63..62b42175c8 100644 --- a/modules/inet_ntop-tests +++ b/modules/inet_ntop-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sys_socket configure.ac: diff --git a/modules/inet_pton b/modules/inet_pton index e36d6d031a..b09fc558cf 100644 --- a/modules/inet_pton +++ b/modules/inet_pton @@ -11,7 +11,7 @@ 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] errno-h [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1] -netinet_in [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1] +netinet_in-h [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1] configure.ac: gl_FUNC_INET_PTON diff --git a/modules/inet_pton-tests b/modules/inet_pton-tests index cc7408a6db..4e65e3816c 100644 --- a/modules/inet_pton-tests +++ b/modules/inet_pton-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sys_socket configure.ac: diff --git a/modules/netinet_in b/modules/netinet_in index 8a51447c62..d4f2da02b1 100644 --- a/modules/netinet_in +++ b/modules/netinet_in @@ -1,43 +1,20 @@ Description: A for systems lacking it. +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'netinet_in-h' instead. + Files: -lib/netinet_in.in.h -m4/netinet_in_h.m4 Depends-on: -gen-header -include_next -sys_socket +netinet_in-h configure.ac: -gl_HEADER_NETINET_IN -gl_CONDITIONAL_HEADER([netinet/in.h]) -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(NETINET_IN_H) - -# We need the following in order to create when the system -# doesn't have one. -if GL_GENERATE_NETINET_IN_H -netinet/in.h: netinet_in.in.h $(top_builddir)/config.status - $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet' - $(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_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ - -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ - $(srcdir)/netinet_in.in.h > $@-t - $(AM_V_at)mv $@-t $@ -else -netinet/in.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t -MOSTLYCLEANDIRS += netinet Include: @@ -46,4 +23,3 @@ License: LGPLv2+ Maintainer: -Simon Josefsson diff --git a/modules/netinet_in-c++-tests b/modules/netinet_in-c++-tests deleted file mode 100644 index c84cba55cc..0000000000 --- a/modules/netinet_in-c++-tests +++ /dev/null @@ -1,17 +0,0 @@ -Files: -tests/test-netinet_in-c++.cc - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-netinet_in-c++ -check_PROGRAMS += test-netinet_in-c++ -test_netinet_in_c___SOURCES = test-netinet_in-c++.cc -endif diff --git a/modules/netinet_in-h b/modules/netinet_in-h new file mode 100644 index 0000000000..8a51447c62 --- /dev/null +++ b/modules/netinet_in-h @@ -0,0 +1,49 @@ +Description: +A for systems lacking it. + +Files: +lib/netinet_in.in.h +m4/netinet_in_h.m4 + +Depends-on: +gen-header +include_next +sys_socket + +configure.ac: +gl_HEADER_NETINET_IN +gl_CONDITIONAL_HEADER([netinet/in.h]) +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += $(NETINET_IN_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_NETINET_IN_H +netinet/in.h: netinet_in.in.h $(top_builddir)/config.status + $(AM_V_GEN)$(MKDIR_P) '%reldir%/netinet' + $(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_NETINET_IN_H''@|$(NEXT_NETINET_IN_H)|g' \ + -e 's|@''HAVE_NETINET_IN_H''@|$(HAVE_NETINET_IN_H)|g' \ + $(srcdir)/netinet_in.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +netinet/in.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += netinet/in.h netinet/in.h-t +MOSTLYCLEANDIRS += netinet + +Include: + + +License: +LGPLv2+ + +Maintainer: +Simon Josefsson diff --git a/modules/netinet_in-h-c++-tests b/modules/netinet_in-h-c++-tests new file mode 100644 index 0000000000..24e927c5cb --- /dev/null +++ b/modules/netinet_in-h-c++-tests @@ -0,0 +1,17 @@ +Files: +tests/test-netinet_in-h-c++.cc + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-netinet_in-h-c++ +check_PROGRAMS += test-netinet_in-h-c++ +test_netinet_in_h_c___SOURCES = test-netinet_in-h-c++.cc +endif diff --git a/modules/netinet_in-h-tests b/modules/netinet_in-h-tests new file mode 100644 index 0000000000..6b883dafc9 --- /dev/null +++ b/modules/netinet_in-h-tests @@ -0,0 +1,11 @@ +Files: +tests/test-netinet_in-h.c + +Depends-on: +netinet_in-h-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-netinet_in-h +check_PROGRAMS += test-netinet_in-h diff --git a/modules/netinet_in-tests b/modules/netinet_in-tests deleted file mode 100644 index c68cfbf12a..0000000000 --- a/modules/netinet_in-tests +++ /dev/null @@ -1,11 +0,0 @@ -Files: -tests/test-netinet_in.c - -Depends-on: -netinet_in-c++-tests - -configure.ac: - -Makefile.am: -TESTS += test-netinet_in -check_PROGRAMS += test-netinet_in diff --git a/modules/nonblocking-socket-tests b/modules/nonblocking-socket-tests index 526dd541b5..56e85486e6 100644 --- a/modules/nonblocking-socket-tests +++ b/modules/nonblocking-socket-tests @@ -18,7 +18,7 @@ nonblocking wait-process environ posix_spawnp -netinet_in +netinet_in-h arpa_inet-h socket setsockopt diff --git a/modules/poll-tests b/modules/poll-tests index fc9d6c2806..35df84b8f7 100644 --- a/modules/poll-tests +++ b/modules/poll-tests @@ -6,7 +6,7 @@ tests/macros.h Depends-on: stdbool sys_socket -netinet_in +netinet_in-h arpa_inet-h sys_ioctl extensions diff --git a/modules/pselect-tests b/modules/pselect-tests index c7786d3c94..bdadf6b689 100644 --- a/modules/pselect-tests +++ b/modules/pselect-tests @@ -6,7 +6,7 @@ tests/signature.h Depends-on: stdbool -netinet_in +netinet_in-h arpa_inet-h unistd sys_ioctl diff --git a/modules/recvfrom-tests b/modules/recvfrom-tests index ac209427fc..7481eaa442 100644 --- a/modules/recvfrom-tests +++ b/modules/recvfrom-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets configure.ac: diff --git a/modules/select-tests b/modules/select-tests index 822ee30e45..844f31eb50 100644 --- a/modules/select-tests +++ b/modules/select-tests @@ -11,7 +11,7 @@ tests/test-select-stdin.c Depends-on: stdbool sys_socket -netinet_in +netinet_in-h arpa_inet-h unistd sys_ioctl diff --git a/modules/sendto-tests b/modules/sendto-tests index afacb2a0eb..5b5acc59ea 100644 --- a/modules/sendto-tests +++ b/modules/sendto-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets inet_pton diff --git a/modules/setsockopt-tests b/modules/setsockopt-tests index 4704d93943..927ad976db 100644 --- a/modules/setsockopt-tests +++ b/modules/setsockopt-tests @@ -4,7 +4,7 @@ tests/signature.h tests/macros.h Depends-on: -netinet_in +netinet_in-h sockets configure.ac: diff --git a/tests/test-netinet_in-c++.cc b/tests/test-netinet_in-h-c++.cc similarity index 100% rename from tests/test-netinet_in-c++.cc rename to tests/test-netinet_in-h-c++.cc diff --git a/tests/test-netinet_in.c b/tests/test-netinet_in-h.c similarity index 100% rename from tests/test-netinet_in.c rename to tests/test-netinet_in-h.c -- 2.39.5