From: Bruno Haible Date: Fri, 27 Dec 2024 22:39:59 +0000 (+0100) Subject: Rename module sys_socket to sys_socket-h. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=878a961759f8b1d85c4f2abfd4ed2a16099d06ae;p=thirdparty%2Fgnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 9a726228cb..c3e2732271 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2024-12-27 Bruno Haible + + 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 Rename module sys_shm to sys_shm-h. diff --git a/doc/posix-headers/sys_socket.texi b/doc/posix-headers/sys_socket.texi index 8b0a7c5725..d6084980ba 100644 --- a/doc/posix-headers/sys_socket.texi +++ b/doc/posix-headers/sys_socket.texi @@ -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 diff --git a/modules/accept b/modules/accept index 682cd2a489..f0a210eb87 100644 --- a/modules/accept +++ b/modules/accept @@ -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] diff --git a/modules/accept4 b/modules/accept4 index c1a61f5ddc..6db68372e9 100644 --- a/modules/accept4 +++ b/modules/accept4 @@ -7,7 +7,7 @@ lib/accept4.c m4/accept4.m4 Depends-on: -sys_socket +sys_socket-h accept fcntl-h binary-io diff --git a/modules/arpa_inet-h b/modules/arpa_inet-h index b18fe8ff98..ac776bea84 100644 --- a/modules/arpa_inet-h +++ b/modules/arpa_inet-h @@ -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 diff --git a/modules/bind b/modules/bind index fad39d8af2..3fa6c8bbc2 100644 --- a/modules/bind +++ b/modules/bind @@ -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] diff --git a/modules/connect b/modules/connect index 445e6f9960..5db4113dbb 100644 --- a/modules/connect +++ b/modules/connect @@ -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] diff --git a/modules/crypto/af_alg b/modules/crypto/af_alg index ec263b0149..ffb452056c 100644 --- a/modules/crypto/af_alg +++ b/modules/crypto/af_alg @@ -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: diff --git a/modules/getaddrinfo b/modules/getaddrinfo index ed36894dbf..e8d9fa995d 100644 --- a/modules/getaddrinfo +++ b/modules/getaddrinfo @@ -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] diff --git a/modules/getdomainname b/modules/getdomainname index bf8bb3475b..80f1112f0d 100644 --- a/modules/getdomainname +++ b/modules/getdomainname @@ -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 diff --git a/modules/gethostname b/modules/gethostname index 5127ed4bb7..0ba2634218 100644 --- a/modules/gethostname +++ b/modules/gethostname @@ -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] diff --git a/modules/getpeername b/modules/getpeername index 13796c7aa5..12b139d3dc 100644 --- a/modules/getpeername +++ b/modules/getpeername @@ -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] diff --git a/modules/getsockname b/modules/getsockname index d9e6d0d3df..c4732bc177 100644 --- a/modules/getsockname +++ b/modules/getsockname @@ -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] diff --git a/modules/getsockopt b/modules/getsockopt index be3474beb2..9bbc6685fb 100644 --- a/modules/getsockopt +++ b/modules/getsockopt @@ -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] diff --git a/modules/hostent b/modules/hostent index 57ff594a20..7f9bb5943c 100644 --- a/modules/hostent +++ b/modules/hostent @@ -7,7 +7,7 @@ Files: m4/hostent.m4 Depends-on: -sys_socket +sys_socket-h configure.ac: gl_HOSTENT diff --git a/modules/inet_ntop b/modules/inet_ntop index d83f742a0b..fa6979b2ee 100644 --- a/modules/inet_ntop +++ b/modules/inet_ntop @@ -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] diff --git a/modules/inet_ntop-tests b/modules/inet_ntop-tests index 62b42175c8..999260c8fd 100644 --- a/modules/inet_ntop-tests +++ b/modules/inet_ntop-tests @@ -5,7 +5,7 @@ tests/macros.h Depends-on: netinet_in-h -sys_socket +sys_socket-h configure.ac: AC_C_BIGENDIAN diff --git a/modules/inet_pton b/modules/inet_pton index b09fc558cf..902e48434a 100644 --- a/modules/inet_pton +++ b/modules/inet_pton @@ -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] diff --git a/modules/inet_pton-tests b/modules/inet_pton-tests index 4e65e3816c..6d9004492a 100644 --- a/modules/inet_pton-tests +++ b/modules/inet_pton-tests @@ -5,7 +5,7 @@ tests/macros.h Depends-on: netinet_in-h -sys_socket +sys_socket-h configure.ac: AC_C_BIGENDIAN diff --git a/modules/ioctl b/modules/ioctl index eeb4d7089e..7d9af96941 100644 --- a/modules/ioctl +++ b/modules/ioctl @@ -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] diff --git a/modules/listen b/modules/listen index a44b664e00..ec7a605318 100644 --- a/modules/listen +++ b/modules/listen @@ -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] diff --git a/modules/net_if-h b/modules/net_if-h index d1b4865bdb..8b657857c3 100644 --- a/modules/net_if-h +++ b/modules/net_if-h @@ -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 diff --git a/modules/netdb-h b/modules/netdb-h index b81d389cd1..6f303c99be 100644 --- a/modules/netdb-h +++ b/modules/netdb-h @@ -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 diff --git a/modules/netinet_in-h b/modules/netinet_in-h index 8a51447c62..916a84268c 100644 --- a/modules/netinet_in-h +++ b/modules/netinet_in-h @@ -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 diff --git a/modules/nonblocking b/modules/nonblocking index 933c6f4a7e..6d059d4aaa 100644 --- a/modules/nonblocking +++ b/modules/nonblocking @@ -15,7 +15,7 @@ ioctl msvc-nothrow stdbool-h stdio-h -sys_socket +sys_socket-h unistd configure.ac: diff --git a/modules/nonblocking-socket-tests b/modules/nonblocking-socket-tests index f7a98cbd45..bd20609807 100644 --- a/modules/nonblocking-socket-tests +++ b/modules/nonblocking-socket-tests @@ -13,7 +13,7 @@ tests/macros.h Depends-on: stdbool-h unistd -sys_socket +sys_socket-h nonblocking wait-process environ diff --git a/modules/passfd b/modules/passfd index 5e5c15f559..406601dfdd 100644 --- a/modules/passfd +++ b/modules/passfd @@ -8,7 +8,7 @@ m4/passfd.m4 Depends-on: cloexec -sys_socket +sys_socket-h socketlib configure.ac: diff --git a/modules/poll b/modules/poll index ce77e998c9..917242b6b4 100644 --- a/modules/poll +++ b/modules/poll @@ -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] diff --git a/modules/poll-tests b/modules/poll-tests index e6663a09c4..423bd40d93 100644 --- a/modules/poll-tests +++ b/modules/poll-tests @@ -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 diff --git a/modules/posixcheck b/modules/posixcheck index 04fc89cc16..a07960fa3a 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -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 diff --git a/modules/recv b/modules/recv index 437e489096..02b91f7eb3 100644 --- a/modules/recv +++ b/modules/recv @@ -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] diff --git a/modules/recvfrom b/modules/recvfrom index d32f7d5fcb..d2798cab4b 100644 --- a/modules/recvfrom +++ b/modules/recvfrom @@ -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] diff --git a/modules/select-tests b/modules/select-tests index 77b26b7e73..f3a6ef01d2 100644 --- a/modules/select-tests +++ b/modules/select-tests @@ -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 diff --git a/modules/send b/modules/send index 26815365a9..38c47e83cc 100644 --- a/modules/send +++ b/modules/send @@ -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] diff --git a/modules/sendto b/modules/sendto index 43a9ddb92b..09fc0ec527 100644 --- a/modules/sendto +++ b/modules/sendto @@ -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] diff --git a/modules/servent b/modules/servent index 1e0d82636a..e2b0f9646b 100644 --- a/modules/servent +++ b/modules/servent @@ -9,7 +9,7 @@ Files: m4/servent.m4 Depends-on: -sys_socket +sys_socket-h configure.ac: gl_SERVENT diff --git a/modules/setsockopt b/modules/setsockopt index 2023a428d2..59a5a2f40c 100644 --- a/modules/setsockopt +++ b/modules/setsockopt @@ -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] diff --git a/modules/shutdown b/modules/shutdown index 599058a4f5..806112df4e 100644 --- a/modules/shutdown +++ b/modules/shutdown @@ -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] diff --git a/modules/socket b/modules/socket index e98099077b..a4a9e1321d 100644 --- a/modules/socket +++ b/modules/socket @@ -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] diff --git a/modules/sockets b/modules/sockets index 529728c232..0b692c4641 100644 --- a/modules/sockets +++ b/modules/sockets @@ -9,7 +9,7 @@ m4/sockets.m4 Depends-on: socketlib -sys_socket +sys_socket-h fd-hook msvc-nothrow diff --git a/modules/sys_socket b/modules/sys_socket index bbd337f789..4a479a4ad0 100644 --- a/modules/sys_socket +++ b/modules/sys_socket @@ -1,74 +1,20 @@ Description: A POSIX-like . +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 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: @@ -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 index 0d7a63a8ef..0000000000 --- a/modules/sys_socket-c++-tests +++ /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 index 0000000000..bbd337f789 --- /dev/null +++ b/modules/sys_socket-h @@ -0,0 +1,80 @@ +Description: +A POSIX-like . + +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 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: + + +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 index 0000000000..01b468165e --- /dev/null +++ b/modules/sys_socket-h-c++-tests @@ -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 diff --git a/modules/sys_socket-tests b/modules/sys_socket-h-tests similarity index 55% rename from modules/sys_socket-tests rename to modules/sys_socket-h-tests index 651d22c65f..4b1f7b8a84 100644 --- a/modules/sys_socket-tests +++ b/modules/sys_socket-h-tests @@ -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 diff --git a/modules/sys_un b/modules/sys_un index 21505946a8..3c1b3ba505 100644 --- a/modules/sys_un +++ b/modules/sys_un @@ -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 diff --git a/tests/test-sys_socket-c++.cc b/tests/test-sys_socket-h-c++.cc similarity index 100% rename from tests/test-sys_socket-c++.cc rename to tests/test-sys_socket-h-c++.cc diff --git a/tests/test-sys_socket.c b/tests/test-sys_socket-h.c similarity index 100% rename from tests/test-sys_socket.c rename to tests/test-sys_socket-h.c