Skip to content

Commit

Permalink
common: update patch for Base.h file
Browse files Browse the repository at this point in the history
patch modification to follow changes in Base.h imported from edk2
fixes: #119

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 authored and StevenPontsler committed Mar 17, 2023
1 parent ca8f6a4 commit 8543777
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@ diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h
index 2da08b0c78..072eefdb94 100644
--- a/MdePkg/Include/Base.h
+++ b/MdePkg/Include/Base.h
@@ -318,7 +318,11 @@ struct _LIST_ENTRY {
@@ -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
@@ -810,6 +814,8 @@ typedef UINTN *BASE_LIST;
@@ -779,6 +783,8 @@ typedef UINTN *BASE_LIST;
// Section 2.3.1 of the UEFI 2.3 Specification.
//

Expand All @@ -26,7 +32,7 @@ index 2da08b0c78..072eefdb94 100644
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");
@@ -823,6 +829,8 @@ STATIC_ASSERT (sizeof (CHAR8) == 1, "sizeof (CHAR8) does not meet UEFI Specifi
@@ -792,6 +798,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");
Expand All @@ -35,7 +41,7 @@ index 2da08b0c78..072eefdb94 100644

//
// The following three enum types are used to verify that the compiler
@@ -843,9 +851,13 @@ typedef enum {
@@ -812,9 +820,13 @@ typedef enum {
__VerifyUint32EnumValue = 0xffffffff
} __VERIFY_UINT32_ENUM_SIZE;

Expand All @@ -49,5 +55,3 @@ index 2da08b0c78..072eefdb94 100644

/**
Macro that returns a pointer to the data structure that contains a specified field of
--
2.31.0.windows.1

0 comments on commit 8543777

Please sign in to comment.