aboutsummaryrefslogtreecommitdiff
path: root/src/include/stdlib.h
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-10-27 20:05:21 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-10-27 20:05:21 +0000
commit55e6ebaf6a90102bfb09e467d768cf861a340e5f (patch)
tree094e948563cf353d2a5ef9c1faa5351c7c8df85b /src/include/stdlib.h
parent9b80a8d4bc5b49c8921f57c3bf83f04c79817e46 (diff)
Move ARRAY_SIZE to stdlib.h to make it available to all code (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2901 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/include/stdlib.h')
-rw-r--r--src/include/stdlib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h
index eb67d20fe7..8bae40f2e1 100644
--- a/src/include/stdlib.h
+++ b/src/include/stdlib.h
@@ -3,6 +3,8 @@
#include <stddef.h>
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
extern void *malloc(size_t size);
void free(void *ptr);