diff options
author | 2025-01-23 10:41:10 +0800 | |
---|---|---|
committer | 2025-01-23 10:41:10 +0800 | |
commit | e6f77b7ea3e38c9853bee60b275f3f89d252a5b3 (patch) | |
tree | 80bfbabed9d4cbcf9fa62677f78b34279d7e2f87 /src/include/stddef.h | |
download | linux-0.11-master.tar.gz linux-0.11-master.zip |
Diffstat (limited to 'src/include/stddef.h')
-rw-r--r-- | src/include/stddef.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/stddef.h b/src/include/stddef.h new file mode 100644 index 0000000..97f72ff --- /dev/null +++ b/src/include/stddef.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef _STDDEF_H | ||
2 | #define _STDDEF_H | ||
3 | |||
4 | #ifndef _PTRDIFF_T | ||
5 | #define _PTRDIFF_T | ||
6 | typedef long ptrdiff_t; | ||
7 | #endif | ||
8 | |||
9 | #ifndef _SIZE_T | ||
10 | #define _SIZE_T | ||
11 | typedef unsigned long size_t; | ||
12 | #endif | ||
13 | |||
14 | #undef NULL | ||
15 | #define NULL ((void *)0) | ||
16 | |||
17 | #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) | ||
18 | |||
19 | #endif | ||