4 #include <commonlib/helpers.h>
6 typedef __PTRDIFF_TYPE__
ptrdiff_t;
7 typedef __SIZE_TYPE__
size_t;
8 /* There is a GCC macro for a size_t type, but not
9 * for a ssize_t type. Below construct tricks GCC
10 * into making __SIZE_TYPE__ signed.
12 #define unsigned signed
13 typedef __SIZE_TYPE__ ssize_t
;
16 typedef __WCHAR_TYPE__
wchar_t;
17 typedef __WINT_TYPE__
wint_t;
19 #define NULL ((void *)0)
21 /* The devicetree data structures are only mutable in ramstage. All other
22 stages have a constant devicetree. */
23 #if !ENV_PAYLOAD_LOADER
24 #define DEVTREE_EARLY 1
26 #define DEVTREE_EARLY 0
30 #define DEVTREE_CONST const
35 #if ENV_HAS_DATA_SECTION
36 #define MAYBE_STATIC_NONZERO static
38 #define MAYBE_STATIC_NONZERO
41 /* Provide a pointer to address 0 that thwarts any "accessing this is
42 * undefined behaviour and do whatever" trickery in compilers.
43 * Use when you _really_ need to read32(zeroptr) (ie. read address 0).
45 extern char zeroptr
[];