DF-5702 / kernel_strtoq_shim.h
/* Kernel-source shims: replace <sys/param.h> <sys/systm.h> <sys/ctype.h> * <machine/limits.h> so the untouched kernel parser body compiles userland. * Kernel ctype macros (sys/sys/ctype.h:43-51) are byte-identical in * semantics to userland C-locale ctype(3) for all 256 byte values. */ #ifndef KERNEL_STRTOQ_SHIM_H #define KERNEL_STRTOQ_SHIM_H #include <sys/types.h> /* quad_t, u_quad_t */ #include <ctype.h> /* isspace isdigit isalpha isupper isxdigit isascii */ #include <stdint.h> #include <stddef.h> /* NULL (kernel gets it from <sys/systm.h>) */ #include <limits.h> /* userland <sys/limits.h> already provides identical definitions */ #ifndef QUAD_MAX #define QUAD_MAX INT64_MAX #endif #ifndef QUAD_MIN #define QUAD_MIN INT64_MIN #endif #ifndef UQUAD_MAX #define UQUAD_MAX UINT64_MAX #endif #endif |