blob: d35740f47a4722da38d600efc28371bf95f045ba [file] [log] [blame]
Eric Engestrom9668d7f2019-07-23 13:44:33 +01001/* Copyright 2019 Intel Corporation */
2/* SPDX-License-Identifier: MIT */
3
4#include "no_extern_c.h"
5
6#ifndef _C11_COMPAT_H_
7#define _C11_COMPAT_H_
8
9#if defined(__cplusplus)
10 /* This is C++ code, not C */
11#elif (__STDC_VERSION__ >= 201112L)
12 /* Already C11 */
13#else
14
15
16/*
17 * C11 static_assert() macro
18 * assert.h only defines that name for C11 and above
19 */
20#ifndef static_assert
21#define static_assert _Static_assert
22#endif
23
24
25#endif /* !C++ && !C11 */
26
27#endif /* _C11_COMPAT_H_ */