summaryrefslogtreecommitdiff
path: root/MdePkg/Include/Ipf
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 05:51:02 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-23 05:51:02 +0000
commit5cfbd055878dcca6f3e4081fc5c8805fd2ce7107 (patch)
tree541c3b9bb643efbcb30860fd2460223f3ae5f4f0 /MdePkg/Include/Ipf
parent04985a579c321272ba3cb5790f1ed5dc698616c4 (diff)
downloadedk2-platforms-5cfbd055878dcca6f3e4081fc5c8805fd2ce7107.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@7596 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Include/Ipf')
-rw-r--r--MdePkg/Include/Ipf/ProcessorBind.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/MdePkg/Include/Ipf/ProcessorBind.h b/MdePkg/Include/Ipf/ProcessorBind.h
index d92f16ca27..eb31c3f7bd 100644
--- a/MdePkg/Include/Ipf/ProcessorBind.h
+++ b/MdePkg/Include/Ipf/ProcessorBind.h
@@ -28,7 +28,7 @@
#pragma pack()
-#if __INTEL_COMPILER
+#if defined(__INTEL_COMPILER)
//
// Disable ICC's remark #869: "Parameter" was never referenced warning.
// This is legal ANSI C code so we disable the remark that is turned on with -Wall
@@ -50,7 +50,7 @@
#endif
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
//
// Disable warning that make it impossible to compile at /W4
// This only works for Microsoft* tools
@@ -101,12 +101,12 @@
#endif
-#if (__STDC_VERSION__ < 199901L)
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L)
//
// No ANSI C 2000 stdint.h integer width declarations, so define equivalents
//
- #if _MSC_EXTENSIONS
+ #if defined(_MSC_EXTENSIONS)
//
// use Microsoft C complier dependent integer width types
//
@@ -158,7 +158,7 @@
///
typedef char INT8;
#else
- #ifdef _EFI_P64
+ #if defined(_EFI_P64)
//
// P64 - pointers being 64-bit and longs and ints are 32-bits.
//
@@ -358,7 +358,7 @@ typedef INT64 INTN;
// use the correct C calling convention. All protocol member functions and
// EFI intrinsics are required to modify their member functions with EFIAPI.
//
-#if _MSC_EXTENSIONS
+#if defined(_MSC_EXTENSIONS)
///
/// Microsoft* compiler specific method for EFIAPI calling convension
///
@@ -372,7 +372,7 @@ typedef INT64 INTN;
// 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)
///
/// Remove global variable from the linked image if there are no references to
/// it after all compiler and linker optimizations have been performed.