]>
Commit | Line | Data |
---|---|---|
2aa62f2b | 1 | /** @file\r |
2 | Common Definitions.\r | |
3 | \r | |
4 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials are licensed and made available under\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
7 | The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php.\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | #ifndef _STDDEF_H\r | |
15 | #define _STDDEF_H\r | |
16 | #include <sys/EfiCdefs.h>\r | |
17 | \r | |
18 | /** ptrdiff_t is the signed integer type of the result of subtracting two pointers.\r | |
19 | **/\r | |
20 | #ifdef _EFI_PTRDIFF_T_\r | |
21 | typedef _EFI_PTRDIFF_T_ ptrdiff_t;\r | |
22 | #undef _EFI_PTRDIFF_T_\r | |
23 | #endif\r | |
24 | \r | |
25 | /** size_t is the unsigned integer type of the result of the sizeof operator.\r | |
26 | **/\r | |
27 | #ifdef _EFI_SIZE_T_\r | |
28 | typedef _EFI_SIZE_T_ size_t;\r | |
29 | #undef _EFI_SIZE_T_\r | |
30 | #undef _BSD_SIZE_T_\r | |
31 | #endif\r | |
32 | \r | |
33 | /** wchar_t is an integer type whose range of values can represent distinct\r | |
34 | codes for all members of the largest extended character set specified among\r | |
35 | the supported locales. The null character shall have the code value zero.\r | |
36 | **/\r | |
37 | #ifndef __cplusplus\r | |
38 | #ifdef _EFI_WCHAR_T\r | |
39 | typedef _EFI_WCHAR_T wchar_t;\r | |
40 | #undef _EFI_WCHAR_T\r | |
41 | #undef _BSD_WCHAR_T_\r | |
42 | #endif\r | |
43 | #endif\r | |
44 | \r | |
45 | /** NULL expands to an implementation-defined null pointer constant.\r | |
46 | NULL is defined in MdePkg/Include/Base.h which is automatically included\r | |
47 | by the EDK II build tools.\r | |
48 | **/\r | |
49 | \r | |
50 | /** offsetof(type, member-designator) expands to an integer constant expression\r | |
51 | that has type size_t, the value of which is the offset in bytes, to the\r | |
52 | structure member (designated by member-designator), from the beginning of\r | |
53 | its structure (designated by type). The type and member designator shall be\r | |
54 | such that given<BR>\r | |
55 | static type t;<BR>\r | |
56 | then the expression &(t.member-designator) evaluates to an address constant.\r | |
57 | (If the specified member is a bit-field, the behavior is undefined.)\r | |
58 | \r | |
59 | Alliased to OFFSET_OF which is defined in MdePkg/Include/Base.h which is\r | |
60 | automatically included by the EDK II build tools.\r | |
61 | **/\r | |
62 | #define offsetof(type, member) OFFSET_OF(type, member)\r | |
63 | \r | |
64 | #endif /* _STDDEF_H */\r |