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>
+
+ 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).
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
+])
])