From: Bruno Haible Date: Wed, 24 Jul 2024 23:21:45 +0000 (+0200) Subject: Avoid false sendto_used_without_requesting_gnulib_module_sendto. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=cfb44cc6bdac19c9d8d623ab92bd7bce08f554a5;p=gnulib.git Avoid false sendto_used_without_requesting_gnulib_module_sendto. * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (sendto): Don't define to sendto_used_without_requesting_gnulib_module_sendto if the gnulib module 'sendto' is in use under the same configure.ac. --- diff --git a/ChangeLog b/ChangeLog index b87f4aa335..f5ab2db76c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false sendto_used_without_requesting_gnulib_module_sendto. + * modules/sendto (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (sendto): Don't define to + sendto_used_without_requesting_gnulib_module_sendto if the gnulib module + 'sendto' is in use under the same configure.ac. + 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 diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index f8ed41d8ec..518a25e62c 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -663,8 +663,10 @@ _GL_CXXALIAS_SYS_CAST (sendto, ssize_t, # endif _GL_CXXALIASWARN (sendto); #elif @HAVE_WINSOCK2_H@ -# undef sendto -# define sendto sendto_used_without_requesting_gnulib_module_sendto +# if !GNULIB_SENDTO +# undef sendto +# define sendto sendto_used_without_requesting_gnulib_module_sendto +# endif #elif defined GNULIB_POSIXCHECK # undef sendto # if HAVE_RAW_DECL_SENDTO diff --git a/modules/sendto b/modules/sendto index a5d4d5702c..56cee15fc4 100644 --- a/modules/sendto +++ b/modules/sendto @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SENDTO], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([sendto]) +gl_MODULE_INDICATOR([sendto]) Makefile.am: if GL_COND_OBJ_SENDTO