]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid false sendto_used_without_requesting_gnulib_module_sendto.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Jul 2024 23:21:45 +0000 (01:21 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 17:08:17 +0000 (19:08 +0200)
* 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.

ChangeLog
lib/sys_socket.in.h
modules/sendto

index 3027c6eaccddd5fdd56b5a677285c9eeab76e5f1..9a53cb3afc096d76fb2d9e3e04a05a76b52be949 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       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
index f8ed41d8ecad51965cc72dc09ef933e7e67d1c85..518a25e62c20e33ef8749b45ef7765384cfc9f6e 100644 (file)
@@ -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
index a5d4d5702cd15b00d8604dfd81ac138f327f2a02..56cee15fc493d8a5f2dd07036f038b76fc62f258 100644 (file)
@@ -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