]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
libdecnumber: Don't fool around with guards to avoid #include
authorMarkus Armbruster <armbru@redhat.com>
Wed, 29 Jun 2016 09:45:54 +0000 (11:45 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 12 Jul 2016 14:19:16 +0000 (16:19 +0200)
Some libdecnumber headers avoid including decNumber.h or decContext.h
again by checking their header guards.  Don't.  Including them
multiple times is safe, and the compiler can do it efficiently.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
include/libdecnumber/decNumber.h
include/libdecnumber/dpd/decimal128.h
include/libdecnumber/dpd/decimal32.h
include/libdecnumber/dpd/decimal64.h

index 9fa4e6a0c9ba9dc9083fc3daef82f3dd03870955..3f3a74af9ec345733af639f9a0787a64a28c2ee7 100644 (file)
@@ -38,9 +38,7 @@
   #define DECFULLNAME "Decimal Number Module"        /* Verbose name */
   #define DECAUTHOR   "Mike Cowlishaw"               /* Who to blame */
 
-  #if !defined(DECCONTEXT)
-    #include "libdecnumber/decContext.h"
-  #endif
+  #include "libdecnumber/decContext.h"
 
   /* Bit settings for decNumber.bits                                 */
   #define DECNEG    0x80      /* Sign; 1=negative, 0=positive or zero */
index 7d9ee24f85c36833b9900a079c0e59ae62633505..13d1ae81f866c12ee3ae05f90ac0cf85767257a9 100644 (file)
@@ -59,9 +59,7 @@
   #ifndef DECNUMDIGITS
     #define DECNUMDIGITS DECIMAL128_Pmax /* size if not already defined*/
   #endif
-  #ifndef DECNUMBER
-    #include "libdecnumber/decNumber.h"
-  #endif
+  #include "libdecnumber/decNumber.h"
 
   /* Decimal 128-bit type, accessible by bytes                       */
   typedef struct {
index de313e00249e035dfc1aae54cb464b266bb8c192..03c80dbbaa60b152490650526314b0983250c305 100644 (file)
@@ -59,9 +59,7 @@
   #ifndef DECNUMDIGITS
     #define DECNUMDIGITS DECIMAL32_Pmax /* size if not already defined*/
   #endif
-  #ifndef DECNUMBER
-    #include "libdecnumber/decNumber.h"
-  #endif
+  #include "libdecnumber/decNumber.h"
 
   /* Decimal 32-bit type, accessible by bytes */
   typedef struct {
index 2f6c0494022e69dfbc5945ca453395d1ea60738a..a375faf4d2330adeba49144843bf133dd35b6258 100644 (file)
@@ -61,9 +61,7 @@
   #ifndef DECNUMDIGITS
     #define DECNUMDIGITS DECIMAL64_Pmax /* size if not already defined*/
   #endif
-  #ifndef DECNUMBER
-    #include "libdecnumber/decNumber.h"
-  #endif
+  #include "libdecnumber/decNumber.h"
 
   /* Decimal 64-bit type, accessible by bytes                        */
   typedef struct {