]> Savannah Git Hosting - gnulib.git/commitdiff
posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode.
authorBruno Haible <bruno@clisp.org>
Wed, 18 Nov 2020 01:49:19 +0000 (02:49 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 18 Nov 2020 01:49:19 +0000 (02:49 +0100)
Reported by Tom G. Christensen <tgc@jupiterrise.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.

* m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in
C++ mode.

ChangeLog
m4/posixcheck.m4

index fcf2a3c1a458ab6a30b37f545d0ccd16d371e53e..657768f3b55247248ea127bcb49c53856311e2c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-11-17  Bruno Haible  <bruno@clisp.org>
+
+       posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode.
+       Reported by Tom G. Christensen <tgc@jupiterrise.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2020-11/msg00062.html>.
+       * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in
+       C++ mode.
+
 2020-11-17  Bruno Haible  <bruno@clisp.org>
 
        Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04).
index d9a3d6caddca2ca7066615340b1771d01d8bdb91..2ee1b258c03929e56150eabcd39d542e0ac71ab5 100644 (file)
@@ -6,7 +6,11 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_POSIXCHECK],
 [
-  AC_DEFINE([GNULIB_POSIXCHECK], [1],
-    [Define to enable warnings for determining which Gnulib modules to use,
-     for portability of POSIX functions.])
+  AH_VERBATIM([POSIXCHECK],
+    [/* Define to enable warnings for determining which Gnulib modules to use, for
+   portability of POSIX functions.  This does not work well in C++ mode.  */
+#ifndef __cplusplus
+# define GNULIB_POSIXCHECK 1
+#endif
+])
 ])