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