| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: assert.h,v 1.24 2019/05/27 07:31:11 kamil Exp $ */ | | 1 | /* $NetBSD: assert.h,v 1.25 2020/04/17 15:22:34 kamil Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1992, 1993 | | 4 | * Copyright (c) 1992, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * (c) UNIX System Laboratories, Inc. | | 6 | * (c) UNIX System Laboratories, Inc. |
7 | * All or some portions of this file are derived from material licensed | | 7 | * All or some portions of this file are derived from material licensed |
8 | * to the University of California by American Telephone and Telegraph | | 8 | * to the University of California by American Telephone and Telegraph |
9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | | 9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with |
10 | * the permission of UNIX System Laboratories, Inc. | | 10 | * the permission of UNIX System Laboratories, Inc. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -95,20 +95,18 @@ | | | @@ -95,20 +95,18 @@ |
95 | #define __assert_function__ (__static_cast(const void *,0)) | | 95 | #define __assert_function__ (__static_cast(const void *,0)) |
96 | #endif | | 96 | #endif |
97 | | | 97 | |
98 | #ifndef __ASSERT_DECLARED | | 98 | #ifndef __ASSERT_DECLARED |
99 | #define __ASSERT_DECLARED | | 99 | #define __ASSERT_DECLARED |
100 | __BEGIN_DECLS | | 100 | __BEGIN_DECLS |
101 | __dead void __assert(const char *, int, const char *); | | 101 | __dead void __assert(const char *, int, const char *); |
102 | __dead void __assert13(const char *, int, const char *, const char *); | | 102 | __dead void __assert13(const char *, int, const char *, const char *); |
103 | void __diagassert(const char *, int, const char *); | | 103 | void __diagassert(const char *, int, const char *); |
104 | void __diagassert13(const char *, int, const char *, const char *); | | 104 | void __diagassert13(const char *, int, const char *, const char *); |
105 | __END_DECLS | | 105 | __END_DECLS |
106 | #endif /* __ASSERT_DECLARED */ | | 106 | #endif /* __ASSERT_DECLARED */ |
107 | | | 107 | |
108 | #ifndef static_assert | | | |
109 | #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L | | 108 | #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L |
| | | 109 | #ifndef static_assert |
110 | #define static_assert _Static_assert | | 110 | #define static_assert _Static_assert |
111 | #elif defined(_NETBSD_SOURCE) && (__cplusplus - 0) < 201103L | | | |
112 | #define static_assert(x, y) __CTASSERT(x) | | | |
113 | #endif /* static_assert */ | | 111 | #endif /* static_assert */ |
114 | #endif | | 112 | #endif |