From: Bruno Haible Date: Wed, 24 Jul 2024 22:47:45 +0000 (+0200) Subject: Avoid false accept_used_without_requesting_gnulib_module_accept. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=f3b37cd640591511f43ac71374e71843b00b7411;p=gnulib.git Avoid false accept_used_without_requesting_gnulib_module_accept. * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (accept): Don't define to accept_used_without_requesting_gnulib_module_accept if the gnulib module 'accept' is in use under the same configure.ac. --- diff --git a/ChangeLog b/ChangeLog index ce93bbb1dc..79a60e1328 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false accept_used_without_requesting_gnulib_module_accept. + * modules/accept (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (accept): Don't define to + accept_used_without_requesting_gnulib_module_accept if the gnulib module + 'accept' is in use under the same configure.ac. + Avoid false socket_used_without_requesting_gnulib_module_connect. * modules/connect (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (connect): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 19c919c131..cf20718ade 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -366,8 +366,10 @@ _GL_CXXALIAS_SYS_CAST (accept, int, _GL_CXXALIASWARN (accept); # endif #elif @HAVE_WINSOCK2_H@ -# undef accept -# define accept accept_used_without_requesting_gnulib_module_accept +# if !GNULIB_ACCEPT +# undef accept +# define accept accept_used_without_requesting_gnulib_module_accept +# endif #elif defined GNULIB_POSIXCHECK # undef accept # if HAVE_RAW_DECL_ACCEPT diff --git a/modules/accept b/modules/accept index 483b5364ec..875d90cadb 100644 --- a/modules/accept +++ b/modules/accept @@ -16,6 +16,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_ACCEPT], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([accept]) +gl_MODULE_INDICATOR([accept]) Makefile.am: if GL_COND_OBJ_ACCEPT