From 0c841ec5eb35400abf2a65c58a799d4045942a8d Mon Sep 17 00:00:00 2001 From: Christian Goeschel Ndjomouo Date: Sun, 30 Nov 2025 20:14:30 -0500 Subject: [PATCH] include/c.h: add MAX_OF_UINT_TYPE macro to get max num of an uint type Signed-off-by: Christian Goeschel Ndjomouo --- include/c.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/c.h b/include/c.h index 0126591f2..e74a4486b 100644 --- a/include/c.h +++ b/include/c.h @@ -652,6 +652,7 @@ static inline int fputsln(const char *s, FILE *stream) { #endif #define SINT_MAX(t) (((t)1 << (sizeof(t) * 8 - 2)) - (t)1 + ((t)1 << (sizeof(t) * 8 - 2))) +#define MAX_OF_UINT_TYPE(t) ~((t)0) #ifndef HAVE_REALLOCARRAY static inline void *reallocarray(void *ptr, size_t nmemb, size_t size) -- 2.47.3