summarylogtreecommitdiffstats
path: root/p1.patch
blob: ea3af99712fcf6871d9ada908b2389fcb9f2039d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 363e0fea40..ae72e959ce 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -309,6 +309,8 @@ struct _LIST_ENTRY {
 ///
 /// NULL pointer (VOID *)
 ///
+#ifndef OS_BUILD
+#ifndef UNIT_TEST_UEFI_BUILD
 #if defined (__cplusplus)
   #if defined (_MSC_EXTENSIONS)
 #define NULL  nullptr
@@ -318,6 +320,8 @@ struct _LIST_ENTRY {
 #else
 #define NULL  ((VOID *) 0)
 #endif
+#endif
+#endif
 
 //
 // Null character
@@ -813,6 +817,8 @@ typedef UINTN *BASE_LIST;
 // Section 2.3.1 of the UEFI 2.3 Specification.
 //
 
+#ifndef OS_BUILD
+#ifndef UNIT_TEST_UEFI_BUILD
 STATIC_ASSERT (sizeof (BOOLEAN) == 1, "sizeof (BOOLEAN) does not meet UEFI Specification Data Type requirements");
 STATIC_ASSERT (sizeof (INT8)    == 1, "sizeof (INT8) does not meet UEFI Specification Data Type requirements");
 STATIC_ASSERT (sizeof (UINT8)   == 1, "sizeof (UINT8) does not meet UEFI Specification Data Type requirements");
@@ -826,6 +832,8 @@ STATIC_ASSERT (sizeof (CHAR8)   == 1, "sizeof (CHAR8) does not meet UEFI Specifi
 STATIC_ASSERT (sizeof (CHAR16)  == 2, "sizeof (CHAR16) does not meet UEFI Specification Data Type requirements");
 STATIC_ASSERT (sizeof (L'A')    == 2, "sizeof (L'A') does not meet UEFI Specification Data Type requirements");
 STATIC_ASSERT (sizeof (L"A")    == 4, "sizeof (L\"A\") does not meet UEFI Specification Data Type requirements");
+#endif
+#endif
 
 STATIC_ASSERT (ALIGNOF (BOOLEAN) == sizeof (BOOLEAN), "Alignment of BOOLEAN does not meet UEFI Specification Data Type requirements");
 STATIC_ASSERT (ALIGNOF (INT8)    == sizeof (INT8), "Alignment of INT8 does not meet UEFI Specification Data Type requirements");