XenevaOS
Loading...
Searching...
No Matches
stddef.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2#ifndef _UAPI_LINUX_STDDEF_H
3#define _UAPI_LINUX_STDDEF_H
4
5#ifdef __KERNEL__
7#endif
8
9#ifndef __always_inline
10#define __always_inline inline
11#endif
12
13/* Not all C++ standards support type declarations inside an anonymous union */
14#ifndef __cplusplus
15#define __struct_group_tag(TAG) TAG
16#else
17#define __struct_group_tag(TAG)
18#endif
19
35#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
36 union { \
37 struct { MEMBERS } ATTRS; \
38 struct __struct_group_tag(TAG) { MEMBERS } ATTRS NAME; \
39 } ATTRS
40
41#ifdef __cplusplus
42/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */
43#define __DECLARE_FLEX_ARRAY(T, member) \
44 T member[0]
45#else
56#define __DECLARE_FLEX_ARRAY(TYPE, NAME) \
57 struct { \
58 struct { } __empty_ ## NAME; \
59 TYPE NAME[]; \
60 }
61#endif
62
63#ifndef __counted_by
64#define __counted_by(m)
65#endif
66
67#ifndef __counted_by_le
68#define __counted_by_le(m)
69#endif
70
71#ifndef __counted_by_be
72#define __counted_by_be(m)
73#endif
74
75#ifndef __counted_by_ptr
76#define __counted_by_ptr(m)
77#endif
78
79#ifdef __KERNEL__
80#define __kernel_nonstring __nonstring
81#else
82#define __kernel_nonstring
83#endif
84
85#endif /* _UAPI_LINUX_STDDEF_H */