提交 6031a51f 编写于 作者: M Markus Armbruster

libdecnumber: Don't fool around with guards to avoid #include

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: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NRichard Henderson <rth@twiddle.net>
上级 121d0712
...@@ -38,9 +38,7 @@ ...@@ -38,9 +38,7 @@
#define DECFULLNAME "Decimal Number Module" /* Verbose name */ #define DECFULLNAME "Decimal Number Module" /* Verbose name */
#define DECAUTHOR "Mike Cowlishaw" /* Who to blame */ #define DECAUTHOR "Mike Cowlishaw" /* Who to blame */
#if !defined(DECCONTEXT) #include "libdecnumber/decContext.h"
#include "libdecnumber/decContext.h"
#endif
/* Bit settings for decNumber.bits */ /* Bit settings for decNumber.bits */
#define DECNEG 0x80 /* Sign; 1=negative, 0=positive or zero */ #define DECNEG 0x80 /* Sign; 1=negative, 0=positive or zero */
......
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
#ifndef DECNUMDIGITS #ifndef DECNUMDIGITS
#define DECNUMDIGITS DECIMAL128_Pmax /* size if not already defined*/ #define DECNUMDIGITS DECIMAL128_Pmax /* size if not already defined*/
#endif #endif
#ifndef DECNUMBER #include "libdecnumber/decNumber.h"
#include "libdecnumber/decNumber.h"
#endif
/* Decimal 128-bit type, accessible by bytes */ /* Decimal 128-bit type, accessible by bytes */
typedef struct { typedef struct {
......
...@@ -59,9 +59,7 @@ ...@@ -59,9 +59,7 @@
#ifndef DECNUMDIGITS #ifndef DECNUMDIGITS
#define DECNUMDIGITS DECIMAL32_Pmax /* size if not already defined*/ #define DECNUMDIGITS DECIMAL32_Pmax /* size if not already defined*/
#endif #endif
#ifndef DECNUMBER #include "libdecnumber/decNumber.h"
#include "libdecnumber/decNumber.h"
#endif
/* Decimal 32-bit type, accessible by bytes */ /* Decimal 32-bit type, accessible by bytes */
typedef struct { typedef struct {
......
...@@ -61,9 +61,7 @@ ...@@ -61,9 +61,7 @@
#ifndef DECNUMDIGITS #ifndef DECNUMDIGITS
#define DECNUMDIGITS DECIMAL64_Pmax /* size if not already defined*/ #define DECNUMDIGITS DECIMAL64_Pmax /* size if not already defined*/
#endif #endif
#ifndef DECNUMBER #include "libdecnumber/decNumber.h"
#include "libdecnumber/decNumber.h"
#endif
/* Decimal 64-bit type, accessible by bytes */ /* Decimal 64-bit type, accessible by bytes */
typedef struct { typedef struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册