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

ChangeLog
lib/sys_socket.in.h
modules/getsockopt

index 9a48a5e0705508ca83b38615d03d516cc0f04539..f1fcc7306f0a383b8aa8ce13b6321df74ef1d48a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-07-24  Bruno Haible  <bruno@clisp.org>
 
+       Avoid false getsockopt_used_without_requesting_gnulib_module_getsockopt.
+       * modules/getsockopt (configure.ac): Invoke gl_MODULE_INDICATOR.
+       * lib/sys_socket.in.h (getsockopt): Don't define to
+       getsockopt_used_without_requesting_gnulib_module_getsockopt if the
+       gnulib module 'getsockopt' is in use under the same configure.ac.
+
        Avoid false getsockname_used_without_requesting_gnulib_module_getsockname.
        * modules/getsockname (configure.ac): Invoke gl_MODULE_INDICATOR.
        * lib/sys_socket.in.h (getsockname): Don't define to
index f19403d1f0c111e8b1bb20364831e140d9b2d171..ce217cdadb804dfa07f63f5ec5d4cf20a45f5f4d 100644 (file)
@@ -504,8 +504,10 @@ _GL_CXXALIAS_SYS_CAST (getsockopt, int,
 # endif
 _GL_CXXALIASWARN (getsockopt);
 #elif @HAVE_WINSOCK2_H@
-# undef getsockopt
-# define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
+# if !GNULIB_GETSOCKOPT
+#  undef getsockopt
+#  define getsockopt getsockopt_used_without_requesting_gnulib_module_getsockopt
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getsockopt
 # if HAVE_RAW_DECL_GETSOCKOPT
index 7749995a60bf663a700f8f0cd0137e0a93fafa1c..26d53f7534e1df2a7be641dc9e0c23f726005288 100644 (file)
@@ -18,6 +18,7 @@ AC_REQUIRE([gl_SYS_SOCKET_H])
 gl_CONDITIONAL([GL_COND_OBJ_GETSOCKOPT],
                [test "$ac_cv_header_winsock2_h" = yes])
 gl_SYS_SOCKET_MODULE_INDICATOR([getsockopt])
+gl_MODULE_INDICATOR([getsockopt])
 
 Makefile.am:
 if GL_COND_OBJ_GETSOCKOPT