From 9b1f87a39dcebfbbdfa8bbeba022ba1e3580664d Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Wed, 11 Jun 2003 17:07:01 +0000 Subject: [PATCH] demarcate some special gnucash-specific sections of code git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8581 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/engine/gnc-session.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/engine/gnc-session.c b/src/engine/gnc-session.c index c785fe7bc7..c60af45a2f 100644 --- a/src/engine/gnc-session.c +++ b/src/engine/gnc-session.c @@ -45,14 +45,21 @@ #include "Backend.h" #include "BackendP.h" -#include "TransLog.h" #include "gnc-book-p.h" #include "gnc-event.h" -#include "gnc-module.h" #include "gnc-session.h" #include "gnc-session-p.h" #include "gnc-trace.h" +#ifdef GNUCASH +#include "gnc-module.h" +#include "TransLog.h" +#else +#define xaccLogSetBaseName(x) +#define xaccLogEnable() +#define xaccLogDisable() +#endif /* GNUCASH */ + static GNCSession * current_session = NULL; static short module = MOD_IO; @@ -270,7 +277,11 @@ gnc_session_int_backend_load_error(GNCSession *session, } -/* FIXME : reinstate better error messages with gnc_module errors */ +#ifdef GNUCASH + +/* Gnucash uses its module system to load a backend; other users + * use traditional dlopen calls. + */ static void gnc_session_load_backend(GNCSession * session, char * backend_name) { @@ -278,6 +289,7 @@ gnc_session_load_backend(GNCSession * session, char * backend_name) Backend *(* be_new_func)(void); char * mod_name = g_strdup_printf("gnucash/backend/%s", backend_name); + /* FIXME : reinstate better error messages with gnc_module errors */ ENTER (" "); /* FIXME: this needs to be smarter with version numbers. */ /* FIXME: this should use dlopen(), instead of guile/scheme, @@ -317,6 +329,16 @@ gnc_session_load_backend(GNCSession * session, char * backend_name) LEAVE (" "); } +#else /* GNUCASH */ + +static void +gnc_session_load_backend(GNCSession * session, char * backend_name) +{ + ENTER (" "); + LEAVE (" "); +} +#endif /* GNUCASH */ + /* ====================================================================== */ static void