coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
stddef.h
Go to the documentation of this file.
1
#ifndef STDDEF_H
2
#define STDDEF_H
3
4
#include <
commonlib/helpers.h
>
5
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.
11
*/
12
#define unsigned signed
13
typedef
__SIZE_TYPE__
ssize_t
;
14
#undef unsigned
15
16
typedef
__WCHAR_TYPE__
wchar_t
;
17
typedef
__WINT_TYPE__
wint_t
;
18
19
#define NULL ((void *)0)
20
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
25
#else
26
#define DEVTREE_EARLY 0
27
#endif
28
29
#if DEVTREE_EARLY
30
#define DEVTREE_CONST const
31
#else
32
#define DEVTREE_CONST
33
#endif
34
35
#if ENV_STAGE_HAS_DATA_SECTION
36
#define MAYBE_STATIC_NONZERO static
37
#else
38
#define MAYBE_STATIC_NONZERO
39
#endif
40
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).
44
*/
45
extern
char
zeroptr
[];
46
47
#endif
/* STDDEF_H */
helpers.h
ssize_t
__SIZE_TYPE__ ssize_t
Definition:
stddef.h:13
wchar_t
__WCHAR_TYPE__ wchar_t
Definition:
stddef.h:16
zeroptr
char zeroptr[]
ptrdiff_t
__PTRDIFF_TYPE__ ptrdiff_t
Definition:
stddef.h:6
size_t
__SIZE_TYPE__ size_t
Definition:
stddef.h:7
wint_t
__WINT_TYPE__ wint_t
Definition:
stddef.h:17
src
include
stddef.h
Generated by
1.9.1