1 |
commit 60eafca7cbc69651fc0f2795a1b3a20b22d54795 |
2 |
Author: Geert Janssens <janssens-geert@telenet.be> |
3 |
Date: Mon Mar 21 15:10:40 2011 +0000 |
4 |
|
5 |
Require guile 1.8.5 and remove all 1.6.x specific conditions |
6 |
|
7 |
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20441 57a11ea4-9604-0410-9ed3-97b8803252fd |
8 |
|
9 |
diff --git a/configure.ac b/configure.ac |
10 |
index 7bd9395..3656931 100644 |
11 |
--- a/configure.ac |
12 |
+++ b/configure.ac |
13 |
@@ -403,11 +403,11 @@ fi |
14 |
AS_SCRUB_INCLUDE(GUILE_INCS) |
15 |
AC_SUBST(GUILE_LIBS) |
16 |
|
17 |
-AM_GUILE_VERSION_CHECK(1.6.7, , , [AC_MSG_ERROR([ |
18 |
+AM_GUILE_VERSION_CHECK(1.8.5, , , [AC_MSG_ERROR([ |
19 |
|
20 |
guile does not appear to be installed correctly, or is not in the |
21 |
correct version range. Perhaps you have not installed the guile |
22 |
- development packages? Gnucash requires at least version 1.6.7 to build. |
23 |
+ development packages? Gnucash requires at least version 1.8.5 to build. |
24 |
])]) |
25 |
|
26 |
AC_SUBST(GUILE) |
27 |
@@ -418,10 +418,6 @@ AC_DEFINE_UNQUOTED(GNC_GUILE_MINOR_VERSION, ${guile_minor_version}, |
28 |
AC_DEFINE_UNQUOTED(GNC_GUILE_MICRO_VERSION, ${guile_micro_version}, |
29 |
[Guile Micro version number]) |
30 |
|
31 |
-AM_GUILE_VERSION_CHECK(1.8.0, , [ |
32 |
- AC_DEFINE(HAVE_GUILE18,1,[System has guile 1.8 or better]) |
33 |
-], ) |
34 |
- |
35 |
AS_SCRUB_INCLUDE(CFLAGS) |
36 |
|
37 |
### Check size of long_long - some guile's are broken. |
38 |
diff --git a/src/app-utils/guile-util.c b/src/app-utils/guile-util.c |
39 |
index d21afc3..2fcddbc 100644 |
40 |
--- a/src/app-utils/guile-util.c |
41 |
+++ b/src/app-utils/guile-util.c |
42 |
@@ -1327,6 +1327,6 @@ gchar *gnc_scm_to_locale_string(SCM scm_string) |
43 |
/* scm_to_locale_string() returns a malloc'ed string in guile-1.8 |
44 |
(but not in guile-1.6). Copy to a g_malloc'ed one. */ |
45 |
s = g_strdup(x); |
46 |
- gnc_free_scm_locale_string(x); |
47 |
+ free(x); |
48 |
return s; |
49 |
} |
50 |
diff --git a/src/engine/engine-helpers.c b/src/engine/engine-helpers.c |
51 |
index 951a3a1..8f1bf5d 100644 |
52 |
--- a/src/engine/engine-helpers.c |
53 |
+++ b/src/engine/engine-helpers.c |
54 |
@@ -1718,10 +1718,6 @@ gnc_query2scm (QofQuery *q) |
55 |
|
56 |
if (!q) return SCM_BOOL_F; |
57 |
|
58 |
-#ifndef HAVE_GUILE18 |
59 |
- ++scm_block_gc; |
60 |
-#endif |
61 |
- |
62 |
/* terms */ |
63 |
pair = scm_cons (gnc_query_terms2scm (qof_query_get_terms (q)), SCM_EOL); |
64 |
pair = scm_cons (scm_str2symbol ("terms"), pair); |
65 |
@@ -1757,9 +1753,6 @@ gnc_query2scm (QofQuery *q) |
66 |
|
67 |
/* Reverse this list; tag it as 'query-v2' */ |
68 |
pair = scm_reverse (query_scm); |
69 |
-#ifndef HAVE_GUILE18 |
70 |
- --scm_block_gc; |
71 |
-#endif |
72 |
return scm_cons (scm_str2symbol ("query-v2"), pair); |
73 |
} |
74 |
|
75 |
@@ -2019,10 +2012,6 @@ gnc_scm2query_v2 (SCM query_scm) |
76 |
gboolean si1 = TRUE, si2 = TRUE, si3 = TRUE; |
77 |
int max_results = -1; |
78 |
|
79 |
-#ifndef HAVE_GUILE18 |
80 |
- ++scm_block_gc; |
81 |
-#endif |
82 |
- |
83 |
while (!scm_is_null (query_scm)) |
84 |
{ |
85 |
const gchar *symbol; |
86 |
@@ -2123,10 +2112,6 @@ gnc_scm2query_v2 (SCM query_scm) |
87 |
} |
88 |
} |
89 |
|
90 |
-#ifndef HAVE_GUILE18 |
91 |
- --scm_block_gc; |
92 |
-#endif |
93 |
- |
94 |
if (ok && search_for) |
95 |
{ |
96 |
qof_query_search_for (q, search_for); |
97 |
diff --git a/src/engine/engine.i b/src/engine/engine.i |
98 |
index 0e8d431..b87f294 100644 |
99 |
--- a/src/engine/engine.i |
100 |
+++ b/src/engine/engine.i |
101 |
@@ -141,7 +141,7 @@ gchar * gnc_build_book_path (const gchar *filename); |
102 |
|
103 |
key = scm_to_locale_string (key_scm); |
104 |
gkey = g_strdup (key); |
105 |
- gnc_free_scm_locale_string(key); |
106 |
+ free (key); |
107 |
|
108 |
path = g_list_prepend (path, gkey); |
109 |
|
110 |
diff --git a/src/gnome-utils/gnc-menu-extensions.c b/src/gnome-utils/gnc-menu-extensions.c |
111 |
index 95743f2..a7b586d 100644 |
112 |
--- a/src/gnome-utils/gnc-menu-extensions.c |
113 |
+++ b/src/gnome-utils/gnc-menu-extensions.c |
114 |
@@ -184,7 +184,7 @@ gnc_extension_path (SCM extension, char **fullpath) |
115 |
{ |
116 |
strings[i] = g_strdup(gettext(s)); |
117 |
} |
118 |
- gnc_free_scm_locale_string(s); |
119 |
+ free(s); |
120 |
} |
121 |
else |
122 |
{ |
123 |
diff -up gnucash-2.4.8/src/guile-mappings.h.cow gnucash-2.4.8/src/guile-mappings.h |
124 |
--- gnucash-2.4.8/src/guile-mappings.h.cow 2011-10-17 12:51:50.000000000 -0400 |
125 |
+++ gnucash-2.4.8/src/guile-mappings.h 2011-10-25 17:00:26.418076314 -0400 |
126 |
@@ -19,33 +19,11 @@ |
127 |
|
128 |
#include <libguile.h> /* for SCM_MAJOR_VERSION etc */ |
129 |
|
130 |
-/* Give Guile 1.6 and 1.8 a 2.0-like interface */ |
131 |
-#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6) |
132 |
-# define scm_is_bool SCM_BOOLP |
133 |
-# define scm_is_false SCM_FALSEP |
134 |
-# define scm_is_null SCM_NULLP |
135 |
-# define scm_is_number SCM_NUMBERP |
136 |
-# define scm_is_pair SCM_CONSP |
137 |
-# define scm_is_string SCM_STRINGP |
138 |
-# define scm_is_symbol SCM_SYMBOLP |
139 |
-# define scm_is_true SCM_NFALSEP |
140 |
-# define scm_is_vector SCM_VECTORP |
141 |
-# define scm_c_string_length SCM_STRING_LENGTH |
142 |
-#elif (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8) |
143 |
+/* Give Guile 1.8 a 2.0-like interface */ |
144 |
+#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 8) |
145 |
# define scm_c_string_length scm_i_string_length |
146 |
#endif |
147 |
|
148 |
-/* The result of SCM_STRING_CHARS must not be free'd, but the result |
149 |
- * of scm_to_locale_string must. That's bad. We define the macro |
150 |
- * gnc_free_scm_locale_string to wrap around free() for that |
151 |
- * reason. */ |
152 |
-#if (SCM_MAJOR_VERSION == 1) && (SCM_MINOR_VERSION <= 6) |
153 |
-# define scm_to_locale_string SCM_STRING_CHARS |
154 |
-# define gnc_free_scm_locale_string (void) |
155 |
-#else |
156 |
-# define gnc_free_scm_locale_string free |
157 |
-#endif |
158 |
- |
159 |
/* Convenience macros */ |
160 |
|
161 |
#define scm_is_equal(obj1,obj2) scm_is_true(scm_equal_p(obj1,obj2)) |