From 42d0bd045a8949ca7dc9e02428c7e057d3a936e4 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 21 Sep 2016 14:09:35 +0200 Subject: [PATCH] [liba] Update the size_t definition Change-Id: I88bf9b82956c471e5da53525e98af89bfaab5d48 --- liba/include/stddef.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/liba/include/stddef.h b/liba/include/stddef.h index 170ece5b8..628d26fd2 100644 --- a/liba/include/stddef.h +++ b/liba/include/stddef.h @@ -2,6 +2,11 @@ #define LIBA_STDDEF_H #define NULL 0 + +/* C99 says that size_t is an unsigned integer type of at least 16 bit. + * Moreover, size_t is the return type of the "sizeof" operator, which is + * defined by the compiler. That's why both GCC and clang define a __SIZE_TYPE__ + * macro to let the libc header know about the type used by the compiler. */ typedef __SIZE_TYPE__ size_t; #endif