commit 60eafca7cbc69651fc0f2795a1b3a20b22d54795 Author: Geert Janssens Date: Mon Mar 21 15:10:40 2011 +0000 Require guile 1.8.5 and remove all 1.6.x specific conditions git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20441 57a11ea4-9604-0410-9ed3-97b8803252fd diff --git a/configure.ac b/configure.ac index 7bd9395..3656931 100644 --- a/configure.ac +++ b/configure.ac @@ -403,11 +403,11 @@ fi AS_SCRUB_INCLUDE(GUILE_INCS) AC_SUBST(GUILE_LIBS) -AM_GUILE_VERSION_CHECK(1.6.7, , , [AC_MSG_ERROR([ +AM_GUILE_VERSION_CHECK(1.8.5, , , [AC_MSG_ERROR([ guile does not appear to be installed correctly, or is not in the correct version range. Perhaps you have not installed the guile - development packages? Gnucash requires at least version 1.6.7 to build. + development packages? Gnucash requires at least version 1.8.5 to build. ])]) AC_SUBST(GUILE) @@ -418,10 +418,6 @@ AC_DEFINE_UNQUOTED(GNC_GUILE_MINOR_VERSION, ${guile_minor_version}, AC_DEFINE_UNQUOTED(GNC_GUILE_MICRO_VERSION, ${guile_micro_version}, [Guile Micro version number]) -AM_GUILE_VERSION_CHECK(1.8.0, , [ - AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8 or better]) -], ) - AS_SCRUB_INCLUDE(CFLAGS) ### Check size of long_long - some guile's are broken. diff --git a/src/app-utils/app-utils.i b/src/app-utils/app-utils.i index e1fc6e8..3db58ac 100644 --- a/src/app-utils/app-utils.i +++ b/src/app-utils/app-utils.i @@ -105,7 +105,7 @@ void gnc_register_kvp_option_generator(QofIdType id_type, SCM generator); break; key = scm_to_locale_string (key_scm); gkey = g_strdup (key); - gnc_free_scm_locale_string(key); + free (key); path = g_list_prepend (path, gkey); path_scm = SCM_CDR (path_scm); } diff --git a/src/app-utils/guile-util.c b/src/app-utils/guile-util.c index d21afc3..2fcddbc 100644 --- a/src/app-utils/guile-util.c +++ b/src/app-utils/guile-util.c @@ -1327,6 +1327,6 @@ gchar *gnc_scm_to_locale_string(SCM scm_string) /* scm_to_locale_string() returns a malloc'ed string in guile-1.8 (but not in guile-1.6). Copy to a g_malloc'ed one. */ s = g_strdup(x); - gnc_free_scm_locale_string(x); + free(x); return s; } diff --git a/src/engine/engine-helpers.c b/src/engine/engine-helpers.c index 951a3a1..8f1bf5d 100644 --- a/src/engine/engine-helpers.c +++ b/src/engine/engine-helpers.c @@ -1718,10 +1718,6 @@ gnc_query2scm (QofQuery *q) if (!q) return SCM_BOOL_F; -#ifndef HAVE_GUILE18 - ++scm_block_gc; -#endif - /* terms */ pair = scm_cons (gnc_query_terms2scm (qof_query_get_terms (q)), SCM_EOL); pair = scm_cons (scm_str2symbol ("terms"), pair); @@ -1757,9 +1753,6 @@ gnc_query2scm (QofQuery *q) /* Reverse this list; tag it as 'query-v2' */ pair = scm_reverse (query_scm); -#ifndef HAVE_GUILE18 - --scm_block_gc; -#endif return scm_cons (scm_str2symbol ("query-v2"), pair); } @@ -2019,10 +2012,6 @@ gnc_scm2query_v2 (SCM query_scm) gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE; int max_results = -1; -#ifndef HAVE_GUILE18 - ++scm_block_gc; -#endif - while (!scm_is_null (query_scm)) { const gchar *symbol; @@ -2123,10 +2112,6 @@ gnc_scm2query_v2 (SCM query_scm) } } -#ifndef HAVE_GUILE18 - --scm_block_gc; -#endif - if (ok && search_for) { qof_query_search_for (q, search_for); diff --git a/src/engine/engine.i b/src/engine/engine.i index 0e8d431..b87f294 100644 --- a/src/engine/engine.i +++ b/src/engine/engine.i @@ -141,7 +141,7 @@ gchar * gnc_build_book_path (const gchar *filename); key = scm_to_locale_string (key_scm); gkey = g_strdup (key); - gnc_free_scm_locale_string(key); + free (key); path = g_list_prepend (path, gkey); diff --git a/src/gnome-utils/gnc-menu-extensions.c b/src/gnome-utils/gnc-menu-extensions.c index 95743f2..a7b586d 100644 --- a/src/gnome-utils/gnc-menu-extensions.c +++ b/src/gnome-utils/gnc-menu-extensions.c @@ -184,7 +184,7 @@ gnc_extension_path (SCM extension, char **fullpath) { strings[i] = g_strdup(gettext(s)); } - gnc_free_scm_locale_string(s); + free(s); } else { diff -up gnucash-2.4.8/src/guile-mappings.h.cow gnucash-2.4.8/src/guile-mappings.h --- gnucash-2.4.8/src/guile-mappings.h.cow 2011-10-17 12:51:50.000000000 -0400 +++ gnucash-2.4.8/src/guile-mappings.h 2011-10-25 17:00:26.418076314 -0400 @@ -19,33 +19,11 @@ #include /* for SCM_MAJOR_VERSION etc */ -/* Give Guile 1.6 and 1.8 a 2.0-like interface */ -#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_c_string_length SCM_STRING_LENGTH -#elif (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8) +/* Give Guile 1.8 a 2.0-like interface */ +#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8) # define scm_c_string_length scm_i_string_length #endif -/* The result of SCM_STRING_CHARS must not be free'd, but the result - * of scm_to_locale_string must. That's bad. We define the macro - * gnc_free_scm_locale_string to wrap around free() for that - * reason. */ -#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6) -# define scm_to_locale_string SCM_STRING_CHARS -# define gnc_free_scm_locale_string (void) -#else -# define gnc_free_scm_locale_string free -#endif - /* Convenience macros */ #define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2))