]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid false listen_used_without_requesting_gnulib_module_listen.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Jul 2024 23:14:25 +0000 (01:14 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 17:08:08 +0000 (19:08 +0200)
* modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (listen): Don't define to
listen_used_without_requesting_gnulib_module_listen if the gnulib module
'listen' is in use under the same configure.ac.

ChangeLog
lib/sys_socket.in.h
modules/listen

index 665046327ef5c12cef6a49ec16966b4f3144b87c..286fa75b9fb0f78bebb50d0322c44cabd3ef5533 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       Avoid false listen_used_without_requesting_gnulib_module_listen.
+       * modules/listen (configure.ac): Invoke gl_MODULE_INDICATOR.
+       * lib/sys_socket.in.h (listen): Don't define to
+       listen_used_without_requesting_gnulib_module_listen if the gnulib module
+       'listen' is in use under the same configure.ac.
+
        Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt.
        * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR.
        * lib/sys_socket.in.h (getsockopt): Don't define to
index ce217cdadb804dfa07f63f5ec5d4cf20a45f5f4d..a5e8ee63e74a6df2dd8c333ff44cd622690a5e22 100644 (file)
@@ -529,8 +529,10 @@ _GL_CXXALIAS_SYS (listen, int, (int fd, int backlog));
 # endif
 _GL_CXXALIASWARN (listen);
 #elif @HAVE_WINSOCK2_H@
-# undef listen
-# define listen listen_used_without_requesting_gnulib_module_listen
+# if !GNULIB_LISTEN
+#  undef listen
+#  define listen listen_used_without_requesting_gnulib_module_listen
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef listen
 # if HAVE_RAW_DECL_LISTEN
index 877bc14bdcb82213205c2d85b7d390372c8e0e4a..7eae89b3611a3300db5a54e21fd70c92e06754b5 100644 (file)
@@ -15,6 +15,7 @@ configure.ac:
 AC_REQUIRE([gl_SYS_SOCKET_H])
 gl_CONDITIONAL([GL_COND_OBJ_LISTEN], [test "$ac_cv_header_winsock2_h" = yes])
 gl_SYS_SOCKET_MODULE_INDICATOR([listen])
+gl_MODULE_INDICATOR([listen])
 
 Makefile.am:
 if GL_COND_OBJ_LISTEN