From 52bcbf0cbb87261238d3687bdce6c36e15689f9a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 25 Jul 2024 00:49:21 +0200 Subject: [PATCH] Avoid false bind_used_without_requesting_gnulib_module_bind. * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (bind): Don't define to bind_used_without_requesting_gnulib_module_bind if the gnulib module 'bind' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/bind | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 79a60e1328..9129eae652 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false bind_used_without_requesting_gnulib_module_bind. + * modules/bind (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (bind): Don't define to + bind_used_without_requesting_gnulib_module_bind if the gnulib module + 'bind' is in use under the same configure.ac. + 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index cf20718ade..bc57bd2b9e 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -398,8 +398,10 @@ _GL_CXXALIAS_SYS_CAST (bind, int, # endif _GL_CXXALIASWARN (bind); #elif @HAVE_WINSOCK2_H@ -# undef bind -# define bind bind_used_without_requesting_gnulib_module_bind +# if !GNULIB_BIND +# undef bind +# define bind bind_used_without_requesting_gnulib_module_bind +# endif #elif defined GNULIB_POSIXCHECK # undef bind # if HAVE_RAW_DECL_BIND diff --git a/modules/bind b/modules/bind index f58407830e..6d2b888b0d 100644 --- a/modules/bind +++ b/modules/bind @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_BIND], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([bind]) +gl_MODULE_INDICATOR([bind]) Makefile.am: if GL_COND_OBJ_BIND -- 2.39.5