From: Bruno Haible Date: Wed, 24 Jul 2024 21:35:53 +0000 (+0200) Subject: Avoid false error close_used_without_requesting_gnulib_module_close. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=12abb42a3df8a2ad887c37b5a1fac07a605e8dd9;p=gnulib.git Avoid false error close_used_without_requesting_gnulib_module_close. Reported by Frédéric at . * modules/close (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/unistd.in.h (close): Don't define to close_used_without_requesting_gnulib_module_close if the gnulib module 'close' is in use under the same configure.ac. --- diff --git a/ChangeLog b/ChangeLog index 9b50f55cda..eba06aa9e2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-07-24 Bruno Haible + + Avoid false error close_used_without_requesting_gnulib_module_close. + Reported by Frédéric at . + * modules/close (configure.ac): Invoke gl_MODULE_INDICATOR. + * lib/unistd.in.h (close): Don't define to + close_used_without_requesting_gnulib_module_close if the gnulib module + 'close' is in use under the same configure.ac. + 2024-07-23 Bruno Haible getopt-posix, getopt-gnu tests: Avoid test failure on mingw. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index e01629af25..688988e9e2 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -412,8 +412,10 @@ _GL_CXXALIAS_SYS (close, int, (int fd)); # endif _GL_CXXALIASWARN (close); #elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ -# undef close -# define close close_used_without_requesting_gnulib_module_close +# if !GNULIB_CLOSE +# undef close +# define close close_used_without_requesting_gnulib_module_close +# endif #elif defined GNULIB_POSIXCHECK # undef close /* Assume close is always declared. */ diff --git a/modules/close b/modules/close index 926ea85501..fbb54063c6 100644 --- a/modules/close +++ b/modules/close @@ -14,6 +14,7 @@ configure.ac: gl_FUNC_CLOSE gl_CONDITIONAL([GL_COND_OBJ_CLOSE], [test $REPLACE_CLOSE = 1]) gl_UNISTD_MODULE_INDICATOR([close]) +gl_MODULE_INDICATOR([close]) Makefile.am: if GL_COND_OBJ_CLOSE