split out NULL from stddef header

This commit is contained in:
auronandace
2026-06-02 16:56:12 +01:00
parent 7e546be11a
commit 4f5d535ebc
6 changed files with 22 additions and 5 deletions
+11
View File
@@ -0,0 +1,11 @@
# POSIX header spec: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stddef.h.html
#
# This type is split out to prevent importing all of stddef.h into other headers.
#
# POSIX headers that require NULL (without the rest of stddef.h):
# - locale.h
# - stddef.h (where it should be defined)
# - time.h
include_guard = "_RELIBC_BITS_NULL_T_H"
language = "C"
no_includes = true
+5
View File
@@ -0,0 +1,5 @@
use crate::platform::types::c_void;
/// Null pointer constant.
#[expect(clippy::zero_ptr)]
pub const NULL: *mut c_void = 0 as *mut c_void;