From: Bruno Haible Date: Wed, 24 Jul 2024 23:16:05 +0000 (+0200) Subject: Avoid false recv_used_without_requesting_gnulib_module_recv. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=8a1636250de75b35eeb605e3ba472debbe19b24d;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index f9b86bb0f6..ad873a2d06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index a5e8ee63e7..7e9562c535 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -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 diff --git a/modules/recv b/modules/recv index 8c27a42208..18d81bba88 100644 --- a/modules/recv +++ b/modules/recv @@ -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