Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/include Pull up following revision(s) (requested by maya ...



details:   https://anonhg.NetBSD.org/src/rev/5b7b5332805e
branches:  netbsd-8
changeset: 451638:5b7b5332805e
user:      martin <martin%NetBSD.org@localhost>
date:      Wed May 29 16:00:02 2019 +0000

description:
Pull up following revision(s) (requested by maya in ticket #1275):

        include/assert.h: revision 1.23

Limit static_assert visibility to C11.

The existing definition caused issues as GCC only provides _Static_assert
when building C11 code.

This follows the C standard: static_assert available since C11.

Fixes https://rt.perl.org/Public/Bug/Display.html?id=134023

diffstat:

 include/assert.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r a225886e312e -r 5b7b5332805e include/assert.h
--- a/include/assert.h  Wed May 29 15:57:38 2019 +0000
+++ b/include/assert.h  Wed May 29 16:00:02 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: assert.h,v 1.22 2016/10/03 12:08:39 kamil Exp $        */
+/*     $NetBSD: assert.h,v 1.22.6.1 2019/05/29 16:00:02 martin Exp $   */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -105,7 +105,7 @@
 __END_DECLS
 #endif /* __ASSERT_DECLARED */
 
-#if ((__cplusplus - 0) < 201103L)
+#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
 #ifndef static_assert
 #define static_assert _Static_assert
 #endif /* static_assert */



Home | Main Index | Thread Index | Old Index