From cf0893b3be07450f3e336aece8e7bf17a3c09272 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 25 Jul 2024 01:17:33 +0200 Subject: [PATCH] Avoid false send_used_without_requesting_gnulib_module_send. * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (send): Don't define to send_used_without_requesting_gnulib_module_send if the gnulib module 'send' is in use under the same configure.ac. --- ChangeLog | 6 ++++++ lib/sys_socket.in.h | 6 ++++-- modules/send | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad873a2d06..92094d00ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false send_used_without_requesting_gnulib_module_send. + * modules/send (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (send): Don't define to + send_used_without_requesting_gnulib_module_send if the gnulib module + 'send' is in use under the same configure.ac. + 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 7e9562c535..72907ffb34 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -590,8 +590,10 @@ _GL_CXXALIAS_SYS_CAST (send, ssize_t, # endif _GL_CXXALIASWARN (send); #elif @HAVE_WINSOCK2_H@ -# undef send -# define send send_used_without_requesting_gnulib_module_send +# if !GNULIB_SEND +# undef send +# define send send_used_without_requesting_gnulib_module_send +# endif #elif defined GNULIB_POSIXCHECK # undef send # if HAVE_RAW_DECL_SEND diff --git a/modules/send b/modules/send index 6584aec9ae..974d169355 100644 --- a/modules/send +++ b/modules/send @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SEND], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([send]) +gl_MODULE_INDICATOR([send]) Makefile.am: if GL_COND_OBJ_SEND -- 2.39.5