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

48 files changed:
ChangeLog
doc/posix-headers/sys_socket.texi
modules/accept
modules/accept4
modules/arpa_inet-h
modules/bind
modules/connect
modules/crypto/af_alg
modules/getaddrinfo
modules/getdomainname
modules/gethostname
modules/getpeername
modules/getsockname
modules/getsockopt
modules/hostent
modules/inet_ntop
modules/inet_ntop-tests
modules/inet_pton
modules/inet_pton-tests
modules/ioctl
modules/listen
modules/net_if-h
modules/netdb-h
modules/netinet_in-h
modules/nonblocking
modules/nonblocking-socket-tests
modules/passfd
modules/poll
modules/poll-tests
modules/posixcheck
modules/recv
modules/recvfrom
modules/select-tests
modules/send
modules/sendto
modules/servent
modules/setsockopt
modules/shutdown
modules/socket
modules/sockets
modules/sys_socket
modules/sys_socket-c++-tests [deleted file]
modules/sys_socket-h [new file with mode: 0644]
modules/sys_socket-h-c++-tests [new file with mode: 0644]
modules/sys_socket-h-tests [moved from modules/sys_socket-tests with 55% similarity]
modules/sys_un
tests/test-sys_socket-h-c++.cc [moved from tests/test-sys_socket-c++.cc with 100% similarity]
tests/test-sys_socket-h.c [moved from tests/test-sys_socket.c with 100% similarity]

