]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid false error close_used_without_requesting_gnulib_module_close.
authorBruno Haible <bruno@clisp.org>
Wed, 24 Jul 2024 21:35:53 +0000 (23:35 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 12 Aug 2024 17:07:20 +0000 (19:07 +0200)
Reported by Frédéric at <https://savannah.gnu.org/bugs/?65958>.

* 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.

ChangeLog
lib/unistd.in.h
modules/close

index a1a8fb16fa69c5ec89559da8c4c48ed2aa69e117..81cb51b146cdbbd3beca88e8745d4bfbb29530e1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-07-24  Bruno Haible  <bruno@clisp.org>
+
+       Avoid false error close_used_without_requesting_gnulib_module_close.
+       Reported by Frédéric at <https://savannah.gnu.org/bugs/?65958>.
+       * 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  <bruno@clisp.org>
 
        getopt-posix, getopt-gnu tests: Avoid test failure on mingw.
index 0983dbc8b1b9954ddc7b93b0270538639b27af7f..8e06707a31d3ea6440db49a777ac2c44ebf5fd27 100644 (file)
@@ -411,8 +411,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.  */
index 926ea855017a676372b90ec5185ea9318f8aa899..fbb54063c6bc989b68254894450c3ae800601aa0 100644 (file)
@@ -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