summaryrefslogtreecommitdiffstats
path: root/src/include/stdint.h
diff options
context:
space:
mode:
authorJoshua Oreman2009-03-31 08:20:11 +0200
committerMichael Brown2009-03-31 08:21:07 +0200
commit820b11dc0ae315a33bbf0cd2cca91ca592e280a3 (patch)
treef61a4a765fc0e060385ebaf9d1257b095e0248e2 /src/include/stdint.h
parent[3c90x] Add missing size_t format specifier (diff)
downloadipxe-820b11dc0ae315a33bbf0cd2cca91ca592e280a3.tar.gz
ipxe-820b11dc0ae315a33bbf0cd2cca91ca592e280a3.tar.xz
ipxe-820b11dc0ae315a33bbf0cd2cca91ca592e280a3.zip
[build] Use __SIZE_TYPE__ macro in definition of size_t
This is required in order to build on Mac OS X. Modified-by: Michael Brown <mcb30@etherboot.org> Signed-off-by: Michael Brown <mcb30@etherboot.org>
Diffstat (limited to 'src/include/stdint.h')
-rw-r--r--src/include/stdint.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/include/stdint.h b/src/include/stdint.h
index 4b0e44f2..dc4bd8c7 100644
--- a/src/include/stdint.h
+++ b/src/include/stdint.h
@@ -1,6 +1,16 @@
#ifndef _STDINT_H
#define _STDINT_H
+/*
+ * This is a standard predefined macro on all gcc's I've seen. It's
+ * important that we define size_t in the same way as the compiler,
+ * because that's what it's expecting when it checks %zd/%zx printf
+ * format specifiers.
+ */
+#ifndef __SIZE_TYPE__
+#define __SIZE_TYPE__ unsigned long /* safe choice on most systems */
+#endif
+
#include <bits/stdint.h>
typedef int8_t s8;