index 9a726228cbb4f3b42c8810fbc40bc8881ccffe70..c3e27322714a7aeabcad8c3bd51f78f69e6b479c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2024-12-27  Bruno Haible  <bruno@clisp.org>
+
+       Rename module sys_socket to sys_socket-h.
+       * modules/sys_socket-h: Renamed from modules/sys_socket.
+       * modules/sys_socket-h-tests: Renamed from modules/sys_socket-tests.
+       * modules/sys_socket-h-c++-tests: Renamed from
+       modules/sys_socket-c++-tests.
+       * tests/test-sys_socket-h.c: Renamed from tests/test-sys_socket.c.
+       * tests/test-sys_socket-h-c++.cc: Renamed from
+       tests/test-sys_socket-c++.cc.
+       * doc/posix-headers/sys_socket.texi: Update.
+       * modules/* (Depends-on): Update.
+       * modules/sys_socket: New file.
+
 2024-12-27  Bruno Haible  <bruno@clisp.org>
 
        Rename module sys_shm to sys_shm-h.
index 8b0a7c5725461b3591e95247cd4882dcbc139377..d6084980ba5b611022d818257b5f036211eb5825 100644 (file)
@@ -3,8 +3,8 @@
 
 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html}
 
-Gnulib module: sys_socket
-@mindex sys_socket
+Gnulib module: sys_socket-h
+@mindex sys_socket-h
 
 Portability problems fixed by Gnulib:
 @itemize
index 682cd2a48917a0a75c1bb60f3143cc67beacc054..f0a210eb87ab93a9971cb11bdf2c1c7b3ff35dff 100644 (file)
@@ -7,7 +7,7 @@ lib/w32sock.h
 
 Depends-on:
 extensions
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index c1a61f5ddc9e9c53adcbc57f385d2e004da0e77a..6db68372e99c8fcfae200695afb7efc58e3d72b7 100644 (file)
@@ -7,7 +7,7 @@ lib/accept4.c
 m4/accept4.m4
 
 Depends-on:
-sys_socket
+sys_socket-h
 accept
 fcntl-h
 binary-io
index b18fe8ff987af2a3f1e416dfa0730536c4a832c1..ac776bea84b942ead21cbd74f09476eaca0d7f1f 100644 (file)
@@ -15,7 +15,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_ARPA_INET_H
index fad39d8af2ac50ccfbf35f97ea5adf775d411ddd..3fa6c8bbc25dfb9235c2204f3c15b650d2a7792f 100644 (file)
@@ -6,7 +6,7 @@ lib/bind.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index 445e6f9960417485a456084a0842e507fc4d7fff..5db4113dbb77f742615a05b80e0b89c594170352 100644 (file)
@@ -6,7 +6,7 @@ lib/connect.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index ec263b0149500a1341193cec3b064ef62ff47888..ffb452056ccf5c1cff6a84cdedabe65a43430a82 100644 (file)
@@ -13,7 +13,7 @@ fflush          [test $USE_AF_ALG = 1]
 fseeko          [test $USE_AF_ALG = 1]
 ftello          [test $USE_AF_ALG = 1]
 fstat           [test $USE_AF_ALG = 1]
-sys_socket
+sys_socket-h
 sys_stat
 
 configure.ac:
index ed36894dbfdc801c4d7a54f05e89f9b5799661c7..e8d9fa995df22bb1a7aa7b8bfbfd670c377de04d 100644 (file)
@@ -8,7 +8,7 @@ m4/getaddrinfo.m4
 
 Depends-on:
 netdb-h
-sys_socket
+sys_socket-h
 extensions
 gettext-h       [test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1 || test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1]
 gnulib-i18n     [test $HAVE_GETADDRINFO = 0 || test $REPLACE_GETADDRINFO = 1 || test $HAVE_DECL_GAI_STRERROR = 0 || test $REPLACE_GAI_STRERROR = 1]
index bf8bb3475b00f015b80c227b2fce0d81b0832b68..80f1112f0d90cec1abb38bf6d2b54f99a876c4cc 100644 (file)
@@ -9,7 +9,7 @@ Depends-on:
 unistd
 extensions
 netdb-h         [test $HAVE_DECL_GETDOMAINNAME = 0 || test $REPLACE_GETDOMAINNAME = 1]
-sys_socket      [test $HAVE_DECL_GETDOMAINNAME = 0 || test $REPLACE_GETDOMAINNAME = 1]
+sys_socket-h    [test $HAVE_DECL_GETDOMAINNAME = 0 || test $REPLACE_GETDOMAINNAME = 1]
 
 configure.ac:
 gl_FUNC_GETDOMAINNAME
index 5127ed4bb715a873fe965992e9d25edecd8296da..0ba26342189ed461a957d5a496229299df67823d 100644 (file)
@@ -8,7 +8,7 @@ lib/w32sock.h
 
 Depends-on:
 unistd
-sys_socket      [test $HAVE_GETHOSTNAME = 0]
+sys_socket-h    [test $HAVE_GETHOSTNAME = 0]
 errno-h         [test $HAVE_GETHOSTNAME = 0]
 sockets         [test $HAVE_GETHOSTNAME = 0]
 msvc-nothrow    [test $HAVE_GETHOSTNAME = 0]
index 13796c7aa572fdbad4a3fbdf7c6ca4718b8c6b1d..12b139d3dcd4f5f21f8953d5c6ec9576832d4483 100644 (file)
@@ -8,7 +8,7 @@ lib/w32sock.h
 
 Depends-on:
 extensions
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index d9e6d0d3df5418a03153fc44236ad52e9e9aa7dd..c4732bc177686a65373fe99d049baa052bdea994 100644 (file)
@@ -8,7 +8,7 @@ lib/w32sock.h
 
 Depends-on:
 extensions
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index be3474beb222567a2a9106c5fe642b3e744d0e60..9bbc6685fb29ed8c3509f12038bebe4e2c4f6cd8 100644 (file)
@@ -7,7 +7,7 @@ lib/w32sock.h
 
 Depends-on:
 extensions
-sys_socket
+sys_socket-h
 socketlib
 sys_time        [test "$ac_cv_header_winsock2_h" = yes]
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
index 57ff594a20b9e79b8c36f08c36fd8bd574ebd606..7f9bb5943ca53692f86949bdcc353f27e11e475c 100644 (file)
@@ -7,7 +7,7 @@ Files:
 m4/hostent.m4
 
 Depends-on:
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_HOSTENT
index d83f742a0b148de391ca07d4676e98af7b7ef921..fa6979b2ee7aab1ec50f1cc1946257abe1fb45a8 100644 (file)
@@ -9,7 +9,7 @@ m4/sys_socket_h.m4
 Depends-on:
 arpa_inet-h
 extensions
-sys_socket      [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
+sys_socket-h    [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
 errno-h         [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
 netinet_in-h    [test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1]
 
index 62b42175c8a585e23d617e69f61142e92d27c409..999260c8fd8cc71c1545fdeff83db7a8c67ab60d 100644 (file)
@@ -5,7 +5,7 @@ tests/macros.h
 
 Depends-on:
 netinet_in-h
-sys_socket
+sys_socket-h
 
 configure.ac:
 AC_C_BIGENDIAN
index b09fc558cf061a6430bec8f816bd11d9fff60263..902e48434ae248ed25b1e83ddc0d6902666cdbf4 100644 (file)
@@ -9,7 +9,7 @@ Depends-on:
 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]
+sys_socket-h    [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1]
 errno-h         [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1]
 netinet_in-h    [test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1]
 
index 4e65e3816c870a1c9bfb7a1a32702f43d910f139..6d9004492ad8ad4f22f94f76bfb7b45e51d39a39 100644 (file)
@@ -5,7 +5,7 @@ tests/macros.h
 
 Depends-on:
 netinet_in-h
-sys_socket
+sys_socket-h
 
 configure.ac:
 AC_C_BIGENDIAN
index eeb4d7089e8580fab20c320eff9520d2ac0aad22..7d9af96941914e6f40ef22e80453c7e60729f289 100644 (file)
@@ -8,7 +8,7 @@ m4/ioctl.m4
 
 Depends-on:
 sys_ioctl-h
-sys_socket      [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
+sys_socket-h    [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
 errno-h         [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
 fd-hook         [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
 msvc-nothrow    [test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1]
index a44b664e00164dc2df388a0882a81d94d3c73a96..ec7a605318bc17ca2ff9a71f543b401ff110056a 100644 (file)
@@ -6,7 +6,7 @@ lib/listen.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index d1b4865bdbcfd4fb412c4b8dd511e6f3eb14297d..8b657857c33313f2b47b0ecb457e4ec8c71674e7 100644 (file)
@@ -8,7 +8,7 @@ m4/net_if_h.m4
 Depends-on:
 gen-header
 include_next
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_HEADER_NET_IF
index b81d389cd173bad69dde799d53b9b710a63209dd..6f303c99beb500f6c23e16d6f9a8b7b70d3a7b67 100644 (file)
@@ -11,7 +11,7 @@ include_next
 snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_NETDB_H
index 8a51447c62d21b95ffc7064a44b578be59dc710b..916a84268cfdaa21ce84503af1767bc75bc9d560 100644 (file)
@@ -8,7 +8,7 @@ m4/netinet_in_h.m4
 Depends-on:
 gen-header
 include_next
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_HEADER_NETINET_IN
index 933c6f4a7e47c84b201de71c73e9f8b893e3f178..6d059d4aaabc0e2a5906c61b00e0f4b53a3898f4 100644 (file)
@@ -15,7 +15,7 @@ ioctl
 msvc-nothrow
 stdbool-h
 stdio-h
-sys_socket
+sys_socket-h
 unistd
 
 configure.ac:
index f7a98cbd4534426d739a0e924c5917dd004dbc4f..bd206098071db9fb71582e4090a421f41b4183c9 100644 (file)
@@ -13,7 +13,7 @@ tests/macros.h
 Depends-on:
 stdbool-h
 unistd
-sys_socket
+sys_socket-h
 nonblocking
 wait-process
 environ
index 5e5c15f559df510d358ace8398174ad8632ccf79..406601dfdd7f083b260f5302587456038f78810f 100644 (file)
@@ -8,7 +8,7 @@ m4/passfd.m4
 
 Depends-on:
 cloexec
-sys_socket
+sys_socket-h
 socketlib
 
 configure.ac:
index ce77e998c91e38a9a26568652c01be4ef78e1cb0..917242b6b49d0a79d48c9e199a872b231d7f805b 100644 (file)
@@ -12,7 +12,7 @@ assure          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 select          [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sockets         [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_select-h    [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
-sys_socket      [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
+sys_socket-h    [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 sys_time        [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 errno-h         [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
 msvc-nothrow    [test $HAVE_POLL = 0 || test $REPLACE_POLL = 1]
index e6663a09c42f7709de7c77cc36f70deb483ea779..423bd40d93d1e26cce04c27002948f01f55c7a0d 100644 (file)
@@ -5,7 +5,7 @@ tests/macros.h
 
 Depends-on:
 stdbool-h
-sys_socket
+sys_socket-h
 netinet_in-h
 arpa_inet-h
 sys_ioctl-h
index 04fc89cc16fca819e69fa5ad37d979e28751819e..a07960fa3af45e356cf4d9bf59c8138e4be7905f 100644 (file)
@@ -37,7 +37,7 @@ sys_ioctl-h
 sys_random-h
 sys_resource-h
 sys_select-h
-sys_socket
+sys_socket-h
 sys_stat
 sys_time
 sys_times
index 437e48909615c7ddcaf4eec1c6bfc30b8a2874c7..02b91f7eb30e3a9fbd41a843dfdfb05a6870d7a2 100644 (file)
@@ -6,7 +6,7 @@ lib/recv.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index d32f7d5fcbaa3346ef9bc896553875376e0f3af8..d2798cab4b1d17f7f6389e5ef09aef357a324a16 100644 (file)
@@ -7,7 +7,7 @@ lib/w32sock.h
 
 Depends-on:
 extensions
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 getpeername     [test "$ac_cv_header_winsock2_h" = yes]
index 77b26b7e73751c5f34652305d140ee62d5a7b04d..f3a6ef01d2aa7457f4cccab5d3d447f8d8e07f8f 100644 (file)
@@ -10,7 +10,7 @@ tests/test-select-stdin.c
 
 Depends-on:
 stdbool-h
-sys_socket
+sys_socket-h
 netinet_in-h
 arpa_inet-h
 unistd
index 26815365a9c305ebfc3a8c221bfd8fc6819eb324..38c47e83cc7a238e68ca765854eeca5c36b2c631 100644 (file)
@@ -6,7 +6,7 @@ lib/send.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index 43a9ddb92b352224e18b639ed55a1cc7c94d6844..09fc0ec5270e9fdf7e8246edb2a73aef17819b3c 100644 (file)
@@ -6,7 +6,7 @@ lib/sendto.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index 1e0d82636a882f9e26dbf44a92afe4ff9431eef2..e2b0f9646bf16381209f761834c7deee7b2df768 100644 (file)
@@ -9,7 +9,7 @@ Files:
 m4/servent.m4
 
 Depends-on:
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_SERVENT
index 2023a428d2a1c0d870370f323b7266d339551e26..59a5a2f40c1d479323a99cca9ffafcb1c299ce03 100644 (file)
@@ -6,7 +6,7 @@ lib/setsockopt.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 sys_time        [test "$ac_cv_header_winsock2_h" = yes]
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
index 599058a4f5f4acc192ec2f3e664233c538df152a..806112df4e0a5f6cde0eb75fbb6be1282b340f38 100644 (file)
@@ -6,7 +6,7 @@ lib/shutdown.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
index e98099077b7788b0fab47a1d145a462055ea26f6..a4a9e1321d6061e78009fb0aae47a2139408fe72 100644 (file)
@@ -6,7 +6,7 @@ lib/socket.c
 lib/w32sock.h
 
 Depends-on:
-sys_socket
+sys_socket-h
 socketlib
 errno-h         [test "$ac_cv_header_winsock2_h" = yes]
 sockets         [test "$ac_cv_header_winsock2_h" = yes]
index 529728c2324390e123ecd24d8e2d4447dfcaeeed..0b692c46412382aa237c1d3a18ec66f63e9d94ac 100644 (file)
@@ -9,7 +9,7 @@ m4/sockets.m4
 
 Depends-on:
 socketlib
-sys_socket
+sys_socket-h
 fd-hook
 msvc-nothrow
 
index bbd337f7895c791dc2c925e26e6749c539fb3434..4a479a4ad03f7f9c65cafd4144773e8ff9eb2a9f 100644 (file)
@@ -1,74 +1,20 @@
 Description:
 A POSIX-like <sys/socket.h>.
 
+Status:
+deprecated
+
+Notice:
+This module is deprecated. Use the module 'sys_socket-h' instead.
+
 Files:
-lib/sys_socket.c
-lib/sys_socket.in.h
-m4/sys_socket_h.m4
-m4/sockpfaf.m4
 
 Depends-on:
-alignasof
-errno-h
-extern-inline
-gen-header
-include_next
-snippet/arg-nonnull
-snippet/c++defs
-snippet/warn-on-use
-socklen
-ssize_t
-sys_uio
+sys_socket-h
 
 configure.ac:
-gl_SYS_SOCKET_H
-gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
-AC_PROG_MKDIR_P
 
 Makefile.am:
-BUILT_SOURCES += sys/socket.h
-lib_SOURCES += sys_socket.c
-
-# We need the following in order to create <sys/socket.h> when the system
-# doesn't have one that works with the given compiler.
-sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_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_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
-             -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
-             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
-             -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
-             -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
-             -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
-             -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
-             -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
-             -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
-             -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
-             -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
-             -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
-             -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
-             -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
-             -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
-             -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
-             -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
-             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
-             -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
-             -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
-             -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \
-             -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
-             -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|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_socket.in.h > $@-t
-       $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
-MOSTLYCLEANDIRS += sys
 
 Include:
 <sys/socket.h>
@@ -77,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-Simon Josefsson
diff --git a/modules/sys_socket-c++-tests b/modules/sys_socket-c++-tests
deleted file mode 100644 (file)
index 0d7a63a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-Files:
-tests/test-sys_socket-c++.cc
-tests/signature.h
-
-Status:
-c++-test
-
-Depends-on:
-ansi-c++-opt
-
-configure.ac:
-
-Makefile.am:
-if ANSICXX
-TESTS += test-sys_socket-c++
-check_PROGRAMS += test-sys_socket-c++
-test_sys_socket_c___SOURCES = test-sys_socket-c++.cc
-test_sys_socket_c___LDADD = $(LDADD) $(LIBINTL) $(LIBSOCKET) $(NANOSLEEP_LIB)
-endif
diff --git a/modules/sys_socket-h b/modules/sys_socket-h
new file mode 100644 (file)
index 0000000..bbd337f
--- /dev/null
@@ -0,0 +1,80 @@
+Description:
+A POSIX-like <sys/socket.h>.
+
+Files:
+lib/sys_socket.c
+lib/sys_socket.in.h
+m4/sys_socket_h.m4
+m4/sockpfaf.m4
+
+Depends-on:
+alignasof
+errno-h
+extern-inline
+gen-header
+include_next
+snippet/arg-nonnull
+snippet/c++defs
+snippet/warn-on-use
+socklen
+ssize_t
+sys_uio
+
+configure.ac:
+gl_SYS_SOCKET_H
+gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
+AC_PROG_MKDIR_P
+
+Makefile.am:
+BUILT_SOURCES += sys/socket.h
+lib_SOURCES += sys_socket.c
+
+# We need the following in order to create <sys/socket.h> when the system
+# doesn't have one that works with the given compiler.
+sys/socket.h: sys_socket.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_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_SOCKET_H''@|$(NEXT_SYS_SOCKET_H)|g' \
+             -e 's|@''HAVE_SYS_SOCKET_H''@|$(HAVE_SYS_SOCKET_H)|g' \
+             -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \
+             -e 's/@''GNULIB_SOCKET''@/$(GNULIB_SOCKET)/g' \
+             -e 's/@''GNULIB_CONNECT''@/$(GNULIB_CONNECT)/g' \
+             -e 's/@''GNULIB_ACCEPT''@/$(GNULIB_ACCEPT)/g' \
+             -e 's/@''GNULIB_BIND''@/$(GNULIB_BIND)/g' \
+             -e 's/@''GNULIB_GETPEERNAME''@/$(GNULIB_GETPEERNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKNAME''@/$(GNULIB_GETSOCKNAME)/g' \
+             -e 's/@''GNULIB_GETSOCKOPT''@/$(GNULIB_GETSOCKOPT)/g' \
+             -e 's/@''GNULIB_LISTEN''@/$(GNULIB_LISTEN)/g' \
+             -e 's/@''GNULIB_RECV''@/$(GNULIB_RECV)/g' \
+             -e 's/@''GNULIB_SEND''@/$(GNULIB_SEND)/g' \
+             -e 's/@''GNULIB_RECVFROM''@/$(GNULIB_RECVFROM)/g' \
+             -e 's/@''GNULIB_SENDTO''@/$(GNULIB_SENDTO)/g' \
+             -e 's/@''GNULIB_SETSOCKOPT''@/$(GNULIB_SETSOCKOPT)/g' \
+             -e 's/@''GNULIB_SHUTDOWN''@/$(GNULIB_SHUTDOWN)/g' \
+             -e 's/@''GNULIB_ACCEPT4''@/$(GNULIB_ACCEPT4)/g' \
+             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+             -e 's|@''HAVE_WS2TCPIP_H''@|$(HAVE_WS2TCPIP_H)|g' \
+             -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE''@|$(HAVE_STRUCT_SOCKADDR_STORAGE)|g' \
+             -e 's|@''HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY''@|$(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY)|g' \
+             -e 's|@''HAVE_SA_FAMILY_T''@|$(HAVE_SA_FAMILY_T)|g' \
+             -e 's|@''HAVE_ACCEPT4''@|$(HAVE_ACCEPT4)|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_socket.in.h > $@-t
+       $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
+MOSTLYCLEANDIRS += sys
+
+Include:
+<sys/socket.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+Simon Josefsson
diff --git a/modules/sys_socket-h-c++-tests b/modules/sys_socket-h-c++-tests
new file mode 100644 (file)
index 0000000..01b4681
--- /dev/null
@@ -0,0 +1,19 @@
+Files:
+tests/test-sys_socket-h-c++.cc
+tests/signature.h
+
+Status:
+c++-test
+
+Depends-on:
+ansi-c++-opt
+
+configure.ac:
+
+Makefile.am:
+if ANSICXX
+TESTS += test-sys_socket-h-c++
+check_PROGRAMS += test-sys_socket-h-c++
+test_sys_socket_h_c___SOURCES = test-sys_socket-h-c++.cc
+test_sys_socket_h_c___LDADD = $(LDADD) $(LIBINTL) $(LIBSOCKET) $(NANOSLEEP_LIB)
+endif
similarity index 55%
rename from modules/sys_socket-tests
rename to modules/sys_socket-h-tests
index 651d22c65fcc473d91d4d8372d1ab97d90489e5b..4b1f7b8a845242e0ff140a92355cab25b36302be 100644 (file)
@@ -1,10 +1,10 @@
 Files:
-tests/test-sys_socket.c
+tests/test-sys_socket-h.c
 
 Depends-on:
 assert-h
 intprops
-sys_socket-c++-tests
+sys_socket-h-c++-tests
 
 configure.ac:
 AC_CHECK_FUNCS_ONCE([shutdown])
@@ -12,5 +12,5 @@ gl_SOCKET_FAMILIES
 gl_SOCKET_FAMILY_UNIX
 
 Makefile.am:
-TESTS += test-sys_socket
-check_PROGRAMS += test-sys_socket
+TESTS += test-sys_socket-h
+check_PROGRAMS += test-sys_socket-h
index 21505946a87434973e1355bd5d1ef468524c344b..3c1b3ba505f71d66a031faf2f3888e5d209c3f0a 100644 (file)
@@ -8,7 +8,7 @@ m4/sys_un_h.m4
 Depends-on:
 gen-header
 include_next
-sys_socket
+sys_socket-h
 
 configure.ac:
 gl_SYS_UN_H