ck_limits.h: assure UINT*_MAX ff are available in-kernel

this should work back to at least 3.5 kernels
ck_pring
Michael Haberler 9 years ago
parent 1c3501a524
commit 383eb139ff

@ -26,6 +26,20 @@
#if defined(__linux__) && defined(__KERNEL__) #if defined(__linux__) && defined(__KERNEL__)
#include <linux/kernel.h> #include <linux/kernel.h>
#ifndef UINT8_MAX
#define UINT8_MAX ((u8)(~0U))
#endif
#ifndef UINT16_MAX
#define UINT16_MAX USHRT_MAX
#endif
#ifndef UINT32_MAX
#define UINT32_MAX UINT_MAX
#endif
#ifndef UINT64_MAX
#define UINT64_MAX ULLONG_MAX
#endif
#else #else
#include <limits.h> #include <limits.h>
#endif /* __linux__ && __KERNEL__ */ #endif /* __linux__ && __KERNEL__ */

Loading…
Cancel
Save