From 18c0121132cda22176a7ea34c638d80c9e14faea Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 5 Sep 2016 18:02:37 +0000 Subject: Define libcpp's HAVE_DESIGNATED_INITIALIZERS in a defined and portable way. MFC after: 3 days --- contrib/gcclibs/libcpp/system.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'contrib/gcclibs/libcpp/system.h') diff --git a/contrib/gcclibs/libcpp/system.h b/contrib/gcclibs/libcpp/system.h index e08bdf12faea..da015e244970 100644 --- a/contrib/gcclibs/libcpp/system.h +++ b/contrib/gcclibs/libcpp/system.h @@ -347,9 +347,12 @@ extern void abort (void); ??? C99 designated initializers are not supported by most C++ compilers, including G++. -- gdr, 2005-05-18 */ #if !defined(HAVE_DESIGNATED_INITIALIZERS) -#define HAVE_DESIGNATED_INITIALIZERS \ - ((!defined(__cplusplus) && (GCC_VERSION >= 2007)) \ - || (__STDC_VERSION__ >= 199901L)) +# if (!defined(__cplusplus) && (GCC_VERSION >= 2007)) \ + ||(__STDC_VERSION__ >= 199901L) +# define HAVE_DESIGNATED_INITIALIZERS 1 +# else +# define HAVE_DESIGNATED_INITIALIZERS 0 +# endif #endif /* Be conservative and only use enum bitfields with GCC. -- cgit v1.2.3