diff options
Diffstat (limited to 'include/compat/sys/_null.h')
-rw-r--r-- | include/compat/sys/_null.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/compat/sys/_null.h b/include/compat/sys/_null.h new file mode 100644 index 0000000..5d15401 --- /dev/null +++ b/include/compat/sys/_null.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* $OpenBSD: _null.h,v 1.2 2016/09/09 22:07:58 millert Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Written by Todd C. Miller, September 9, 2016 | ||
5 | * Public domain. | ||
6 | */ | ||
7 | |||
8 | #ifndef NULL | ||
9 | #if !defined(__cplusplus) | ||
10 | #define NULL ((void *)0) | ||
11 | #elif __cplusplus >= 201103L | ||
12 | #define NULL nullptr | ||
13 | #elif defined(__GNUG__) | ||
14 | #define NULL __null | ||
15 | #else | ||
16 | #define NULL 0L | ||
17 | #endif | ||
18 | #endif | ||