[PATCH] include: define SSIZE_MAX in <linux/limits.h>

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Sep 30 08:38:19 PDT 2022


For symmetry with SIZE_MAX, which we already define, define SIZE_MAX as
well. Definition taken from Linux.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/linux/limits.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/limits.h b/include/linux/limits.h
index e1aa2de84519..eab3848bbf7a 100644
--- a/include/linux/limits.h
+++ b/include/linux/limits.h
@@ -19,6 +19,7 @@
 #define SIZE_MAX	(~(size_t)0)
 #define PHYS_ADDR_MAX	(~(phys_addr_t)0)
 #define UINTPTR_MAX	ULONG_MAX
+#define SSIZE_MAX	((ssize_t)(SIZE_MAX >> 1))
 
 #define U8_MAX		((u8)~0U)
 #define S8_MAX		((s8)(U8_MAX >> 1))
-- 
2.30.2




More information about the barebox mailing list