From 1b7ca7e50d01ffdb29a2e8b01e130fd74d94293c Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 11 Sep 2016 14:19:06 +0000 Subject: [PATCH] MFC r305430: Define libcpp's HAVE_DESIGNATED_INITIALIZERS in a defined and portable way. git-svn-id: svn://svn.freebsd.org/base/stable/10@305693 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- contrib/gcclibs/libcpp/system.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/gcclibs/libcpp/system.h b/contrib/gcclibs/libcpp/system.h index e08bdf12f..da015e244 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. -- 2.45.0