Received: from eggs.gnu.org ([2001:4830:134:3::10]:43999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyiv-00037W-Uu for qemu-devel@nongnu.org; Tue, 12 Jul 2016 10:31:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMyit-0001kV-2q for qemu-devel@nongnu.org; Tue, 12 Jul 2016 10:31:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMyis-0001kR-RX for qemu-devel@nongnu.org; Tue, 12 Jul 2016 10:31:43 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 793968E906 for ; Tue, 12 Jul 2016 14:31:42 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6CEVdKT018078 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 12 Jul 2016 10:31:41 -0400 From: Markus Armbruster Date: Tue, 12 Jul 2016 16:31:30 +0200 Message-Id: <1468333894-419-15-git-send-email-armbru@redhat.com> In-Reply-To: <1468333894-419-1-git-send-email-armbru@redhat.com> References: <1468333894-419-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PULL 14/18] libdecnumber: Don't fool around with guards to avoid #include List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 Reviewed-by: Richard Henderson --- include/libdecnumber/decNumber.h | 4 +--- include/libdecnumber/dpd/decimal128.h | 4 +--- include/libdecnumber/dpd/decimal32.h | 4 +--- include/libdecnumber/dpd/decimal64.h | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/include/libdecnumber/decNumber.h b/include/libdecnumber/decNumber.h index 9fa4e6a..3f3a74a 100644 --- a/include/libdecnumber/decNumber.h +++ b/include/libdecnumber/decNumber.h @@ -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 */ diff --git a/include/libdecnumber/dpd/decimal128.h b/include/libdecnumber/dpd/decimal128.h index 7d9ee24..13d1ae8 100644 --- a/include/libdecnumber/dpd/decimal128.h +++ b/include/libdecnumber/dpd/decimal128.h @@ -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 { diff --git a/include/libdecnumber/dpd/decimal32.h b/include/libdecnumber/dpd/decimal32.h index de313e0..03c80db 100644 --- a/include/libdecnumber/dpd/decimal32.h +++ b/include/libdecnumber/dpd/decimal32.h @@ -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 { diff --git a/include/libdecnumber/dpd/decimal64.h b/include/libdecnumber/dpd/decimal64.h index 2f6c049..a375faf 100644 --- a/include/libdecnumber/dpd/decimal64.h +++ b/include/libdecnumber/dpd/decimal64.h @@ -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 { -- 2.5.5