Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8226
-gerrit
commit b9b29efcc10aeb3bbcc1db38cb8b71985b6b4319 Author: Zhuo-Hao Lee zhuo-hao.lee@intel.com Date: Wed Jan 14 23:28:52 2015 +0100
include/stdlib.h: Add macro `FIELD_SIZEOF(t, f)`
Change-Id: I6e86025d3bbb0cd2ed82bc42b798d331046beb15 Signed-off-by: Zhuo-Hao Lee zhuo-hao.lee@intel.com Reviewed-on: https://chromium-review.googlesource.com/237510 Reviewed-by: Ryan Lin ryan.lin@intel.com Reviewed-by: Duncan Laurie dlaurie@chromium.org Signed-off-by: Paul Menzel paulepanter@users.sourceforge.net --- src/include/stdlib.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/include/stdlib.h b/src/include/stdlib.h index 2fc6805..88456be 100644 --- a/src/include/stdlib.h +++ b/src/include/stdlib.h @@ -4,6 +4,7 @@ #include <stddef.h>
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) +#define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->f))
#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1UL) #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))