From bbb4113a5a996dcd7bb3494e0be900b275b49a4f Mon Sep 17 00:00:00 2001 From: John Ralls Date: Tue, 20 Apr 2021 11:03:23 -0700 Subject: [PATCH] Bug 798156 - glib 2.68.0 breaks gnucash Move all of the #include to before the extern "C" blocks so that the include guards will protect against headers inside the extern "C" block also including glib.h. --- gnucash/gnome/assistant-loan.cpp | 7 ++++--- gnucash/import-export/csv-imp/gnc-imp-props-price.cpp | 6 +++--- gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp | 6 +++--- libgnucash/backend/dbi/gnc-backend-dbi.cpp | 6 +++--- libgnucash/backend/sql/gnc-address-sql.cpp | 4 ++-- libgnucash/backend/sql/gnc-book-sql.cpp | 4 ++-- libgnucash/backend/sql/gnc-customer-sql.cpp | 4 ++-- libgnucash/backend/sql/gnc-employee-sql.cpp | 3 ++- libgnucash/backend/sql/gnc-entry-sql.cpp | 3 ++- libgnucash/backend/sql/gnc-job-sql.cpp | 3 ++- libgnucash/backend/sql/gnc-price-sql.cpp | 3 ++- libgnucash/backend/sql/gnc-recurrence-sql.cpp | 3 ++- libgnucash/backend/sql/gnc-schedxaction-sql.cpp | 4 ++-- libgnucash/backend/sql/gnc-vendor-sql.cpp | 4 ++-- libgnucash/backend/xml/gnc-account-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-address-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-backend-xml.cpp | 8 ++++---- libgnucash/backend/xml/gnc-book-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-budget-xml-v2.cpp | 3 +-- libgnucash/backend/xml/gnc-commodity-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-customer-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-employee-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-entry-xml-v2.cpp | 4 ++-- libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-invoice-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-job-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-lot-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-order-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-owner-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp | 2 +- libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-transaction-xml-v2.cpp | 4 +++- libgnucash/backend/xml/gnc-vendor-xml-v2.cpp | 3 ++- libgnucash/backend/xml/gnc-xml-backend.cpp | 4 ++-- libgnucash/backend/xml/io-example-account.cpp | 7 ++++--- libgnucash/backend/xml/io-gncxml-v2.cpp | 6 +++--- libgnucash/backend/xml/io-utils.cpp | 4 ++-- libgnucash/backend/xml/sixtp-dom-generators.cpp | 3 ++- libgnucash/backend/xml/sixtp-dom-parsers.cpp | 3 ++- libgnucash/backend/xml/sixtp.cpp | 6 +++--- libgnucash/backend/xml/sixtp.h | 5 ++++- libgnucash/engine/gnc-numeric.cpp | 3 ++- libgnucash/engine/qof-string-cache.cpp | 3 +-- libgnucash/engine/qofbook.cpp | 2 +- libgnucash/engine/qofid.cpp | 3 ++- libgnucash/engine/qoflog.cpp | 4 ++-- libgnucash/engine/qofquery.cpp | 2 +- libgnucash/engine/qofsession.cpp | 2 +- 49 files changed, 106 insertions(+), 82 deletions(-) diff --git a/gnucash/gnome/assistant-loan.cpp b/gnucash/gnome/assistant-loan.cpp index 04d0e604d2..9f8f52d05e 100644 --- a/gnucash/gnome/assistant-loan.cpp +++ b/gnucash/gnome/assistant-loan.cpp @@ -23,6 +23,10 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * \********************************************************************/ +#include +#include +#include + extern "C" { #include @@ -50,9 +54,6 @@ extern "C" #endif } -#include -#include -#include #include #include #include diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp index 24fca216a9..f20f6c1b19 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp @@ -21,6 +21,9 @@ * * \********************************************************************/ +#include +#include + extern "C" { #include #if PLATFORM(WINDOWS) @@ -31,9 +34,6 @@ extern "C" { #include "gnc-ui-util.h" } -#include -#include - #include #include #include diff --git a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp index cdf61e65cd..8a4a1e1437 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp @@ -20,6 +20,9 @@ * * \********************************************************************/ +#include +#include + extern "C" { #include #if PLATFORM(WINDOWS) @@ -37,9 +40,6 @@ extern "C" { } -#include -#include - #include #include #include diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp index 8b5d03ac10..db48774790 100644 --- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp +++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp @@ -25,6 +25,9 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db using libdbi */ +#include +#include + extern "C" { #include "config.h" @@ -59,9 +62,6 @@ extern "C" } -#include -#include - #include #include #include diff --git a/libgnucash/backend/sql/gnc-address-sql.cpp b/libgnucash/backend/sql/gnc-address-sql.cpp index 8e78f08764..79beb8af0b 100644 --- a/libgnucash/backend/sql/gnc-address-sql.cpp +++ b/libgnucash/backend/sql/gnc-address-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -35,8 +37,6 @@ extern "C" #include "gncAddress.h" } -#include - #include #include #include diff --git a/libgnucash/backend/sql/gnc-book-sql.cpp b/libgnucash/backend/sql/gnc-book-sql.cpp index 580708f373..ca27169889 100644 --- a/libgnucash/backend/sql/gnc-book-sql.cpp +++ b/libgnucash/backend/sql/gnc-book-sql.cpp @@ -25,6 +25,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db */ +#include + extern "C" { #include @@ -40,8 +42,6 @@ extern "C" #endif } -#include - #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" #include "gnc-sql-object-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-customer-sql.cpp b/libgnucash/backend/sql/gnc-customer-sql.cpp index 7fbc5c83c0..26e075ca92 100644 --- a/libgnucash/backend/sql/gnc-customer-sql.cpp +++ b/libgnucash/backend/sql/gnc-customer-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -39,8 +41,6 @@ extern "C" #include "gncTaxTableP.h" } -#include - #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" #include "gnc-sql-object-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-employee-sql.cpp b/libgnucash/backend/sql/gnc-employee-sql.cpp index c5b17fdb7c..b0cb6e3d11 100644 --- a/libgnucash/backend/sql/gnc-employee-sql.cpp +++ b/libgnucash/backend/sql/gnc-employee-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -37,7 +39,6 @@ extern "C" #include "gnc-commodity.h" #include "gncEmployeeP.h" } -#include #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-entry-sql.cpp b/libgnucash/backend/sql/gnc-entry-sql.cpp index f7b9ef4a3a..053996bc63 100644 --- a/libgnucash/backend/sql/gnc-entry-sql.cpp +++ b/libgnucash/backend/sql/gnc-entry-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -39,7 +41,6 @@ extern "C" #include "gncInvoiceP.h" #include "gncTaxTableP.h" } -#include #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-job-sql.cpp b/libgnucash/backend/sql/gnc-job-sql.cpp index 421992ffd8..5daf2bdd80 100644 --- a/libgnucash/backend/sql/gnc-job-sql.cpp +++ b/libgnucash/backend/sql/gnc-job-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -36,7 +38,6 @@ extern "C" #include "gncJobP.h" } -#include #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-price-sql.cpp b/libgnucash/backend/sql/gnc-price-sql.cpp index 95233b342f..9dd5e60aee 100644 --- a/libgnucash/backend/sql/gnc-price-sql.cpp +++ b/libgnucash/backend/sql/gnc-price-sql.cpp @@ -25,6 +25,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db */ +#include + extern "C" { #include @@ -36,7 +38,6 @@ extern "C" #include "splint-defs.h" #endif } -#include #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-recurrence-sql.cpp b/libgnucash/backend/sql/gnc-recurrence-sql.cpp index 3aa33e54a7..fb82c90ecf 100644 --- a/libgnucash/backend/sql/gnc-recurrence-sql.cpp +++ b/libgnucash/backend/sql/gnc-recurrence-sql.cpp @@ -25,6 +25,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db */ +#include + extern "C" { #include @@ -37,7 +39,6 @@ extern "C" #include "splint-defs.h" #endif } -#include #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp index c9147ec3aa..dddaf83f1c 100644 --- a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp +++ b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp @@ -25,6 +25,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL db */ +#include + extern "C" { #include @@ -39,8 +41,6 @@ extern "C" #endif } -#include - #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" #include "gnc-sql-object-backend.hpp" diff --git a/libgnucash/backend/sql/gnc-vendor-sql.cpp b/libgnucash/backend/sql/gnc-vendor-sql.cpp index 57dd78b4af..481b1f4225 100644 --- a/libgnucash/backend/sql/gnc-vendor-sql.cpp +++ b/libgnucash/backend/sql/gnc-vendor-sql.cpp @@ -27,6 +27,8 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an SQL database */ +#include + extern "C" { #include @@ -39,8 +41,6 @@ extern "C" #include "gncTaxTableP.h" } -#include - #include "gnc-sql-connection.hpp" #include "gnc-sql-backend.hpp" #include "gnc-sql-object-backend.hpp" diff --git a/libgnucash/backend/xml/gnc-account-xml-v2.cpp b/libgnucash/backend/xml/gnc-account-xml-v2.cpp index 484ce508d5..54c0a848aa 100644 --- a/libgnucash/backend/xml/gnc-account-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-account-xml-v2.cpp @@ -22,6 +22,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -31,8 +33,6 @@ extern "C" #include } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-address-xml-v2.cpp b/libgnucash/backend/xml/gnc-address-xml-v2.cpp index c3484f674f..bd0a1a8077 100644 --- a/libgnucash/backend/xml/gnc-address-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-address-xml-v2.cpp @@ -21,13 +21,14 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include #include #include } -#include #include "gnc-xml-helper.h" diff --git a/libgnucash/backend/xml/gnc-backend-xml.cpp b/libgnucash/backend/xml/gnc-backend-xml.cpp index 2acdf71a05..c0a51a9251 100644 --- a/libgnucash/backend/xml/gnc-backend-xml.cpp +++ b/libgnucash/backend/xml/gnc-backend-xml.cpp @@ -27,6 +27,10 @@ * This file implements the top-level QofBackend API for saving/ * restoring data to/from an ordinary Unix filesystem file. */ +#include +#include +#include + extern "C" { #include @@ -73,10 +77,6 @@ extern "C" #endif } -#include -#include -#include - #include #include "gnc-backend-xml.h" #include diff --git a/libgnucash/backend/xml/gnc-book-xml-v2.cpp b/libgnucash/backend/xml/gnc-book-xml-v2.cpp index 7cb677417b..17d0b53baf 100644 --- a/libgnucash/backend/xml/gnc-book-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-book-xml-v2.cpp @@ -22,6 +22,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -30,8 +32,6 @@ extern "C" #include "qof.h" } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp index c39c6a0c79..80ed55748d 100644 --- a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp @@ -20,6 +20,7 @@ * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * Boston, MA 02110-1301, USA gnu@gnu.org */ +#include extern "C" { @@ -28,8 +29,6 @@ extern "C" #include } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp index dd04f2100d..ea12cdaadf 100644 --- a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -29,8 +31,6 @@ extern "C" #include "Account.h" } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp index 4396b7c151..bf2edd91ea 100644 --- a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -32,8 +34,6 @@ extern "C" #include "gncTaxTableP.h" } -#include - #include "gnc-xml-helper.h" #include "gnc-customer-xml-v2.h" #include "gnc-address-xml-v2.h" diff --git a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp index eaae536a22..f70bab19a5 100644 --- a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -28,8 +30,6 @@ extern "C" #include #include "gncEmployeeP.h" } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp index df87a1f421..08125df99d 100644 --- a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -33,8 +35,6 @@ extern "C" #include "gncTaxTableP.h" } -#include - #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp index ec3edac8b3..bc75540b04 100644 --- a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp @@ -22,6 +22,8 @@ * * *******************************************************************/ +#include + extern "C" { #include @@ -30,7 +32,6 @@ extern "C" #include "SchedXaction.h" #include "FreqSpec.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp index 3231198bcf..6cbc3aa6e1 100644 --- a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -30,7 +32,6 @@ extern "C" #include "gncBillTermP.h" #include "gncInvoiceP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-job-xml-v2.cpp b/libgnucash/backend/xml/gnc-job-xml-v2.cpp index 1132a996d3..39e70e7a37 100644 --- a/libgnucash/backend/xml/gnc-job-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-job-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -28,7 +30,6 @@ extern "C" #include #include "gncJobP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp index d42a5b4b7b..2041b5f726 100644 --- a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp @@ -22,6 +22,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -30,7 +32,6 @@ extern "C" #include "gnc-lot.h" #include "gnc-lot-p.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-order-xml-v2.cpp b/libgnucash/backend/xml/gnc-order-xml-v2.cpp index 3b95d6ce09..9d54f530d8 100644 --- a/libgnucash/backend/xml/gnc-order-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-order-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -28,7 +30,6 @@ extern "C" #include #include "gncOrderP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp index 42931c3e7d..159f48d5e7 100644 --- a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -31,7 +33,6 @@ extern "C" #include "gncVendorP.h" #include "gncEmployeeP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp index b67e24b078..cab44edc17 100644 --- a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp @@ -20,6 +20,7 @@ * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * Boston, MA 02110-1301, USA gnu@gnu.org */ +#include extern "C" { @@ -28,7 +29,6 @@ extern "C" #include "qof.h" #include "Recurrence.h" } -#include #include "gnc-xml.h" #include "gnc-xml-helper.h" diff --git a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp index 195f5a7389..f396f640c7 100644 --- a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp @@ -20,6 +20,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * *******************************************************************/ +#include + extern "C" { #include @@ -27,7 +29,6 @@ extern "C" #include "SX-book.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp index b8e602fa48..a8c714a030 100644 --- a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -29,7 +31,6 @@ extern "C" #include "gncEntry.h" #include "gncTaxTableP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp index 560c0d0c67..9d63ad0a52 100644 --- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * *******************************************************************/ +#include + extern "C" { #include @@ -31,7 +33,7 @@ extern "C" #include "gnc-lot.h" #include "gnc-lot-p.h" } -#include + #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp index e88fe7932c..520cdd3d3e 100644 --- a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -31,7 +33,6 @@ extern "C" #include "gncTaxTableP.h" } -#include #include "gnc-xml-helper.h" #include "sixtp.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/gnc-xml-backend.cpp b/libgnucash/backend/xml/gnc-xml-backend.cpp index 293fce38b9..cc0b494f4e 100644 --- a/libgnucash/backend/xml/gnc-xml-backend.cpp +++ b/libgnucash/backend/xml/gnc-xml-backend.cpp @@ -14,6 +14,8 @@ * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * * Boston, MA 02110-1301, USA gnu@gnu.org * \********************************************************************/ +#include +#include extern "C" { @@ -36,8 +38,6 @@ extern "C" } -#include -#include #include #include "gnc-xml-backend.hpp" diff --git a/libgnucash/backend/xml/io-example-account.cpp b/libgnucash/backend/xml/io-example-account.cpp index a9b4be1900..dd6831ec54 100644 --- a/libgnucash/backend/xml/io-example-account.cpp +++ b/libgnucash/backend/xml/io-example-account.cpp @@ -21,6 +21,10 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include +#include +#include + extern "C" { #include @@ -50,9 +54,6 @@ extern "C" #endif } -#include -#include -#include #include "sixtp.h" #include "gnc-xml.h" diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp index 7b81ee46c5..c956c8db55 100644 --- a/libgnucash/backend/xml/io-gncxml-v2.cpp +++ b/libgnucash/backend/xml/io-gncxml-v2.cpp @@ -18,6 +18,9 @@ * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * * Boston, MA 02110-1301, USA gnu@gnu.org * \********************************************************************/ +#include +#include + extern "C" { #include @@ -64,9 +67,6 @@ extern "C" #endif } -#include -#include - #include "gnc-xml-backend.hpp" #include "sixtp-parsers.h" #include "sixtp-utils.h" diff --git a/libgnucash/backend/xml/io-utils.cpp b/libgnucash/backend/xml/io-utils.cpp index ca2f7e2037..c203fb677e 100644 --- a/libgnucash/backend/xml/io-utils.cpp +++ b/libgnucash/backend/xml/io-utils.cpp @@ -21,6 +21,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include + extern "C" { #include @@ -28,8 +30,6 @@ extern "C" #include } -#include - #include "gnc-xml.h" #include "io-utils.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp index 0b9a914a2f..94e5b9d185 100644 --- a/libgnucash/backend/xml/sixtp-dom-generators.cpp +++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp @@ -20,6 +20,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * ********************************************************************/ +#include + extern "C" { #define __EXTENSIONS__ @@ -28,7 +30,6 @@ extern "C" #include } -#include #include "gnc-xml-helper.h" #include "sixtp-dom-generators.h" diff --git a/libgnucash/backend/xml/sixtp-dom-parsers.cpp b/libgnucash/backend/xml/sixtp-dom-parsers.cpp index 9b05f48833..646da445c6 100644 --- a/libgnucash/backend/xml/sixtp-dom-parsers.cpp +++ b/libgnucash/backend/xml/sixtp-dom-parsers.cpp @@ -20,6 +20,8 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * ********************************************************************/ +#include + extern "C" { #include @@ -29,7 +31,6 @@ extern "C" #include } -#include #include "gnc-xml-helper.h" #include "sixtp-utils.h" #include "sixtp-dom-parsers.h" diff --git a/libgnucash/backend/xml/sixtp.cpp b/libgnucash/backend/xml/sixtp.cpp index d231efa40c..ea41eb5fc1 100644 --- a/libgnucash/backend/xml/sixtp.cpp +++ b/libgnucash/backend/xml/sixtp.cpp @@ -20,6 +20,9 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * ********************************************************************/ +#include +#include + extern "C" { #include @@ -34,9 +37,6 @@ extern "C" #endif } -#include -#include - #include "sixtp.h" #include "sixtp-parsers.h" #include "sixtp-stack.h" diff --git a/libgnucash/backend/xml/sixtp.h b/libgnucash/backend/xml/sixtp.h index 585a42ac12..82d6e8f5d3 100644 --- a/libgnucash/backend/xml/sixtp.h +++ b/libgnucash/backend/xml/sixtp.h @@ -23,6 +23,9 @@ #ifndef SIXTP_H #define SIXTP_H + +#include + extern "C" { #include @@ -30,7 +33,7 @@ extern "C" #include #include "gnc-engine.h" } -#include + #include "gnc-xml-helper.h" #include "gnc-backend-xml.h" diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp index b99cb8586f..c1b5969b20 100644 --- a/libgnucash/engine/gnc-numeric.cpp +++ b/libgnucash/engine/gnc-numeric.cpp @@ -22,6 +22,8 @@ * * *******************************************************************/ +#include + extern "C" { #include @@ -34,7 +36,6 @@ extern "C" #include "qof.h" } -#include #include #include #include diff --git a/libgnucash/engine/qof-string-cache.cpp b/libgnucash/engine/qof-string-cache.cpp index 738bbf063e..aa1b89702f 100644 --- a/libgnucash/engine/qof-string-cache.cpp +++ b/libgnucash/engine/qof-string-cache.cpp @@ -25,6 +25,7 @@ * Author: Linas Vepstas (linas@linas.org) * * Author: Phil Longstaff (phil.longstaff@yahoo.ca) * \********************************************************************/ +#include extern "C" { @@ -36,8 +37,6 @@ extern "C" #include "qof.h" } -#include - /* Uncomment if you need to log anything. static QofLogModule log_module = QOF_MOD_UTIL; */ diff --git a/libgnucash/engine/qofbook.cpp b/libgnucash/engine/qofbook.cpp index 47cfa85fbb..c768296ea1 100644 --- a/libgnucash/engine/qofbook.cpp +++ b/libgnucash/engine/qofbook.cpp @@ -32,6 +32,7 @@ * Copyright (c) 2000 Dave Peticolas * Copyright (c) 2007 David Hampton */ +#include extern "C" { @@ -49,7 +50,6 @@ extern "C" } -#include #include "qof.h" #include "qofevent-p.h" #include "qofbackend.h" diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp index ac5167fca2..83dfa52211 100644 --- a/libgnucash/engine/qofid.cpp +++ b/libgnucash/engine/qofid.cpp @@ -22,13 +22,14 @@ * * \********************************************************************/ +#include + extern "C" { #include #include } -#include #include "qof.h" #include "qofid-p.h" #include "qofinstance-p.h" diff --git a/libgnucash/engine/qoflog.cpp b/libgnucash/engine/qoflog.cpp index f91817668c..7dafea99b3 100644 --- a/libgnucash/engine/qoflog.cpp +++ b/libgnucash/engine/qoflog.cpp @@ -24,6 +24,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA */ +#include +#include extern "C" { @@ -48,8 +50,6 @@ extern "C" } -#include -#include #undef G_LOG_DOMAIN #define G_LOG_DOMAIN "qof.log" #include "qof.h" diff --git a/libgnucash/engine/qofquery.cpp b/libgnucash/engine/qofquery.cpp index e344721577..3412f9160a 100644 --- a/libgnucash/engine/qofquery.cpp +++ b/libgnucash/engine/qofquery.cpp @@ -20,6 +20,7 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ +#include extern "C" { @@ -31,7 +32,6 @@ extern "C" #include } -#include #include "qof.h" #include "qof-backend.hpp" #include "qofbook-p.h" diff --git a/libgnucash/engine/qofsession.cpp b/libgnucash/engine/qofsession.cpp index dd96a609a1..2264712419 100644 --- a/libgnucash/engine/qofsession.cpp +++ b/libgnucash/engine/qofsession.cpp @@ -31,6 +31,7 @@ @author Copyright (c) 2005 Neil Williams @author Copyright (c) 2016 Aaron Laws */ +#include extern "C" { @@ -54,7 +55,6 @@ extern "C" static QofLogModule log_module = QOF_MOD_SESSION; } //extern 'C' -#include #include "qofbook-p.h" #include "qof-backend.hpp" #include "qofsession.hpp"