diff --git a/gnucash/gnome-utils/gnc-amount-edit.h b/gnucash/gnome-utils/gnc-amount-edit.h index b107af1a31..45d88dd4a8 100644 --- a/gnucash/gnome-utils/gnc-amount-edit.h +++ b/gnucash/gnome-utils/gnc-amount-edit.h @@ -32,6 +32,8 @@ #include "qof.h" #include "gnc-ui-util.h" +#include + #define GNC_TYPE_AMOUNT_EDIT (gnc_amount_edit_get_type()) #define GNC_AMOUNT_EDIT(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, GNC_TYPE_AMOUNT_EDIT, GNCAmountEdit) #define GNC_AMOUNT_EDIT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, GNC_TYPE_AMOUNT_EDIT, GNCAmountEditClass) diff --git a/gnucash/gnome-utils/gnc-tree-model-commodity.c b/gnucash/gnome-utils/gnc-tree-model-commodity.c index dbf1c5ccad..cdb6e297d7 100644 --- a/gnucash/gnome-utils/gnc-tree-model-commodity.c +++ b/gnucash/gnome-utils/gnc-tree-model-commodity.c @@ -36,6 +36,7 @@ #include +#include #include #include diff --git a/gnucash/gnome/assistant-loan.cpp b/gnucash/gnome/assistant-loan.cpp index 8dd8e0f035..aed5ba46e6 100644 --- a/gnucash/gnome/assistant-loan.cpp +++ b/gnucash/gnome/assistant-loan.cpp @@ -26,8 +26,6 @@ extern "C" { #include -#include -#include #include #include #include @@ -52,6 +50,9 @@ 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 5419b17261..1116daeb61 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-price.cpp @@ -27,13 +27,13 @@ extern "C" { #include #endif -#include -#include - #include "engine-helpers.h" #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 4129c317a3..dac6baf8e2 100644 --- a/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp +++ b/gnucash/import-export/csv-imp/gnc-imp-props-tx.cpp @@ -26,8 +26,6 @@ extern "C" { #include #endif -#include -#include #include "engine-helpers.h" #include "gnc-csv-account-map.h" @@ -39,6 +37,9 @@ extern "C" { } +#include +#include + #include #include #include diff --git a/gnucash/register/register-gnome/datecell-gnome.c b/gnucash/register/register-gnome/datecell-gnome.c index c716465b43..ca0b961f79 100644 --- a/gnucash/register/register-gnome/datecell-gnome.c +++ b/gnucash/register/register-gnome/datecell-gnome.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "datecell.h" diff --git a/libgnucash/app-utils/gnc-sx-instance-model.c b/libgnucash/app-utils/gnc-sx-instance-model.c index 98bb1757c4..465cf68df7 100644 --- a/libgnucash/app-utils/gnc-sx-instance-model.c +++ b/libgnucash/app-utils/gnc-sx-instance-model.c @@ -32,6 +32,7 @@ #include #include +#include #include #include diff --git a/libgnucash/app-utils/gnc-ui-balances.c b/libgnucash/app-utils/gnc-ui-balances.c index 27ce976666..86b747cbc6 100644 --- a/libgnucash/app-utils/gnc-ui-balances.c +++ b/libgnucash/app-utils/gnc-ui-balances.c @@ -29,6 +29,7 @@ #include "gnc-ui-util.h" #include +#include #include "Account.h" #include "Split.h" diff --git a/libgnucash/backend/dbi/gnc-backend-dbi.cpp b/libgnucash/backend/dbi/gnc-backend-dbi.cpp index fdb7a3357c..e10c5b84ca 100644 --- a/libgnucash/backend/dbi/gnc-backend-dbi.cpp +++ b/libgnucash/backend/dbi/gnc-backend-dbi.cpp @@ -37,9 +37,6 @@ extern "C" #include #include -#include -#include - #include "qof.h" #include "qofquery-p.h" #include "qofquerycore-p.h" @@ -61,6 +58,10 @@ extern "C" #endif } + +#include +#include + #include #include #include diff --git a/libgnucash/backend/sql/gnc-address-sql.cpp b/libgnucash/backend/sql/gnc-address-sql.cpp index e3c18ca9bc..8e78f08764 100644 --- a/libgnucash/backend/sql/gnc-address-sql.cpp +++ b/libgnucash/backend/sql/gnc-address-sql.cpp @@ -31,12 +31,12 @@ extern "C" { #include -#include - #include "gnc-engine.h" #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 d38487deb7..580708f373 100644 --- a/libgnucash/backend/sql/gnc-book-sql.cpp +++ b/libgnucash/backend/sql/gnc-book-sql.cpp @@ -29,8 +29,6 @@ extern "C" { #include -#include - #include "qof.h" #include "gnc-engine.h" @@ -42,6 +40,8 @@ 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 6d3d84a9c8..7fbc5c83c0 100644 --- a/libgnucash/backend/sql/gnc-customer-sql.cpp +++ b/libgnucash/backend/sql/gnc-customer-sql.cpp @@ -31,7 +31,6 @@ extern "C" { #include -#include #include #include @@ -40,6 +39,8 @@ 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 20c7fb526d..c5b17fdb7c 100644 --- a/libgnucash/backend/sql/gnc-employee-sql.cpp +++ b/libgnucash/backend/sql/gnc-employee-sql.cpp @@ -31,13 +31,13 @@ extern "C" { #include -#include #include #include #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 554a50e6cc..f7b9ef4a3a 100644 --- a/libgnucash/backend/sql/gnc-entry-sql.cpp +++ b/libgnucash/backend/sql/gnc-entry-sql.cpp @@ -31,7 +31,6 @@ extern "C" { #include -#include #include #include @@ -40,6 +39,7 @@ 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 c688271525..421992ffd8 100644 --- a/libgnucash/backend/sql/gnc-job-sql.cpp +++ b/libgnucash/backend/sql/gnc-job-sql.cpp @@ -31,12 +31,12 @@ extern "C" { #include -#include #include #include #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 1fcc5d5d96..95233b342f 100644 --- a/libgnucash/backend/sql/gnc-price-sql.cpp +++ b/libgnucash/backend/sql/gnc-price-sql.cpp @@ -29,8 +29,6 @@ extern "C" { #include -#include - #include "qof.h" #include "gnc-pricedb.h" @@ -38,6 +36,7 @@ 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 892b83d1a5..3aa33e54a7 100644 --- a/libgnucash/backend/sql/gnc-recurrence-sql.cpp +++ b/libgnucash/backend/sql/gnc-recurrence-sql.cpp @@ -29,8 +29,6 @@ extern "C" { #include -#include - #include "qof.h" #include "gnc-engine.h" #include "Recurrence.h" @@ -39,6 +37,7 @@ 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 c883a92085..c9147ec3aa 100644 --- a/libgnucash/backend/sql/gnc-schedxaction-sql.cpp +++ b/libgnucash/backend/sql/gnc-schedxaction-sql.cpp @@ -29,8 +29,6 @@ extern "C" { #include -#include - #include "qof.h" #include "SchedXaction.h" #include "SX-book.h" @@ -41,6 +39,8 @@ 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 11b27686d1..57dd78b4af 100644 --- a/libgnucash/backend/sql/gnc-vendor-sql.cpp +++ b/libgnucash/backend/sql/gnc-vendor-sql.cpp @@ -30,8 +30,6 @@ extern "C" { #include - -#include #include #include @@ -41,6 +39,8 @@ 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 4feb75fae0..3647c036c9 100644 --- a/libgnucash/backend/xml/gnc-account-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-account-xml-v2.cpp @@ -25,14 +25,14 @@ extern "C" { #include - -#include #include #include #include #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 026e3e430c..c3484f674f 100644 --- a/libgnucash/backend/xml/gnc-address-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-address-xml-v2.cpp @@ -24,11 +24,11 @@ extern "C" { #include - -#include #include #include } +#include + #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-backend-xml.cpp b/libgnucash/backend/xml/gnc-backend-xml.cpp index 10a0d7cd8e..2acdf71a05 100644 --- a/libgnucash/backend/xml/gnc-backend-xml.cpp +++ b/libgnucash/backend/xml/gnc-backend-xml.cpp @@ -32,9 +32,6 @@ extern "C" #include -#include -#include -#include #include #include #include @@ -76,6 +73,10 @@ extern "C" #endif } +#include +#include +#include + #include #include "gnc-backend-xml.h" #include diff --git a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp index c61f042b9b..06c6799f2b 100644 --- a/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-bill-term-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include diff --git a/libgnucash/backend/xml/gnc-book-xml-v2.cpp b/libgnucash/backend/xml/gnc-book-xml-v2.cpp index e049eb7875..2270b9527d 100644 --- a/libgnucash/backend/xml/gnc-book-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-book-xml-v2.cpp @@ -25,13 +25,13 @@ extern "C" { #include - -#include #include #include #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 b30d203f40..c39c6a0c79 100644 --- a/libgnucash/backend/xml/gnc-budget-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-budget-xml-v2.cpp @@ -24,12 +24,12 @@ extern "C" { #include - -#include #include #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 e09950db2b..dd04f2100d 100644 --- a/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-commodity-xml-v2.cpp @@ -24,13 +24,13 @@ extern "C" { #include - -#include #include #include "AccountP.h" #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 dcaa9bff31..4396b7c151 100644 --- a/libgnucash/backend/xml/gnc-customer-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-customer-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include @@ -34,6 +32,8 @@ 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 5eec282a83..eaae536a22 100644 --- a/libgnucash/backend/xml/gnc-employee-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-employee-xml-v2.cpp @@ -24,12 +24,11 @@ extern "C" { #include - -#include #include #include #include "gncEmployeeP.h" } +#include #include "gnc-xml-helper.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp index 25b88d9354..df87a1f421 100644 --- a/libgnucash/backend/xml/gnc-entry-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-entry-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include @@ -35,6 +33,8 @@ 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 fe875f7efd..ec3edac8b3 100644 --- a/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-freqspec-xml-v2.cpp @@ -25,13 +25,12 @@ extern "C" { #include - -#include #include #include "qof.h" #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 333fbe5d4c..3231198bcf 100644 --- a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp @@ -24,14 +24,13 @@ extern "C" { #include - -#include #include #include #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 ba1ab367f3..1132a996d3 100644 --- a/libgnucash/backend/xml/gnc-job-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-job-xml-v2.cpp @@ -24,12 +24,11 @@ extern "C" { #include - -#include #include #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 8bccae7226..d42a5b4b7b 100644 --- a/libgnucash/backend/xml/gnc-lot-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-lot-xml-v2.cpp @@ -25,13 +25,12 @@ extern "C" { #include - -#include #include #include #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 0b45ff9f01..3b95d6ce09 100644 --- a/libgnucash/backend/xml/gnc-order-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-order-xml-v2.cpp @@ -24,12 +24,11 @@ extern "C" { #include - -#include #include #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 c9fc9ba989..42931c3e7d 100644 --- a/libgnucash/backend/xml/gnc-owner-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-owner-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include #include "gncCustomerP.h" @@ -33,6 +31,7 @@ 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 e2dd884d7b..b67e24b078 100644 --- a/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-recurrence-xml-v2.cpp @@ -24,12 +24,11 @@ extern "C" { #include - -#include #include #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 cb104e1a03..195f5a7389 100644 --- a/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-schedxaction-xml-v2.cpp @@ -23,12 +23,11 @@ extern "C" { #include - -#include #include #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 b9206a6260..b8e602fa48 100644 --- a/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-tax-table-xml-v2.cpp @@ -24,13 +24,12 @@ extern "C" { #include - -#include #include #include #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 b4aad73092..560c0d0c67 100644 --- a/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-transaction-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include "AccountP.h" #include "Transaction.h" @@ -33,6 +31,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 983e4f2586..e88fe7932c 100644 --- a/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-vendor-xml-v2.cpp @@ -24,8 +24,6 @@ extern "C" { #include - -#include #include #include #include "gncBillTermP.h" @@ -33,6 +31,7 @@ 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 dc3bbb19b7..73c2cda4c1 100644 --- a/libgnucash/backend/xml/gnc-xml-backend.cpp +++ b/libgnucash/backend/xml/gnc-xml-backend.cpp @@ -27,8 +27,6 @@ extern "C" #include #include #include -#include -#include #include #include //for GNC_MOD_BACKEND @@ -38,6 +36,8 @@ extern "C" } +#include +#include #include #include "gnc-xml-backend.hpp" diff --git a/libgnucash/backend/xml/gnc-xml-helper.cpp b/libgnucash/backend/xml/gnc-xml-helper.cpp index 61df6c2e44..2e4dd81531 100644 --- a/libgnucash/backend/xml/gnc-xml-helper.cpp +++ b/libgnucash/backend/xml/gnc-xml-helper.cpp @@ -21,10 +21,7 @@ * Boston, MA 02110-1301, USA gnu@gnu.org * * * \********************************************************************/ -extern "C" -{ #include -} #include "gnc-xml-helper.h" diff --git a/libgnucash/backend/xml/gnc-xml-helper.h b/libgnucash/backend/xml/gnc-xml-helper.h index 601f89bcd5..6c0f91d8d4 100644 --- a/libgnucash/backend/xml/gnc-xml-helper.h +++ b/libgnucash/backend/xml/gnc-xml-helper.h @@ -24,6 +24,9 @@ #ifndef GNC_XML_HELPER_H #define GNC_XML_HELPER_H + +#include + extern "C" { #include diff --git a/libgnucash/backend/xml/io-example-account.cpp b/libgnucash/backend/xml/io-example-account.cpp index 918217ee43..a9b4be1900 100644 --- a/libgnucash/backend/xml/io-example-account.cpp +++ b/libgnucash/backend/xml/io-example-account.cpp @@ -41,9 +41,6 @@ extern "C" # include #endif -#include -#include -#include #include "gnc-engine.h" #include "Scrub.h" #include "TransLog.h" @@ -53,6 +50,9 @@ extern "C" #endif } +#include +#include +#include #include "sixtp.h" #include "gnc-xml.h" diff --git a/libgnucash/backend/xml/io-gncxml-gen.h b/libgnucash/backend/xml/io-gncxml-gen.h index 5ad7b8eeb3..dc1e7f6606 100644 --- a/libgnucash/backend/xml/io-gncxml-gen.h +++ b/libgnucash/backend/xml/io-gncxml-gen.h @@ -24,10 +24,8 @@ #ifndef IO_GNCXML_GEN_H #define IO_GNCXML_GEN_H -extern "C" -{ + #include -} #include "sixtp.h" diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp index 7f7fc900f1..1b6e225326 100644 --- a/libgnucash/backend/xml/io-gncxml-v2.cpp +++ b/libgnucash/backend/xml/io-gncxml-v2.cpp @@ -36,8 +36,6 @@ extern "C" #endif #include #endif -#include -#include #include #include #ifdef HAVE_UNISTD_H @@ -66,6 +64,9 @@ 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 8d9cbfe44d..ca2f7e2037 100644 --- a/libgnucash/backend/xml/io-utils.cpp +++ b/libgnucash/backend/xml/io-utils.cpp @@ -26,9 +26,9 @@ extern "C" #include #include +} #include -} #include "gnc-xml.h" #include "io-utils.h" diff --git a/libgnucash/backend/xml/sixtp-dom-generators.cpp b/libgnucash/backend/xml/sixtp-dom-generators.cpp index d8a58eda00..0b9a914a2f 100644 --- a/libgnucash/backend/xml/sixtp-dom-generators.cpp +++ b/libgnucash/backend/xml/sixtp-dom-generators.cpp @@ -25,10 +25,10 @@ extern "C" #define __EXTENSIONS__ #include -#include #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 7762903963..9b05f48833 100644 --- a/libgnucash/backend/xml/sixtp-dom-parsers.cpp +++ b/libgnucash/backend/xml/sixtp-dom-parsers.cpp @@ -24,13 +24,13 @@ extern "C" { #include -#include #include -#include "gnc-xml-helper.h" #include } +#include +#include "gnc-xml-helper.h" #include "sixtp-utils.h" #include "sixtp-dom-parsers.h" #include diff --git a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp index 9aba0801a3..277a6f8672 100644 --- a/libgnucash/backend/xml/sixtp-to-dom-parser.cpp +++ b/libgnucash/backend/xml/sixtp-to-dom-parser.cpp @@ -23,12 +23,11 @@ extern "C" { #include - -#include - #include } +#include + #include "sixtp-parsers.h" #include "sixtp-utils.h" #include "sixtp.h" diff --git a/libgnucash/backend/xml/sixtp.cpp b/libgnucash/backend/xml/sixtp.cpp index 95f499514f..d231efa40c 100644 --- a/libgnucash/backend/xml/sixtp.cpp +++ b/libgnucash/backend/xml/sixtp.cpp @@ -23,9 +23,6 @@ extern "C" { #include - -#include -#include #include #include #include @@ -37,6 +34,9 @@ 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 5aa7992357..585a42ac12 100644 --- a/libgnucash/backend/xml/sixtp.h +++ b/libgnucash/backend/xml/sixtp.h @@ -25,12 +25,12 @@ #define SIXTP_H extern "C" { -#include #include #include #include "gnc-engine.h" } +#include #include "gnc-xml-helper.h" #include "gnc-backend-xml.h" diff --git a/libgnucash/core-utils/gnc-filepath-utils.cpp b/libgnucash/core-utils/gnc-filepath-utils.cpp index da1bf5189a..a6446ba724 100644 --- a/libgnucash/core-utils/gnc-filepath-utils.cpp +++ b/libgnucash/core-utils/gnc-filepath-utils.cpp @@ -26,6 +26,11 @@ * @author Copyright (c) 2000 Dave Peticolas */ +#include +#include +#include +#include + extern "C" { #include @@ -35,10 +40,6 @@ extern "C" { #include #endif -#include -#include -#include -#include #include #include diff --git a/libgnucash/core-utils/gnc-locale-utils.cpp b/libgnucash/core-utils/gnc-locale-utils.cpp index 10574c2100..c73a02dd59 100644 --- a/libgnucash/core-utils/gnc-locale-utils.cpp +++ b/libgnucash/core-utils/gnc-locale-utils.cpp @@ -19,10 +19,7 @@ * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 * * Boston, MA 02110-1301, USA gnu@gnu.org * \********************************************************************/ -extern "C" -{ #include -} #include #include #include "gnc-locale-utils.hpp" diff --git a/libgnucash/core-utils/gnc-prefs.h b/libgnucash/core-utils/gnc-prefs.h index b18d1e0796..7d7a104d0e 100644 --- a/libgnucash/core-utils/gnc-prefs.h +++ b/libgnucash/core-utils/gnc-prefs.h @@ -45,7 +45,11 @@ #ifndef GNC_PREFS_H #define GNC_PREFS_H +#ifdef __cplusplus +extern "C++" { #include +} +#endif /* Preference groups used across multiple modules */ #define GNC_PREFS_GROUP_GENERAL "general" diff --git a/libgnucash/engine/SX-book.h b/libgnucash/engine/SX-book.h index 0b674ebd30..111aaceafb 100644 --- a/libgnucash/engine/SX-book.h +++ b/libgnucash/engine/SX-book.h @@ -42,7 +42,11 @@ typedef struct xaccSchedXactionsDef SchedXactions; typedef struct _SchedXactionsClass SchedXactionsClass; +#ifdef __cplusplus +extern "C++" { #include +} +#endif #include "SchedXaction.h" #include "qof.h" diff --git a/libgnucash/engine/engine-helpers.h b/libgnucash/engine/engine-helpers.h index 4b3abe6ee8..517d4e1489 100644 --- a/libgnucash/engine/engine-helpers.h +++ b/libgnucash/engine/engine-helpers.h @@ -25,7 +25,11 @@ #ifndef ENGINE_HELPERS_H #define ENGINE_HELPERS_H +#ifdef __cplusplus +extern "C++" { #include +} +#endif #include "gnc-engine.h" #include "Account.h" diff --git a/libgnucash/engine/gnc-commodity.h b/libgnucash/engine/gnc-commodity.h index 1f20a7189f..afb18fee3f 100644 --- a/libgnucash/engine/gnc-commodity.h +++ b/libgnucash/engine/gnc-commodity.h @@ -49,8 +49,13 @@ typedef struct _GncCommodityClass gnc_commodityClass; typedef struct _GncCommodityNamespaceClass gnc_commodity_namespaceClass; +#ifdef __cplusplus +extern "C++" { #include #include +} +#endif + #include "gnc-engine.h" #ifdef __cplusplus diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp index 5cdf3a655b..2f48aa91f3 100644 --- a/libgnucash/engine/gnc-date.cpp +++ b/libgnucash/engine/gnc-date.cpp @@ -26,11 +26,11 @@ \********************************************************************/ #define __EXTENSIONS__ +#include extern "C" { #include -#include #include #include #include "platform.h" diff --git a/libgnucash/engine/gnc-date.h b/libgnucash/engine/gnc-date.h index b911fa58b9..7556fd1c66 100644 --- a/libgnucash/engine/gnc-date.h +++ b/libgnucash/engine/gnc-date.h @@ -68,12 +68,21 @@ #ifndef GNC_DATE_H #define GNC_DATE_H + + #ifdef __cplusplus extern "C" { #endif - + +#ifdef __cplusplus +extern "C++" { +#endif #include +#ifdef __cplusplus +} +#endif + #include /** diff --git a/libgnucash/engine/gnc-engine.h b/libgnucash/engine/gnc-engine.h index 651cf44e52..80aa8b4c29 100644 --- a/libgnucash/engine/gnc-engine.h +++ b/libgnucash/engine/gnc-engine.h @@ -36,7 +36,12 @@ #ifndef GNC_ENGINE_H #define GNC_ENGINE_H +#ifdef __cplusplus +extern "C++" { #include +} +#endif + #include "qof.h" #ifdef __cplusplus diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp index 5e6773847c..040845a31f 100644 --- a/libgnucash/engine/gnc-numeric.cpp +++ b/libgnucash/engine/gnc-numeric.cpp @@ -26,7 +26,6 @@ extern "C" { #include -#include #include #include #include @@ -35,6 +34,7 @@ extern "C" #include "qof.h" } +#include #include #include #include diff --git a/libgnucash/engine/gncBusiness.h b/libgnucash/engine/gncBusiness.h index a0190e242c..1b7ce063b1 100644 --- a/libgnucash/engine/gncBusiness.h +++ b/libgnucash/engine/gncBusiness.h @@ -34,7 +34,11 @@ #ifndef GNC_BUSINESS_H_ #define GNC_BUSINESS_H_ +#ifdef __cplusplus +extern "C++" { #include +} +#endif #include "qof.h" #include "Account.h" diff --git a/libgnucash/engine/gncEntry.h b/libgnucash/engine/gncEntry.h index d1d850fea4..8c8c82e112 100644 --- a/libgnucash/engine/gncEntry.h +++ b/libgnucash/engine/gncEntry.h @@ -31,6 +31,12 @@ #ifndef GNC_ENTRY_H_ #define GNC_ENTRY_H_ +#ifdef __cplusplus +extern "C++" { +#include +} +#endif + typedef struct _gncEntry GncEntry; typedef struct _gncEntryClass GncEntryClass; diff --git a/libgnucash/engine/qof-string-cache.cpp b/libgnucash/engine/qof-string-cache.cpp index caba239fbb..738bbf063e 100644 --- a/libgnucash/engine/qof-string-cache.cpp +++ b/libgnucash/engine/qof-string-cache.cpp @@ -31,12 +31,13 @@ extern "C" #include #include -#include #include #include #include "qof.h" } +#include + /* Uncomment if you need to log anything. static QofLogModule log_module = QOF_MOD_UTIL; */ diff --git a/libgnucash/engine/qof.h b/libgnucash/engine/qof.h index 08baaeabb2..ac3fbf569c 100644 --- a/libgnucash/engine/qof.h +++ b/libgnucash/engine/qof.h @@ -68,7 +68,11 @@ */ /** @} */ +#ifdef __cplusplus +extern "C++" { #include +} +#endif #include "qofid.h" #include "qoflog.h" #include "gnc-date.h" diff --git a/libgnucash/engine/qofbook.cpp b/libgnucash/engine/qofbook.cpp index 55f8cf44b6..47cfa85fbb 100644 --- a/libgnucash/engine/qofbook.cpp +++ b/libgnucash/engine/qofbook.cpp @@ -41,7 +41,6 @@ extern "C" #include #include -#include #ifdef GNC_PLATFORM_WINDOWS /* Mingw disables the standard type macros for C++ without this override. */ #define __STDC_FORMAT_MACROS = 1 @@ -50,6 +49,7 @@ extern "C" } +#include #include "qof.h" #include "qofevent-p.h" #include "qofbackend.h" diff --git a/libgnucash/engine/qofchoice.cpp b/libgnucash/engine/qofchoice.cpp index 715417efa2..16a9e4a7a6 100644 --- a/libgnucash/engine/qofchoice.cpp +++ b/libgnucash/engine/qofchoice.cpp @@ -21,14 +21,9 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -extern "C" -{ - #include #include -} - #include "qof.h" #include "qofchoice.h" diff --git a/libgnucash/engine/qofclass.cpp b/libgnucash/engine/qofclass.cpp index acaa8fb1cf..fdabf3fb09 100644 --- a/libgnucash/engine/qofclass.cpp +++ b/libgnucash/engine/qofclass.cpp @@ -21,11 +21,8 @@ * * \********************************************************************/ -extern "C" -{ #include #include -} #include "qof.h" #include "qofclass-p.h" diff --git a/libgnucash/engine/qofevent.cpp b/libgnucash/engine/qofevent.cpp index 674cdeb89a..ae69048f4c 100644 --- a/libgnucash/engine/qofevent.cpp +++ b/libgnucash/engine/qofevent.cpp @@ -22,11 +22,8 @@ * * ********************************************************************/ -extern "C" -{ #include #include -} #include "qof.h" #include "qofevent-p.h" diff --git a/libgnucash/engine/qofid.cpp b/libgnucash/engine/qofid.cpp index 7f713c66f2..ac5167fca2 100644 --- a/libgnucash/engine/qofid.cpp +++ b/libgnucash/engine/qofid.cpp @@ -26,9 +26,9 @@ extern "C" { #include #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 a545ff0512..f91817668c 100644 --- a/libgnucash/engine/qoflog.cpp +++ b/libgnucash/engine/qoflog.cpp @@ -34,8 +34,6 @@ extern "C" #include #endif -#include -#include #ifdef HAVE_UNISTD_H # include #else @@ -48,10 +46,12 @@ extern "C" #include #include -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "qof.log" } +#include +#include +#undef G_LOG_DOMAIN +#define G_LOG_DOMAIN "qof.log" #include "qof.h" #include "qoflog.h" #include diff --git a/libgnucash/engine/qofobject.cpp b/libgnucash/engine/qofobject.cpp index ba87e34342..0138aad159 100644 --- a/libgnucash/engine/qofobject.cpp +++ b/libgnucash/engine/qofobject.cpp @@ -23,11 +23,8 @@ * Copyright (C) 2001 Derek Atkins * Author: Derek Atkins */ -extern "C" -{ #include #include -} #include "qof.h" #include "qofobject-p.h" diff --git a/libgnucash/engine/qofquery.cpp b/libgnucash/engine/qofquery.cpp index 5af8560396..41d49c1bb5 100644 --- a/libgnucash/engine/qofquery.cpp +++ b/libgnucash/engine/qofquery.cpp @@ -27,11 +27,11 @@ extern "C" #include #include -#include #include #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 86edb1fc67..dd96a609a1 100644 --- a/libgnucash/engine/qofsession.cpp +++ b/libgnucash/engine/qofsession.cpp @@ -48,13 +48,13 @@ extern "C" # endif #endif -#include #include "qof.h" #include "qofobject-p.h" static QofLogModule log_module = QOF_MOD_SESSION; } //extern 'C' +#include #include "qofbook-p.h" #include "qof-backend.hpp" #include "qofsession.hpp"