Never include "config.h" from a header file. Doing so makes it nigh

impossible to override configuration settings.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13549 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2006-03-09 05:51:07 +00:00
parent 45403651c5
commit 4b04137e7d
53 changed files with 38 additions and 62 deletions

View File

@@ -1,3 +1,8 @@
2006-03-09 David Hampton <hampton@employees.org>
* numerous: Never include "config.h" from a header file. Doing so
makes it nigh impossible to override configuration settings.
2006-03-08 David Hampton <hampton@employees.org>
* numerous: Remove more functions to be deprecated in

View File

@@ -20,6 +20,8 @@
*
\********************************************************************/
#include "config.h"
#include <glib.h>
#include <glib/gprintf.h>
#include <stdlib.h>

View File

@@ -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);

View File

@@ -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"

View File

@@ -23,6 +23,8 @@
#define _GNU_SOURCE
#include "config.h"
#include <libxml/xmlversion.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>

View File

@@ -23,6 +23,8 @@
#define _GNU_SOURCE
#include "config.h"
#include <libxml/xmlversion.h>
#include "qof.h"
#include "qof-backend-qsf.h"

View File

@@ -21,6 +21,7 @@
* *
\********************************************************************/
#include "config.h"
#include "qof.h"
/* Don't be fooled: gnc_trace_num_spaces has external linkage and

View File

@@ -35,7 +35,6 @@
#include <glib.h>
#include <stddef.h>
#include "config.h"
#include "qof.h"
/* Macros *****************************************************/

View File

@@ -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"

View File

@@ -33,8 +33,6 @@
#ifndef GNC_KVP_UTIL_H
#define GNC_KVP_UTIL_H
#include "config.h"
typedef struct {
gpointer key;
gpointer value;

View File

@@ -21,6 +21,7 @@
* *
********************************************************************/
#include "config.h"
#include "qof.h"
static QofLogModule log_module = QOF_MOD_MERGE;

View File

@@ -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"

View File

@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include <glib.h>
#include "qof.h"
#include "qofchoice.h"

View File

@@ -20,6 +20,7 @@
* *
\********************************************************************/
#include "config.h"
#include "qof.h"
#include "qofgobj.h"

View File

@@ -27,6 +27,7 @@
* Copyright (C) 2003 Linas Vepstas <linas@linas.org>
*/
#include "config.h"
#include "qof.h"
#include "kvp-util-p.h"
#include "qofbook-p.h"

View File

@@ -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.*/

View File

@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "qofreference.h"
static void

View File

@@ -28,10 +28,11 @@
*/
#define _GNU_SOURCE
#include "config.h"
#include <stdlib.h> /* for working atoll */
#include <errno.h>
#include "glib.h"
#include "config.h"
#ifdef HAVE_GDA
#include <sql/sql_parser.h>
#else

View File

@@ -27,8 +27,6 @@
#ifndef RECONCILE_H
#define RECONCILE_H
#include "config.h"
#include "gnc-ui-common.h"
#include "Account.h"

View File

@@ -20,8 +20,6 @@
#ifndef GNC_EXP_PARSER_H
#define GNC_EXP_PARSER_H
#include "config.h"
#include <glib.h>
#include "qof.h"

View File

@@ -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 <gtk/gtk.h>
#elif defined(MOTIF)

View File

@@ -32,8 +32,6 @@
#ifndef GNC_UI_UTIL_H
#define GNC_UI_UTIL_H
#include "config.h"
#include <glib.h>
#include <locale.h>

View File

@@ -26,6 +26,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <option-util.h>\n"
"#include <gnc-euro.h>\n"
"#include <gnc-exp-parser.h>\n"

View File

@@ -25,8 +25,6 @@
#ifndef GNC_XML_HELPER_H
#define GNC_XML_HELPER_H
#include "config.h"
#include <libxml/xmlversion.h>
# include <libxml/SAX.h>

View File

@@ -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"

View File

@@ -24,8 +24,6 @@
#ifndef SIXTP_DOM_GENERATORS_H
#define SIXTP_DOM_GENERATORS_H
#include "config.h"
#include <glib.h>
#include "gnc-xml-helper.h"

View File

@@ -24,8 +24,6 @@
#ifndef SIXTP_DOM_PARSERS_H
#define SIXTP_DOM_PARSERS_H
#include "config.h"
#include <glib.h>
#include "gnc-xml-helper.h"

View File

@@ -5,8 +5,6 @@
#ifndef TEST_FILE_STUFF_H
#define TEST_FILE_STUFF_H
#include "config.h"
#include <glib.h>
#include "gnc-commodity.h"

View File

@@ -33,6 +33,8 @@
*
*/
#include "config.h"
#define _GNU_SOURCE
#include <glib.h>
#include <stdio.h>

View File

@@ -32,6 +32,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <gtk/gtk.h>\n"
"#include <business-urls.h>\n"
"#include <dialog-billterms.h>\n"

View File

@@ -32,6 +32,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <dialog-tax-table.h>\n"
)))

