diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 06:09:44 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-23 06:09:44 +0000 |
commit | c85640b2a118942b409360bea5635d8976e9b663 (patch) | |
tree | 0c47d06c957f5f451baf0d263d1c10352d698d42 /EdkCompatibilityPkg/Foundation/Library | |
parent | 5cfbd055878dcca6f3e4081fc5c8805fd2ce7107 (diff) | |
download | edk2-platforms-c85640b2a118942b409360bea5635d8976e9b663.tar.xz |
1, Use #if defined() to judge the switching macro such as compiler macro.
Original, some code directly judge the value of these macros, but linux ICC compiler will report error as "zero used for undefined preprocessing identifier". So it is better judge whether these macros are defined before accessing their value.
2, Use #if defined() style to replace #ifdef style.
It is good to keep consistent style for this case.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7597 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library')
3 files changed, 6 insertions, 6 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h index 52343e5d66..b31a81e9ae 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ebc/EdkIIGlueProcessorBind.h @@ -28,13 +28,13 @@ Abstract: // if the /OPT:REF linker option is used. We defined a macro as this is a
// a non standard extension
//
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
#else
#define GLOBAL_REMOVE_IF_UNREFERENCED
#endif
-#ifndef MDE_CPU_EBC
+#if !defined(MDE_CPU_EBC)
#define MDE_CPU_EBC
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h index beb31c689a..130c6b870c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/Ipf/EdkIIGlueProcessorBind.h @@ -28,13 +28,13 @@ Abstract: // if the /OPT:REF linker option is used. We defined a macro as this is a
// a non standard extension
//
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
#else
#define GLOBAL_REMOVE_IF_UNREFERENCED
#endif
-#ifndef MDE_CPU_IPF
+#if !defined(MDE_CPU_IPF)
#define MDE_CPU_IPF
#endif
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h index e362db86f5..b9b6f37347 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Include/X64/EdkIIGlueProcessorBind.h @@ -28,13 +28,13 @@ Abstract: // if the /OPT:REF linker option is used. We defined a macro as this is a
// a non standard extension
//
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
#define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany)
#else
#define GLOBAL_REMOVE_IF_UNREFERENCED
#endif
-#ifndef MDE_CPU_X64
+#if !defined(MDE_CPU_X64)
#define MDE_CPU_X64
#endif
|