]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
include: kernel.h: define SSIZE_MAX
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 23 Aug 2020 07:54:44 +0000 (09:54 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 24 Aug 2020 14:37:53 +0000 (16:37 +0200)
Define SSIZE_MAX, the largest value fitting into a variable of type
ssize_t.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
include/linux/kernel.h

index b88c21006591d3117cc857a36d381a5cdaf71c0f..3e71d61074b6b54786f031100961b8bbb1075069 100644 (file)
@@ -19,6 +19,9 @@
 #ifndef SIZE_MAX
 #define SIZE_MAX       (~(size_t)0)
 #endif
+#ifndef SSIZE_MAX
+#define SSIZE_MAX      ((ssize_t)(SIZE_MAX >> 1))
+#endif
 
 #define U8_MAX         ((u8)~0U)
 #define S8_MAX         ((s8)(U8_MAX>>1))