Fix guile-1.6 compatibility of r18541 (bug#582325).

We still suppport guile-1.6, hence we can use the functions
introduced in guile-1.8 only by providing our own backward compatibility
macro definitions in guile-mappings.h.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18545 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-01-04 20:21:22 +00:00
parent d61fd27953
commit a5217470af
11 changed files with 30 additions and 1 deletions

View File

@ -3,6 +3,7 @@
/* Includes the header in the wrapper code */
#include <config.h>
#include <option-util.h>
#include <guile-mappings.h>
#include <gnc-euro.h>
#include <gnc-exp-parser.h>
#include <gnc-ui-util.h>

View File

@ -34,6 +34,7 @@
#include <sys/types.h>
#include <unistd.h>
#include "guile-mappings.h"
#include "file-utils.h"
#include "gnc-engine.h"
#include "gnc-filepath-utils.h"

View File

@ -2,6 +2,7 @@
%{
/* Includes the header in the wrapper code */
#include <config.h>
#include <guile-mappings.h>
#include <gncAddress.h>
#include <gncBillTerm.h>
#include <gncCustomer.h>

View File

@ -26,6 +26,7 @@
#include "gncBusGuile.h"
#include "engine-helpers.h"
#include "swig-runtime.h"
#include "guile-mappings.h"
#define FUNC_NAME G_STRFUNC
static swig_type_info *

View File

@ -35,7 +35,9 @@ AM_CPPFLAGS = \
${GUILE_INCS} \
${GLIB_CFLAGS} \
${GCONF_CFLAGS} \
${GTK_CFLAGS}
${GTK_CFLAGS} \
-I${top_srcdir}/src
gncmoddir = ${GNC_SHAREDIR}/guile-modules/gnucash
gncmod_DATA = core-utils.scm

View File

@ -1,5 +1,6 @@
%module sw_core_utils
%{
#include <guile-mappings.h>
#include <gnc-glib-utils.h>
#include <gnc-main.h>
#include <glib.h>

View File

@ -5,6 +5,7 @@
#include <glib.h>
#include <qof.h>
#include <Query.h>
#include <guile-mappings.h>
#include <gnc-budget.h>
#include <gnc-commodity.h>
#include <gnc-engine.h>

View File

@ -26,6 +26,7 @@
#include <glib.h>
#include <stdio.h>
#include <libguile.h>
#include <guile-mappings.h>
#include "swig-runtime.h"
#include "gnc-hooks.h"
#include "gnc-hooks-scm.h"

View File

@ -36,6 +36,7 @@
#include "gnc-ui-common.h"
#include "Account.h"
#include "gnc-pricedb.h"
#include "guile-mappings.h"
/** Help Files ******************************************************/

View File

@ -4,6 +4,7 @@
#include <config.h>
#include <gtk/gtk.h>
#include <dialog-progress.h>
#include "guile-mappings.h"
SCM scm_init_sw_gnome_module (void);
%}

View File

@ -17,6 +17,24 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
\********************************************************************/
#include <libguile/version.h> /* for SCM_MAJOR_VERSION etc */
/* Backward-compatibility macros for guile-1.6 for functions which
were introduced in libguile-1.8.0 */
#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6)
# define scm_is_bool SCM_BOOLP
# define scm_is_false SCM_FALSEP
# define scm_is_null SCM_NULLP
# define scm_is_number SCM_NUMBERP
# define scm_is_pair SCM_CONSP
# define scm_is_string SCM_STRINGP
# define scm_is_symbol SCM_SYMBOLP
# define scm_is_true SCM_NFALSEP
# define scm_is_vector SCM_VECTORP
# define scm_to_locale_string SCM_STRING_CHARS
# define scm_i_string_length SCM_STRING_LENGTH
#endif
/* Convenience macros */
#define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2))