View File

@@ -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"

View File

@@ -59,7 +59,6 @@
#ifndef XACC_FREQSPEC_H
#define XACC_FREQSPEC_H
#include "config.h"
#include "gnc-engine.h"
#include <glib.h>
#include "qof.h"

View File

@@ -36,7 +36,6 @@
#ifndef XACC_GROUP_P_H
#define XACC_GROUP_P_H
#include "config.h"
#include "Group.h"
#include "Transaction.h"

View File

@@ -38,8 +38,6 @@
#ifndef GNC_SX_BOOK_H
#define GNC_SX_BOOK_H
#include "config.h"
#include <glib.h>
#include "qof.h"

View File

@@ -25,8 +25,6 @@
#ifndef GNC_SX_TTINFO_H
#define GNC_SX_TTINFO_H
#include "config.h"
#include <glib.h>
#include "qof.h"
#include "SchedXaction.h"

View File

@@ -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"

View File

@@ -45,8 +45,6 @@
#ifndef XACC_SPLIT_P_H
#define XACC_SPLIT_P_H
#include "config.h"
#include <time.h>
#include <glib.h>

View File

@@ -43,8 +43,6 @@
#ifndef XACC_TRANS_LOG_H
#define XACC_TRANS_LOG_H
#include "config.h"
#include "Account.h"
#include "Transaction.h"

View File

@@ -45,8 +45,6 @@
#ifndef XACC_TRANSACTION_P_H
#define XACC_TRANSACTION_P_H
#include "config.h"
#include <time.h>
#include <glib.h>

View File

@@ -5,8 +5,6 @@
#ifndef TEST_ENGINE_STUFF_H
#define TEST_ENGINE_STUFF_H
#include "config.h"
#include <glib.h>
#include <stdlib.h>

View File

@@ -50,8 +50,6 @@
#ifndef QUICKFILL_H
#define QUICKFILL_H
#include "config.h"
#include <gdk/gdk.h>
#include <glib.h>

View File

@@ -24,8 +24,6 @@
#ifndef DIALOG_ACCOUNT_H
#define DIALOG_ACCOUNT_H
#include "config.h"
#include "Account.h"
#include "Group.h"

View File

@@ -29,6 +29,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <dialog-options.h>\n"
"#include <dialog-utils.h>\n"
"#include <druid-utils.h>\n"

View File

@@ -24,6 +24,8 @@
* 02110-1301, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#include <time.h>

View File

@@ -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);

View File

@@ -24,8 +24,6 @@
#ifndef DIALOG_PRINT_CHECK_H
#define DIALOG_PRINT_CHECK_H
#include "config.h"
#include <libguile.h>
#include "print-session.h"

View File

@@ -26,6 +26,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <glib.h>\n"
"#include <gnc-ui.h>\n"
"#include <gnc-ui-util.h>\n"

View File

@@ -23,8 +23,6 @@
#ifndef G_TABLE_H
#define G_TABLE_H
#include "config.h"
#include <glib.h>

View File

@@ -18,9 +18,9 @@
(gw:wrapset-add-cs-declarations!
ws
(lambda (wrapset client-wrapset)
(if (eq? wrapset client-wrapset)
'()
"#include <basiccell.h>\n")))
(list
"#include <config.h>\n"
"#include <basiccell.h>\n" )))
(gw:wrap-as-wct ws '<gnc:basic-cell> "BasicCell*" "const BasicCell*")

View File

@@ -5,6 +5,8 @@
* Copyright (c) 2001 Linux Developers Group, Inc.
*********************************************************************/
#include "config.h"
#include <glib.h>
#include "combocell.h"

View File

@@ -27,6 +27,7 @@
ws
(lambda (wrapset client-wrapset)
(list
"#include <config.h>\n"
"#include <gtk/gtk.h>\n"
"#include <dialog-column-view.h>\n"
"#include <gnc-plugin-page-report.h>\n"

View File

@@ -34,8 +34,6 @@ Otherwise, only failures are printed out.
#ifndef TEST_STUFF_H
#define TEST_STUFF_H
#include "config.h"
#include <glib.h>
#include <stdlib.h>