]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid false socket_used_without_requesting_gnulib_module_socket.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Jul 2024 22:38:08 +0000 (00:38 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 16:01:05 +0000 (18:01 +0200)
* modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR.
* lib/sys_socket.in.h (socket): Don't define to
socket_used_without_requesting_gnulib_module_socket if the gnulib module
'socket' is in use under the same configure.ac.

ChangeLog
lib/sys_socket.in.h
modules/socket

index 1f53002a585110f6ef1775808285fc8f6b944c80..57c9b175ed9e012c3bbc3d7dd3892a8feb836834 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       Avoid false socket_used_without_requesting_gnulib_module_socket.
+       * modules/socket (configure.ac): Invoke gl_MODULE_INDICATOR.
+       * lib/sys_socket.in.h (socket): Don't define to
+       socket_used_without_requesting_gnulib_module_socket if the gnulib module
+       'socket' is in use under the same configure.ac.
+
        Avoid false lstat_used_without_requesting_gnulib_module_lstat.
        * modules/lstat (configure.ac): Invoke gl_MODULE_INDICATOR.
        * lib/sys_stat.in.h (lstat): Don't define to
index 13833c0fa6735b76b36ed25de078d2d7a1cbfe44..28b2d6c0e03274bfc60104d631e7319337a77a84 100644 (file)
@@ -296,8 +296,10 @@ _GL_CXXALIAS_SYS (socket, int, (int domain, int type, int protocol));
 # endif
 _GL_CXXALIASWARN (socket);
 #elif @HAVE_WINSOCK2_H@
-# undef socket
-# define socket socket_used_without_requesting_gnulib_module_socket
+# if !GNULIB_SOCKET
+#  undef socket
+#  define socket socket_used_without_requesting_gnulib_module_socket
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef socket
 # if HAVE_RAW_DECL_SOCKET
index 3670c6b8394ca602b3504ef407117c3782fde664..a67025aa6bab25da1ae13a1ce5bfb974954fe9aa 100644 (file)
@@ -25,6 +25,7 @@ if test "$ac_cv_header_winsock2_h" = yes; then
   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
 fi
 gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+gl_MODULE_INDICATOR([socket])
 
 Makefile.am:
 if GL_COND_OBJ_SOCKET