From: Bruno Haible Date: Wed, 24 Jul 2024 22:49:21 +0000 (+0200) Subject: Avoid false bind_used_without_requesting_gnulib_module_bind. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=66986ab46ba7390a079b784c76502a43b697f74c;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 81e7fb8f1f..57531e09f8 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