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

ChangeLog
lib/sys_socket.in.h
modules/recv

index 286fa75b9fb0f78bebb50d0322c44cabd3ef5533..6c8214af623c280a3f3b4c345946f5455a72c6d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       Avoid false recv_used_without_requesting_gnulib_module_recv.
+       * modules/recv (configure.ac): Invoke gl_MODULE_INDICATOR.
+       * lib/sys_socket.in.h (recv): Don't define to
+       recv_used_without_requesting_gnulib_module_recv if the gnulib module
+       'recv' is in use under the same configure.ac.
+
        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
index a5e8ee63e74a6df2dd8c333ff44cd622690a5e22..7e9562c53567798119c3b782797001c57902f989 100644 (file)
@@ -558,8 +558,10 @@ _GL_CXXALIAS_SYS_CAST (recv, ssize_t, (int fd, void *buf, size_t len, int flags)
 # endif
 _GL_CXXALIASWARN (recv);
 #elif @HAVE_WINSOCK2_H@
-# undef recv
-# define recv recv_used_without_requesting_gnulib_module_recv
+# if !GNULIB_RECV
+#  undef recv
+#  define recv recv_used_without_requesting_gnulib_module_recv
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef recv
 # if HAVE_RAW_DECL_RECV
index 8c27a42208a7aa305069c09c088eab6193168028..18d81bba88811039035cc9f7aec940fca7d73f55 100644 (file)
@@ -15,6 +15,7 @@ configure.ac:
 AC_REQUIRE([gl_SYS_SOCKET_H])
 gl_CONDITIONAL([GL_COND_OBJ_RECV], [test "$ac_cv_header_winsock2_h" = yes])
 gl_SYS_SOCKET_MODULE_INDICATOR([recv])
+gl_MODULE_INDICATOR([recv])
 
 Makefile.am:
 if GL_COND_OBJ_RECV