From: Bruno Haible Date: Wed, 18 Nov 2020 01:49:19 +0000 (+0100) Subject: posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode. X-Git-Tag: v1.0~3501 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=154b4c4bb430ae91b541d0a4932cdef75710c966;p=gnulib.git posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode. Reported by Tom G. Christensen in . * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in C++ mode. --- diff --git a/ChangeLog b/ChangeLog index fcf2a3c1a4..657768f3b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2020-11-17 Bruno Haible + + posixcheck: Don't enable GNULIB_POSIXCHECK in C++ mode. + Reported by Tom G. Christensen in + . + * m4/posixcheck.m4 (gl_POSIXCHECK): Don't define GNULIB_POSIXCHECK in + C++ mode. + 2020-11-17 Bruno Haible Fix error when GNULIB_POSIXCHECK is enabled (regression 2019-06-04). diff --git a/m4/posixcheck.m4 b/m4/posixcheck.m4 index d9a3d6cadd..2ee1b258c0 100644 --- a/m4/posixcheck.m4 +++ b/m4/posixcheck.m4 @@ -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 +]) ])