From: Bruno Haible Date: Wed, 24 Jul 2024 23:27:32 +0000 (+0200) Subject: Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=61c918b3a6492556e7dbc94ec2916e785fd72d85;p=gnulib.git Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (shutdown): Don't define to shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib module 'shutdown' is in use under the same configure.ac. --- diff --git a/ChangeLog b/ChangeLog index 9081e60c8f..f6b9d97c1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2024-07-24 Bruno Haible + Avoid false shutdown_used_without_requesting_gnulib_module_shutdown. + * modules/shutdown (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/sys_socket.in.h (shutdown): Don't define to + shutdown_used_without_requesting_gnulib_module_shutdown if the gnulib + module 'shutdown' is in use under the same configure.ac. + Avoid false setsockopt_used_without_requesting_gnulib_module_setsockopt. * modules/setsockopt (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/sys_socket.in.h (setsockopt): Don't define to diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index 2c7fdcf1a8..ac28bab1b8 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -720,8 +720,10 @@ _GL_CXXALIAS_SYS (shutdown, int, (int fd, int how)); # endif _GL_CXXALIASWARN (shutdown); #elif @HAVE_WINSOCK2_H@ -# undef shutdown -# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +# if !GNULIB_SHUTDOWN +# undef shutdown +# define shutdown shutdown_used_without_requesting_gnulib_module_shutdown +# endif #elif defined GNULIB_POSIXCHECK # undef shutdown # if HAVE_RAW_DECL_SHUTDOWN diff --git a/modules/shutdown b/modules/shutdown index 6af957a9c2..a2ff50f7c5 100644 --- a/modules/shutdown +++ b/modules/shutdown @@ -15,6 +15,7 @@ configure.ac: AC_REQUIRE([gl_SYS_SOCKET_H]) gl_CONDITIONAL([GL_COND_OBJ_SHUTDOWN], [test "$ac_cv_header_winsock2_h" = yes]) gl_SYS_SOCKET_MODULE_INDICATOR([shutdown]) +gl_MODULE_INDICATOR([shutdown]) Makefile.am: if GL_COND_OBJ_SHUTDOWN