Module Name:    src
Committed By:   martin
Date:           Wed May 29 16:00:02 UTC 2019

Modified Files:
        src/include [netbsd-8]: assert.h

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.6.1 src/include/assert.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/include/assert.h
diff -u src/include/assert.h:1.22 src/include/assert.h:1.22.6.1
--- src/include/assert.h:1.22	Mon Oct  3 12:08:39 2016
+++ src/include/assert.h	Wed May 29 16:00:02 2019
@@ -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 @@ void __diagassert13(const char *, int, c
 __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 */

Reply via email to