From: Bruno Haible Date: Wed, 24 Jul 2024 23:19:20 +0000 (+0200) Subject: Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e1c9a2ba5a2b4dcd3d77afab19263bf6fb939926;p=gnulib.git Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (recvfrom): Don't define to recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib module 'recvfrom' is in use under the same configure.ac. --- diff --git a/ChangeLog b/ChangeLog index 735d1f143b..b87f4aa335 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false recvfrom_used_without_requesting_gnulib_module_recvfrom. + * modules/recvfrom (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (recvfrom): Don't define to + recvfrom_used_without_requesting_gnulib_module_recvfrom if the gnulib + module 'recvfrom' is in use under the same configure.ac. + 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 72907ffb34..f8ed41d8ec 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -629,8 +629,10 @@ _GL_CXXALIAS_SYS_CAST (recvfrom, ssize_t, _GL_CXXALIASWARN (recvfrom); # endif #elif @HAVE_WINSOCK2_H@ -# undef recvfrom -# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +# if !GNULIB_RECVFROM +# undef recvfrom +# define recvfrom recvfrom_used_without_requesting_gnulib_module_recvfrom +# endif #elif defined GNULIB_POSIXCHECK # undef recvfrom # if HAVE_RAW_DECL_RECVFROM diff --git a/modules/recvfrom b/modules/recvfrom index cbf7e3a663..3cdd0a70a6 100644 --- a/modules/recvfrom +++ b/modules/recvfrom @@ -17,6 +17,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_RECVFROM], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([recvfrom]) +gl_MODULE_INDICATOR([recvfrom]) Makefile.am: if GL_COND_OBJ_RECVFROM