]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Ia32/ProcessorBind.h
1, Use #if defined() to judge the switching macro such as compiler macro.
[mirror_edk2.git] / MdePkg / Include / Ia32 / ProcessorBind.h
index 5f29bb3e096ba6bc8a87574fc9a14eb959d82433..e6d1a7da90125261c7b3a70973862356a2f7315b 100644 (file)
 //\r
 // Make sure we are using the correct packing rules per EFI specification\r
 //\r
-#ifndef __GNUC__\r
+#if !defined(__GNUC__)\r
 #pragma pack()\r
 #endif\r
 \r
-#if __INTEL_COMPILER\r
+#if defined(__INTEL_COMPILER)\r
 //\r
 // Disable ICC's remark #869: "Parameter" was never referenced warning.\r
 // This is legal ANSI C code so we disable the remark that is turned on with -Wall\r
@@ -49,7 +49,7 @@
 #endif\r
 \r
 \r
-#if _MSC_EXTENSIONS\r
+#if defined(_MSC_EXTENSIONS)\r
 \r
 //\r
 // Disable warning that make it impossible to compile at /W4\r
@@ -95,7 +95,7 @@
   // No ANSI C 2000 stdint.h integer width declarations, so define equivalents\r
   //\r
  \r
-  #if _MSC_EXTENSIONS \r
+  #if defined(_MSC_EXTENSIONS)\r
 \r
     //\r
     // use Microsoft C complier dependent integer width types \r
@@ -295,13 +295,13 @@ typedef INT32   INTN;
 // use the correct C calling convention. All protocol member functions and\r
 // EFI intrinsics are required to modify their member functions with EFIAPI.\r
 //\r
-#if _MSC_EXTENSIONS\r
+#if defined(_MSC_EXTENSIONS)\r
   ///\r
   /// Microsoft* compiler specific method for EFIAPI calling convension\r
   /// \r
   #define EFIAPI __cdecl  \r
 #else\r
-  #if __GNUC__\r
+  #if defined(__GNUC__)\r
     ///\r
     /// GCC specific method for EFIAPI calling convension\r
     /// \r
@@ -314,7 +314,7 @@ typedef INT32   INTN;
 //  if the /OPT:REF linker option is used. We defined a macro as this is a \r
 //  a non standard extension\r
 //\r
-#if _MSC_EXTENSIONS\r
+#if defined(_MSC_EXTENSIONS)\r
   ///\r
   /// Remove global variable from the linked image if there are no references to \r
   /// it after all compiler and linker optimizations have been performed.\r
@@ -331,7 +331,7 @@ typedef INT32   INTN;
 //\r
 // For symbol name in GNU assembly code, an extra "_" is necessary\r
 //\r
-#if __GNUC__\r
+#if defined(__GNUC__)\r
   #if defined(linux)\r
     #define ASM_PFX(name) name\r
   #else\r