summaryrefslogtreecommitdiff
path: root/lib/mesa/include/c11_compat.h
blob: d35740f47a4722da38d600efc28371bf95f045ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Copyright 2019 Intel Corporation */
/* SPDX-License-Identifier: MIT */

#include "no_extern_c.h"

#ifndef _C11_COMPAT_H_
#define _C11_COMPAT_H_

#if defined(__cplusplus)
   /* This is C++ code, not C */
#elif (__STDC_VERSION__ >= 201112L)
   /* Already C11 */
#else


/*
 * C11 static_assert() macro
 * assert.h only defines that name for C11 and above
 */
#ifndef static_assert
#define static_assert _Static_assert
#endif


#endif /* !C++ && !C11 */

#endif /* _C11_COMPAT_H_ */