Module Name:    src
Committed By:   kamil
Date:           Mon May 27 07:31:11 UTC 2019

Modified Files:
        src/include: assert.h

Log Message:
As a _NETBSD_SOURCE extension define static_assert for pre-c11/c++99

Proposed on source-changes-d.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 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.23 src/include/assert.h:1.24
--- src/include/assert.h:1.23	Wed May 22 21:25:01 2019
+++ src/include/assert.h	Mon May 27 07:31:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: assert.h,v 1.23 2019/05/22 21:25:01 maya Exp $	*/
+/*	$NetBSD: assert.h,v 1.24 2019/05/27 07:31:11 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -105,8 +105,10 @@ void __diagassert13(const char *, int, c
 __END_DECLS
 #endif /* __ASSERT_DECLARED */
 
-#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
 #ifndef static_assert
+#if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
 #define static_assert _Static_assert
+#elif defined(_NETBSD_SOURCE) && (__cplusplus - 0) < 201103L
+#define static_assert(x, y) __CTASSERT(x)
 #endif /* static_assert */
 #endif

Reply via email to