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).
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. */
33 /* C declarations in C++ mode. */
35 # define __BEGIN_DECLS extern "C" {
36 # define __END_DECLS }
38 # define __BEGIN_DECLS
42 /* Don't throw exceptions in C functions. */
44 # define __THROW __attribute__ ((__nothrow__))
45 # define __NTH(f) __attribute__ ((__nothrow__)) f
51 #endif /* ifndef BUILDROOT_SYS_CDEFS_H */