]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid false bind_used_without_requesting_gnulib_module_bind.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Jul 2024 22:49:21 +0000 (00:49 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 17:07:58 +0000 (19:07 +0200)
* 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
lib/sys_socket.in.h
modules/bind

index 79a60e13286540a531987bee3c46a0c1c1aa15ec..9129eae6523ad3c65e96d3ce011429c2bb689e20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       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
index cf20718ade2694222fb0cad169d7a562b24964db..bc57bd2b9e8f403c5b9146f4e7cb159c70a0f04a 100644 (file)
@@ -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
index f58407830e6e700636d073601e960149e06ce9ef..6d2b888b0deebfb6bae0997edcaac89097df8bb0 100644 (file)
@@ -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