diff --git a/ChangeLog b/ChangeLog index 28be41b127..198e81f5af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-03-09 David Hampton + + * numerous: Never include "config.h" from a header file. Doing so + makes it nigh impossible to override configuration settings. + 2006-03-08 David Hampton * numerous: Remove more functions to be deprecated in diff --git a/lib/libc/setenv.c b/lib/libc/setenv.c index c5594872aa..9d86ad4c6a 100644 --- a/lib/libc/setenv.c +++ b/lib/libc/setenv.c @@ -20,6 +20,8 @@ * \********************************************************************/ +#include "config.h" + #include #include #include diff --git a/lib/libc/setenv.h b/lib/libc/setenv.h index 9f7339e1ca..f5b47287f6 100644 --- a/lib/libc/setenv.h +++ b/lib/libc/setenv.h @@ -23,8 +23,6 @@ #ifndef __SETENV_H #define __SETENV_H -#include "config.h" - #ifndef HAVE_SETENV int setenv(const char *name, const char *value, int overwrite); diff --git a/lib/libqof/backend/file/qsf-backend.c b/lib/libqof/backend/file/qsf-backend.c index a0e628365f..bb05cf27c3 100644 --- a/lib/libqof/backend/file/qsf-backend.c +++ b/lib/libqof/backend/file/qsf-backend.c @@ -23,6 +23,9 @@ #define _GNU_SOURCE +#include "config.h" +#undef G_DISABLE_DEPRECATED /* for g_strncasecmp */ + #include "qof.h" #include "qof-backend-qsf.h" #include "qsf-xml.h" diff --git a/lib/libqof/backend/file/qsf-xml-map.c b/lib/libqof/backend/file/qsf-xml-map.c index 5ea69cfcd2..85d1ca20d6 100644 --- a/lib/libqof/backend/file/qsf-xml-map.c +++ b/lib/libqof/backend/file/qsf-xml-map.c @@ -23,6 +23,8 @@ #define _GNU_SOURCE +#include "config.h" + #include #include #include diff --git a/lib/libqof/backend/file/qsf-xml.c b/lib/libqof/backend/file/qsf-xml.c index e267c387f1..4d660a3c5f 100644 --- a/lib/libqof/backend/file/qsf-xml.c +++ b/lib/libqof/backend/file/qsf-xml.c @@ -23,6 +23,8 @@ #define _GNU_SOURCE +#include "config.h" + #include #include "qof.h" #include "qof-backend-qsf.h" diff --git a/lib/libqof/qof/deprecated.c b/lib/libqof/qof/deprecated.c index 74d4cf1587..4d9bc0a9eb 100644 --- a/lib/libqof/qof/deprecated.c +++ b/lib/libqof/qof/deprecated.c @@ -21,6 +21,7 @@ * * \********************************************************************/ +#include "config.h" #include "qof.h" /* Don't be fooled: gnc_trace_num_spaces has external linkage and diff --git a/lib/libqof/qof/gnc-engine-util.h b/lib/libqof/qof/gnc-engine-util.h index 6ab250d90f..a48da4542f 100644 --- a/lib/libqof/qof/gnc-engine-util.h +++ b/lib/libqof/qof/gnc-engine-util.h @@ -35,7 +35,6 @@ #include #include -#include "config.h" #include "qof.h" /* Macros *****************************************************/ diff --git a/lib/libqof/qof/kvp-util-p.h b/lib/libqof/qof/kvp-util-p.h index 5fc9cc84dc..490f644630 100644 --- a/lib/libqof/qof/kvp-util-p.h +++ b/lib/libqof/qof/kvp-util-p.h @@ -23,8 +23,6 @@ #ifndef XACC_KVP_UTIL_P_H #define XACC_KVP_UTIL_P_H -#include "config.h" - #include "guid.h" #include "kvp_frame.h" diff --git a/lib/libqof/qof/kvp-util.h b/lib/libqof/qof/kvp-util.h index fdd058f1e2..6bd35125f1 100644 --- a/lib/libqof/qof/kvp-util.h +++ b/lib/libqof/qof/kvp-util.h @@ -33,8 +33,6 @@ #ifndef GNC_KVP_UTIL_H #define GNC_KVP_UTIL_H -#include "config.h" - typedef struct { gpointer key; gpointer value; diff --git a/lib/libqof/qof/qof_book_merge.c b/lib/libqof/qof/qof_book_merge.c index 7d9159ba18..fa62f559e2 100644 --- a/lib/libqof/qof/qof_book_merge.c +++ b/lib/libqof/qof/qof_book_merge.c @@ -21,6 +21,7 @@ * * ********************************************************************/ +#include "config.h" #include "qof.h" static QofLogModule log_module = QOF_MOD_MERGE; diff --git a/lib/libqof/qof/qofbackend-p.h b/lib/libqof/qof/qofbackend-p.h index 334536613a..3354cd4052 100644 --- a/lib/libqof/qof/qofbackend-p.h +++ b/lib/libqof/qof/qofbackend-p.h @@ -41,7 +41,6 @@ #ifndef QOF_BACKEND_P_H #define QOF_BACKEND_P_H -#include "config.h" #include "qof-be-utils.h" #include "qofbackend.h" #include "qofbook.h" diff --git a/lib/libqof/qof/qofchoice.c b/lib/libqof/qof/qofchoice.c index 1ceb5ec74d..186d746ce0 100644 --- a/lib/libqof/qof/qofchoice.c +++ b/lib/libqof/qof/qofchoice.c @@ -21,6 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" #include #include "qof.h" #include "qofchoice.h" diff --git a/lib/libqof/qof/qofgobj.c b/lib/libqof/qof/qofgobj.c index bee63423df..7d0515cbab 100644 --- a/lib/libqof/qof/qofgobj.c +++ b/lib/libqof/qof/qofgobj.c @@ -20,6 +20,7 @@ * * \********************************************************************/ +#include "config.h" #include "qof.h" #include "qofgobj.h" diff --git a/lib/libqof/qof/qofinstance.c b/lib/libqof/qof/qofinstance.c index 4b27090619..9830c543b9 100644 --- a/lib/libqof/qof/qofinstance.c +++ b/lib/libqof/qof/qofinstance.c @@ -27,6 +27,7 @@ * Copyright (C) 2003 Linas Vepstas */ +#include "config.h" #include "qof.h" #include "kvp-util-p.h" #include "qofbook-p.h" diff --git a/lib/libqof/qof/qofquery-deserial.c b/lib/libqof/qof/qofquery-deserial.c index c4fcf23857..0d727ff18f 100644 --- a/lib/libqof/qof/qofquery-deserial.c +++ b/lib/libqof/qof/qofquery-deserial.c @@ -21,7 +21,7 @@ * * \********************************************************************/ -// #include "config.h" +#include "config.h" /* NOTE: Development of this idea has ceased and this file is no longer included in the QOF library. It remains in CVS for now.*/ diff --git a/lib/libqof/qof/qofreference.c b/lib/libqof/qof/qofreference.c index b70b6a8811..81e1a4a2a3 100644 --- a/lib/libqof/qof/qofreference.c +++ b/lib/libqof/qof/qofreference.c @@ -21,6 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include "config.h" #include "qofreference.h" static void diff --git a/lib/libqof/qof/qofsql.c b/lib/libqof/qof/qofsql.c index e57051edfd..d2730f2d64 100644 --- a/lib/libqof/qof/qofsql.c +++ b/lib/libqof/qof/qofsql.c @@ -28,10 +28,11 @@ */ #define _GNU_SOURCE +#include "config.h" + #include /* for working atoll */ #include #include "glib.h" -#include "config.h" #ifdef HAVE_GDA #include #else diff --git a/src/RecnWindow.h b/src/RecnWindow.h index 999ba2c5cb..08566c757e 100644 --- a/src/RecnWindow.h +++ b/src/RecnWindow.h @@ -27,8 +27,6 @@ #ifndef RECONCILE_H #define RECONCILE_H -#include "config.h" - #include "gnc-ui-common.h" #include "Account.h" diff --git a/src/app-utils/gnc-exp-parser.h b/src/app-utils/gnc-exp-parser.h index d6ae218562..c17d3663a7 100644 --- a/src/app-utils/gnc-exp-parser.h +++ b/src/app-utils/gnc-exp-parser.h @@ -20,8 +20,6 @@ #ifndef GNC_EXP_PARSER_H #define GNC_EXP_PARSER_H -#include "config.h" - #include #include "qof.h" diff --git a/src/app-utils/gnc-ui-common.h b/src/app-utils/gnc-ui-common.h index c2e7dfc4e8..c00c807788 100644 --- a/src/app-utils/gnc-ui-common.h +++ b/src/app-utils/gnc-ui-common.h @@ -25,10 +25,6 @@ #ifndef GNC_UI_COMMON_H #define GNC_UI_COMMON_H -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - #if defined(GNOME) #include #elif defined(MOTIF) diff --git a/src/app-utils/gnc-ui-util.h b/src/app-utils/gnc-ui-util.h index 22c131f3e6..33c801d0d3 100644 --- a/src/app-utils/gnc-ui-util.h +++ b/src/app-utils/gnc-ui-util.h @@ -32,8 +32,6 @@ #ifndef GNC_UI_UTIL_H #define GNC_UI_UTIL_H -#include "config.h" - #include #include diff --git a/src/app-utils/gw-app-utils-spec.scm b/src/app-utils/gw-app-utils-spec.scm index 81691bdfbe..b057cedbe7 100644 --- a/src/app-utils/gw-app-utils-spec.scm +++ b/src/app-utils/gw-app-utils-spec.scm @@ -26,6 +26,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" "#include \n" "#include \n" diff --git a/src/backend/file/gnc-xml-helper.h b/src/backend/file/gnc-xml-helper.h index 28b6d8f9bc..a08afbd30f 100644 --- a/src/backend/file/gnc-xml-helper.h +++ b/src/backend/file/gnc-xml-helper.h @@ -25,8 +25,6 @@ #ifndef GNC_XML_HELPER_H #define GNC_XML_HELPER_H -#include "config.h" - #include # include diff --git a/src/backend/file/gnc-xml.h b/src/backend/file/gnc-xml.h index 061dc822d9..122863d4fc 100644 --- a/src/backend/file/gnc-xml.h +++ b/src/backend/file/gnc-xml.h @@ -25,8 +25,6 @@ #ifndef GNC_XML_H #define GNC_XML_H -#include "config.h" - #include "FreqSpec.h" #include "SchedXaction.h" #include "gnc-engine.h" diff --git a/src/backend/file/sixtp-dom-generators.h b/src/backend/file/sixtp-dom-generators.h index e02e8cb06d..46f0bfb7b6 100644 --- a/src/backend/file/sixtp-dom-generators.h +++ b/src/backend/file/sixtp-dom-generators.h @@ -24,8 +24,6 @@ #ifndef SIXTP_DOM_GENERATORS_H #define SIXTP_DOM_GENERATORS_H -#include "config.h" - #include #include "gnc-xml-helper.h" diff --git a/src/backend/file/sixtp-dom-parsers.h b/src/backend/file/sixtp-dom-parsers.h index 7a5a4a8194..c1d71488d4 100644 --- a/src/backend/file/sixtp-dom-parsers.h +++ b/src/backend/file/sixtp-dom-parsers.h @@ -24,8 +24,6 @@ #ifndef SIXTP_DOM_PARSERS_H #define SIXTP_DOM_PARSERS_H -#include "config.h" - #include #include "gnc-xml-helper.h" diff --git a/src/backend/file/test/test-file-stuff.h b/src/backend/file/test/test-file-stuff.h index 51d21b0cd2..fcc256cc80 100644 --- a/src/backend/file/test/test-file-stuff.h +++ b/src/backend/file/test/test-file-stuff.h @@ -5,8 +5,6 @@ #ifndef TEST_FILE_STUFF_H #define TEST_FILE_STUFF_H -#include "config.h" - #include #include "gnc-commodity.h" diff --git a/src/backend/postgres/checkpoint.c b/src/backend/postgres/checkpoint.c index 76ab83287b..f0e6d5169f 100644 --- a/src/backend/postgres/checkpoint.c +++ b/src/backend/postgres/checkpoint.c @@ -33,6 +33,8 @@ * */ +#include "config.h" + #define _GNU_SOURCE #include #include diff --git a/src/business/business-gnome/gw-business-gnome-spec.scm b/src/business/business-gnome/gw-business-gnome-spec.scm index 9e0cab5cba..c957b7a73b 100644 --- a/src/business/business-gnome/gw-business-gnome-spec.scm +++ b/src/business/business-gnome/gw-business-gnome-spec.scm @@ -32,6 +32,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" "#include \n" "#include \n" diff --git a/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm b/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm index 0f34afc3c6..b2a8533b9f 100644 --- a/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm +++ b/src/business/dialog-tax-table/gw-dialog-tax-table-spec.scm @@ -32,6 +32,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" ))) diff --git a/src/engine/AccountP.h b/src/engine/AccountP.h index 4aaca32419..56c0cdab26 100644 --- a/src/engine/AccountP.h +++ b/src/engine/AccountP.h @@ -39,7 +39,6 @@ #ifndef XACC_ACCOUNT_P_H #define XACC_ACCOUNT_P_H -#include "config.h" #include "Account.h" #include "gnc-commodity.h" #include "gnc-engine.h" diff --git a/src/engine/FreqSpec.h b/src/engine/FreqSpec.h index 33dcb8e346..7803888151 100644 --- a/src/engine/FreqSpec.h +++ b/src/engine/FreqSpec.h @@ -59,7 +59,6 @@ #ifndef XACC_FREQSPEC_H #define XACC_FREQSPEC_H -#include "config.h" #include "gnc-engine.h" #include #include "qof.h" diff --git a/src/engine/GroupP.h b/src/engine/GroupP.h index 4226c985e7..a716b8d528 100644 --- a/src/engine/GroupP.h +++ b/src/engine/GroupP.h @@ -36,7 +36,6 @@ #ifndef XACC_GROUP_P_H #define XACC_GROUP_P_H -#include "config.h" #include "Group.h" #include "Transaction.h" diff --git a/src/engine/SX-book.h b/src/engine/SX-book.h index ba871c848a..3069a0b15a 100644 --- a/src/engine/SX-book.h +++ b/src/engine/SX-book.h @@ -38,8 +38,6 @@ #ifndef GNC_SX_BOOK_H #define GNC_SX_BOOK_H -#include "config.h" - #include #include "qof.h" diff --git a/src/engine/SX-ttinfo.h b/src/engine/SX-ttinfo.h index 2d10331e90..7c41746a0a 100644 --- a/src/engine/SX-ttinfo.h +++ b/src/engine/SX-ttinfo.h @@ -25,8 +25,6 @@ #ifndef GNC_SX_TTINFO_H #define GNC_SX_TTINFO_H -#include "config.h" - #include #include "qof.h" #include "SchedXaction.h" diff --git a/src/engine/ScrubP.h b/src/engine/ScrubP.h index 86f561b48a..656c5d4940 100644 --- a/src/engine/ScrubP.h +++ b/src/engine/ScrubP.h @@ -28,8 +28,6 @@ #ifndef XACC_SCRUB_P_H #define XACC_SCRUB_P_H -#include "config.h" - #include "Account.h" #include "gnc-commodity.h" #include "gnc-engine.h" diff --git a/src/engine/SplitP.h b/src/engine/SplitP.h index 627c62acb1..1855d020b3 100644 --- a/src/engine/SplitP.h +++ b/src/engine/SplitP.h @@ -45,8 +45,6 @@ #ifndef XACC_SPLIT_P_H #define XACC_SPLIT_P_H -#include "config.h" - #include #include diff --git a/src/engine/TransLog.h b/src/engine/TransLog.h index e48309cf20..c7a4f5e3b2 100644 --- a/src/engine/TransLog.h +++ b/src/engine/TransLog.h @@ -43,8 +43,6 @@ #ifndef XACC_TRANS_LOG_H #define XACC_TRANS_LOG_H -#include "config.h" - #include "Account.h" #include "Transaction.h" diff --git a/src/engine/TransactionP.h b/src/engine/TransactionP.h index 840603749f..6c1a262351 100644 --- a/src/engine/TransactionP.h +++ b/src/engine/TransactionP.h @@ -45,8 +45,6 @@ #ifndef XACC_TRANSACTION_P_H #define XACC_TRANSACTION_P_H -#include "config.h" - #include #include diff --git a/src/engine/test-core/test-engine-stuff.h b/src/engine/test-core/test-engine-stuff.h index 5223fe5d3e..1318239d09 100644 --- a/src/engine/test-core/test-engine-stuff.h +++ b/src/engine/test-core/test-engine-stuff.h @@ -5,8 +5,6 @@ #ifndef TEST_ENGINE_STUFF_H #define TEST_ENGINE_STUFF_H -#include "config.h" - #include #include diff --git a/src/gnome-utils/QuickFill.h b/src/gnome-utils/QuickFill.h index 3f97bea821..a88f3dd5fd 100644 --- a/src/gnome-utils/QuickFill.h +++ b/src/gnome-utils/QuickFill.h @@ -50,8 +50,6 @@ #ifndef QUICKFILL_H #define QUICKFILL_H -#include "config.h" - #include #include diff --git a/src/gnome-utils/dialog-account.h b/src/gnome-utils/dialog-account.h index 3896c046d3..0072749339 100644 --- a/src/gnome-utils/dialog-account.h +++ b/src/gnome-utils/dialog-account.h @@ -24,8 +24,6 @@ #ifndef DIALOG_ACCOUNT_H #define DIALOG_ACCOUNT_H -#include "config.h" - #include "Account.h" #include "Group.h" diff --git a/src/gnome-utils/gw-gnome-utils-spec.scm b/src/gnome-utils/gw-gnome-utils-spec.scm index 927b3b708c..9696be2d06 100644 --- a/src/gnome-utils/gw-gnome-utils-spec.scm +++ b/src/gnome-utils/gw-gnome-utils-spec.scm @@ -29,6 +29,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" "#include \n" "#include \n" diff --git a/src/gnome/dialog-chart-export.c b/src/gnome/dialog-chart-export.c index 5ddf01730f..a51774b3ba 100644 --- a/src/gnome/dialog-chart-export.c +++ b/src/gnome/dialog-chart-export.c @@ -24,6 +24,8 @@ * 02110-1301, USA. */ +#include "config.h" + #include #include #include diff --git a/src/gnome/dialog-fincalc.h b/src/gnome/dialog-fincalc.h index 80c141ef84..8a91af1f65 100644 --- a/src/gnome/dialog-fincalc.h +++ b/src/gnome/dialog-fincalc.h @@ -23,8 +23,6 @@ #ifndef DIALOG_FINCALC_H #define DIALOG_FINCALC_H -#include "config.h" - typedef struct _FinCalcDialog FinCalcDialog; void gnc_ui_fincalc_dialog_create(void); diff --git a/src/gnome/dialog-print-check.h b/src/gnome/dialog-print-check.h index 6d13c1af37..ce4f2c2a9f 100644 --- a/src/gnome/dialog-print-check.h +++ b/src/gnome/dialog-print-check.h @@ -24,8 +24,6 @@ #ifndef DIALOG_PRINT_CHECK_H #define DIALOG_PRINT_CHECK_H -#include "config.h" - #include #include "print-session.h" diff --git a/src/gnome/gw-gnc-spec.scm b/src/gnome/gw-gnc-spec.scm index a79a21af7a..5dc77327a1 100644 --- a/src/gnome/gw-gnc-spec.scm +++ b/src/gnome/gw-gnc-spec.scm @@ -26,6 +26,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" "#include \n" "#include \n" diff --git a/src/register/register-core/gtable.h b/src/register/register-core/gtable.h index 47b5305031..78b9261373 100644 --- a/src/register/register-core/gtable.h +++ b/src/register/register-core/gtable.h @@ -23,8 +23,6 @@ #ifndef G_TABLE_H #define G_TABLE_H -#include "config.h" - #include diff --git a/src/register/register-core/gw-register-core-spec.scm b/src/register/register-core/gw-register-core-spec.scm index d713fa232b..c307477214 100644 --- a/src/register/register-core/gw-register-core-spec.scm +++ b/src/register/register-core/gw-register-core-spec.scm @@ -18,9 +18,9 @@ (gw:wrapset-add-cs-declarations! ws (lambda (wrapset client-wrapset) - (if (eq? wrapset client-wrapset) - '() - "#include \n"))) + (list + "#include \n" + "#include \n" ))) (gw:wrap-as-wct ws ' "BasicCell*" "const BasicCell*") diff --git a/src/register/register-gnome/gncmod-register-gnome.c b/src/register/register-gnome/gncmod-register-gnome.c index dde1e3bc90..2b87c5b5c0 100644 --- a/src/register/register-gnome/gncmod-register-gnome.c +++ b/src/register/register-gnome/gncmod-register-gnome.c @@ -5,6 +5,8 @@ * Copyright (c) 2001 Linux Developers Group, Inc. *********************************************************************/ +#include "config.h" + #include #include "combocell.h" diff --git a/src/report/report-gnome/gw-report-gnome-spec.scm b/src/report/report-gnome/gw-report-gnome-spec.scm index 32d4177ff4..5807a92e49 100644 --- a/src/report/report-gnome/gw-report-gnome-spec.scm +++ b/src/report/report-gnome/gw-report-gnome-spec.scm @@ -27,6 +27,7 @@ ws (lambda (wrapset client-wrapset) (list + "#include \n" "#include \n" "#include \n" "#include \n" diff --git a/src/test-core/test-stuff.h b/src/test-core/test-stuff.h index 979eb18127..5faee31c3b 100644 --- a/src/test-core/test-stuff.h +++ b/src/test-core/test-stuff.h @@ -34,8 +34,6 @@ Otherwise, only failures are printed out. #ifndef TEST_STUFF_H #define TEST_STUFF_H -#include "config.h" - #include #include