cjson: bump to version 1.4.3
[buildroot-gz.git] / package / musl-compat-headers / cdefs.h
blob6fe7aa435d9adb95755a2f50170e67e8f913f575
1 /* Copyright (C) 2016 Yann E. MORIN <yann.morin.1998@free.fr>
3 * This file is in the Public Domain.
5 * For jurisdictions in which the Public Domain does not exist
6 * or it is not otherwise applicable, this file is licensed CC0
7 * (Creative Commons Zero).
8 */
10 /* This file contains definitions for non-standard macros defined by
11 * glibc, but quite commonly used in packages.
13 * Because they are non-standard, musl does not define those macros.
14 * It does not provide cdefs.h either.
16 * This file is a compatibility header written from scratch, to be
17 * installed when the C library is musl.
19 * Not all macros from the glibc's cdefs.h are available, only the
20 * most commonly used ones.
22 * Please refer to the glibc documentation and source code for
23 * explanations about those macros.
26 #ifndef BUILDROOT_SYS_CDEFS_H
27 #define BUILDROOT_SYS_CDEFS_H
29 /* Function prototypes. */
30 #undef __P
31 #define __P(arg) arg
33 /* C declarations in C++ mode. */
34 #ifdef __cplusplus
35 # define __BEGIN_DECLS extern "C" {
36 # define __END_DECLS }
37 #else
38 # define __BEGIN_DECLS
39 # define __END_DECLS
40 #endif
42 /* Don't throw exceptions in C functions. */
43 #ifndef __cplusplus
44 # define __THROW __attribute__ ((__nothrow__))
45 # define __NTH(f) __attribute__ ((__nothrow__)) f
46 #else
47 # define __THROW
48 # define __NTH(f) f
49 #endif
51 #endif /* ifndef BUILDROOT_SYS_CDEFS_H */