diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-01-03 16:56:59 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2012-01-03 16:56:59 +0000 |
commit | 43bbcca3be0f96f983125b85cd0c7a4637f864e1 (patch) | |
tree | bb126748e2d86431513c186fcfa1c1429493f52c /sys | |
parent | 49c626d3ec533c7027d8defde027019bdebd1d1c (diff) |
C++11 is based on C99, so make sure __ISO_C_VISIBLE gets set to 1999 if the
value of __cplusplus indicates C++11 support is turned on by the compiler.
ok guenther@, millert@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/cdefs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index 6325402b619..b9ad10d0245 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cdefs.h,v 1.31 2010/10/01 04:51:49 guenther Exp $ */ +/* $OpenBSD: cdefs.h,v 1.32 2012/01/03 16:56:58 kettenis Exp $ */ /* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */ /* @@ -350,7 +350,9 @@ * _ISOC99_SOURCE and __STDC_VERSION__ override any of the other macros since * they are non-exclusive. */ -#if defined(_ISOC99_SOURCE) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) +#if defined(_ISOC99_SOURCE) || \ + (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901) || \ + (defined(__cplusplus) && __cplusplus >= 201103) # undef __ISO_C_VISIBLE # define __ISO_C_VISIBLE 1999 #endif |