summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-03-16 12:48:49 +0000
committerrillig <rillig@pkgsrc.org>2005-03-16 12:48:49 +0000
commit3d852359c8eabf66ed64c5a51099be37d586d1d6 (patch)
tree48d9cc3a2201ef5769b098532408201eb35c8793 /time
parent2ec6734d0333a943503a79d6020c3ec015f2e0a9 (diff)
downloadpkgsrc-3d852359c8eabf66ed64c5a51099be37d586d1d6.tar.gz
Added patches to enable building with gcc-2.95.3. Approved by wiz.
Diffstat (limited to 'time')
-rw-r--r--time/gnotime/distinfo12
-rw-r--r--time/gnotime/patches/patch-ae82
-rw-r--r--time/gnotime/patches/patch-aj40
-rw-r--r--time/gnotime/patches/patch-ao17
-rw-r--r--time/gnotime/patches/patch-ap22
-rw-r--r--time/gnotime/patches/patch-aq158
-rw-r--r--time/gnotime/patches/patch-ar209
-rw-r--r--time/gnotime/patches/patch-as314
-rw-r--r--time/gnotime/patches/patch-at57
9 files changed, 889 insertions, 22 deletions
diff --git a/time/gnotime/distinfo b/time/gnotime/distinfo
index 23c5c5001a7..e5999c639bb 100644
--- a/time/gnotime/distinfo
+++ b/time/gnotime/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2005/02/23 19:14:54 wiz Exp $
+$NetBSD: distinfo,v 1.6 2005/03/16 12:48:49 rillig Exp $
SHA1 (gnotime-2.2.1.tar.gz) = 87f9f28aaad66597e0ba27d88f506602ac93963d
RMD160 (gnotime-2.2.1.tar.gz) = b72f9d0e2e236a98983237d99b01f5a9c7258fc0
@@ -7,12 +7,18 @@ SHA1 (patch-aa) = 3f6e2ef0de4ee4617b6b1bc60e97e34ee7398568
SHA1 (patch-ab) = 8ce9db0b1059ac45aab9681116ac86c331818847
SHA1 (patch-ac) = d9523a1561cf7a57056a3670b1ebac4e28629fed
SHA1 (patch-ad) = 060bddad8f1807823b6e2f65bec1bf12d4940fd9
-SHA1 (patch-ae) = 4ed3ab60c71caf8f078657a5bbac9caed3dc4e4a
+SHA1 (patch-ae) = 13df9a08b372bbd9f491b2159151d8eaed58e6fd
SHA1 (patch-af) = adc0c63aab58c5ac15be9c194b7d76ac7a37736c
SHA1 (patch-ag) = 4816d594079adfdef51a7471b587db62167c9d57
SHA1 (patch-ah) = 8683366be0995489347cb7f72e4a3ce3ac1204cb
SHA1 (patch-ai) = 440941dfaa4454f7d5dee90c43e79c950704d3ad
-SHA1 (patch-aj) = 0494c00b312ac73ee4107ef8d761f2d1047559bb
+SHA1 (patch-aj) = fbae54ccfb5a195852006ec85ee3e1c484fe5998
SHA1 (patch-ak) = c198f95978471a946e0008d4d80f5630716ac991
SHA1 (patch-al) = 36e08dfe8ee0a38a27db99f1edcb05669a57f29c
SHA1 (patch-an) = 120164b440724278e4bb4d4bc97404b3e4e76481
+SHA1 (patch-ao) = 18df822656eb97273b496eb2476ecd39f6df2251
+SHA1 (patch-ap) = a37c79e17986963ffc3cecd4207270ff95cd16bf
+SHA1 (patch-aq) = 1584c3e958137c2755de8d801488a755f51d3d82
+SHA1 (patch-ar) = 6b20a5786f29a7d8f66f1245a4a8b55dfb1cf84b
+SHA1 (patch-as) = cf0ba3a29f2b5f5d96df667e94f803ac86bfc7b4
+SHA1 (patch-at) = 27db86b595055c31706c246fc1eeb94f54acb555
diff --git a/time/gnotime/patches/patch-ae b/time/gnotime/patches/patch-ae
index 16705e2b81c..ef54ba978e6 100644
--- a/time/gnotime/patches/patch-ae
+++ b/time/gnotime/patches/patch-ae
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+$NetBSD: patch-ae,v 1.2 2005/03/16 12:48:49 rillig Exp $
---- src/journal.c.orig Wed Nov 24 22:18:52 2004
-+++ src/journal.c Wed Nov 24 22:26:45 2004
-@@ -195,11 +195,12 @@
+--- src/journal.c.orig Sat May 8 18:14:49 2004
++++ src/journal.c Wed Mar 16 11:03:07 2005
+@@ -197,11 +197,12 @@ remember_uri (Wiggy *wig, const char * f
static void
save_to_gnomevfs (Wiggy *wig, const char * filename)
{
@@ -17,7 +17,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
gnome_vfs_uri_unref (parsed_uri);
if (exists)
{
-@@ -215,7 +216,6 @@
+@@ -217,7 +218,6 @@ save_to_gnomevfs (Wiggy *wig, const char
}
/* Try to open the file for writing */
@@ -25,7 +25,61 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
result = gnome_vfs_create (&wig->handle, filename,
GNOME_VFS_OPEN_WRITE, FALSE, 0644);
-@@ -509,6 +509,7 @@
+@@ -392,12 +392,14 @@ interval_move_up_clicked_cb(GtkWidget *
+ GttTask *tsk = gtt_interval_get_parent (wig->interval);
+ GttProject *prj = gtt_task_get_parent (tsk);
+ GList *tasks = gtt_project_get_tasks (prj);
++ GList *this_task, *prev_task;
++ GttTask *newtask;
+ if (!tasks) return;
+- GList *this_task = g_list_find (tasks, tsk);
++ this_task = g_list_find (tasks, tsk);
+ if (!this_task) return;
+- GList *prev_task = this_task->prev;
+- if (!prev_task) return;
+- GttTask *newtask = prev_task->data;
++ prev_task = this_task->prev;
++ if (!prev_task) return; /* FIXME: Memory leak */
++ newtask = prev_task->data;
+ gtt_task_append_interval (newtask, wig->interval);
+ }
+
+@@ -408,12 +410,14 @@ interval_move_down_clicked_cb(GtkWidget
+ GttTask *tsk = gtt_interval_get_parent (wig->interval);
+ GttProject *prj = gtt_task_get_parent (tsk);
+ GList *tasks = gtt_project_get_tasks (prj);
++ GList *this_task, *next_task;
++ GttTask *newtask;
+ if (!tasks) return;
+- GList *this_task = g_list_find (tasks, tsk);
++ this_task = g_list_find (tasks, tsk);
+ if (!this_task) return;
+- GList *next_task = this_task->next;
++ next_task = this_task->next;
+ if (!next_task) return;
+- GttTask *newtask = next_task->data;
++ newtask = next_task->data;
+ gtt_task_add_interval (newtask, wig->interval);
+ }
+
+@@ -461,6 +465,7 @@ interval_paste_memo_cb(GtkWidget * w, gp
+ static void
+ interval_popup_cb (Wiggy *wig)
+ {
++ GttTask *tsk;
+ gtk_menu_popup(GTK_MENU(wig->interval_popup),
+ NULL, NULL, NULL, wig, 1, 0);
+ if (cutted_task_list)
+@@ -494,7 +499,7 @@ interval_popup_cb (Wiggy *wig)
+ gtk_widget_set_sensitive (wig->interval_move_down, FALSE);
+ }
+
+- GttTask *tsk = gtt_interval_get_parent(wig->interval);
++ tsk = gtt_interval_get_parent(wig->interval);
+ if (gtt_task_is_first_task (tsk))
+ {
+ gtk_widget_set_sensitive (wig->interval_move_up, FALSE);
+@@ -558,6 +563,7 @@ task_edit_task_clicked_cb(GtkWidget * w,
static void
task_delete_memo_clicked_cb(GtkWidget * w, gpointer data)
{
@@ -33,7 +87,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
Wiggy *wig = (Wiggy *) data;
/* It is physically impossible to cut just the memo, without
-@@ -517,7 +518,7 @@
+@@ -566,7 +572,7 @@ task_delete_memo_clicked_cb(GtkWidget *
gtt_task_merge_up (wig->task);
@@ -42,7 +96,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
gtt_task_remove (wig->task);
cutted_task_list = ctl;
}
-@@ -697,10 +698,11 @@
+@@ -747,10 +753,11 @@ on_save_clicked_cb (GtkWidget *w, gpoint
static void
on_close_clicked_cb (GtkWidget *w, gpointer data)
{
@@ -55,7 +109,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
wig->top = NULL;
gtk_widget_destroy (topper);
-@@ -786,19 +788,20 @@
+@@ -836,19 +843,20 @@ static void
html_url_requested_cb(GtkHTML *doc, const gchar * url,
GtkHTMLStream *handle, gpointer data)
{
@@ -81,7 +135,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
result = gnome_vfs_read (vfs, buff, BSZ, &bytes_read);
while (GNOME_VFS_OK == result)
{
-@@ -859,8 +862,10 @@
+@@ -909,8 +917,10 @@ get_hover_msg (const gchar *url)
return msg;
}
@@ -92,7 +146,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
}
static gint
-@@ -922,8 +927,13 @@
+@@ -972,8 +982,13 @@ html_on_url_cb(GtkHTML *doc, const gchar
/* Create and initialize the hover-help window */
if (!wig->hover_help_window)
{
@@ -107,7 +161,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
gtk_window_set_decorated (wino, FALSE);
gtk_window_set_destroy_with_parent (wino, TRUE);
gtk_window_set_transient_for (wino, GTK_WINDOW(wig->top));
-@@ -931,19 +941,19 @@
+@@ -981,19 +996,19 @@ html_on_url_cb(GtkHTML *doc, const gchar
gtk_window_set_resizable (wino, FALSE); /* FALSE to enable auto-resize */
/* There must be a better way to draw a line around the box ?? */
@@ -130,7 +184,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
wig->hover_label = GTK_LABEL (label);
gtk_container_add(GTK_CONTAINER(align), label);
gtk_widget_show (label);
-@@ -952,7 +962,6 @@
+@@ -1002,7 +1017,6 @@ html_on_url_cb(GtkHTML *doc, const gchar
gtk_window_set_focus (GTK_WINDOW(wig->top), GTK_WIDGET(wig->html));
/* Set up in initial default, so later move works. */
@@ -138,7 +192,7 @@ $NetBSD: patch-ae,v 1.1 2004/11/24 22:35:25 kristerw Exp $
gtk_widget_get_pointer (GTK_WIDGET(wig->top), &px, &py);
gtk_window_get_position (GTK_WINDOW(wig->top), &rx, &ry);
gtk_window_move (wino, rx+px, ry+py);
-@@ -1003,25 +1012,28 @@
+@@ -1053,25 +1067,28 @@ static GList *
perform_form_query (KvpFrame *kvpf)
{
GList *results, *n;
diff --git a/time/gnotime/patches/patch-aj b/time/gnotime/patches/patch-aj
index ef5e14680eb..358db864e83 100644
--- a/time/gnotime/patches/patch-aj
+++ b/time/gnotime/patches/patch-aj
@@ -1,8 +1,38 @@
-$NetBSD: patch-aj,v 1.1 2004/11/24 22:35:25 kristerw Exp $
+$NetBSD: patch-aj,v 1.2 2005/03/16 12:48:49 rillig Exp $
---- src/proj.c.orig Wed Nov 24 22:40:26 2004
-+++ src/proj.c Wed Nov 24 22:41:13 2004
-@@ -2306,10 +2306,10 @@
+--- src/proj.c.orig Sat May 22 16:27:59 2004
++++ src/proj.c Wed Mar 16 11:12:06 2005
+@@ -1948,8 +1948,6 @@ prj_obj_get_latest (GttProject *prj)
+ gboolean
+ gtt_project_obj_register (void)
+ {
+- global_book = qof_book_new();
+-
+ /* Associate an ASCII name to each getter, as well as the return type */
+ static QofParam params[] = {
+ { GTT_PROJECT_EARLIEST, QOF_TYPE_DATE, (QofAccessFunc)prj_obj_get_earliest, NULL},
+@@ -1957,6 +1955,8 @@ static QofParam params[] = {
+ { NULL },
+ };
+
++ global_book = qof_book_new();
++
+ qof_class_register (GTT_PROJECT_ID, (QofSortFunc)prj_obj_order, params);
+ return qof_object_register (&prj_object_def);
+ }
+@@ -2290,9 +2290,10 @@ gtt_task_is_first_task (GttTask *tsk)
+ gboolean
+ gtt_task_is_last_task (GttTask *tsk)
+ {
++ GList *last;
+ if (!tsk || !tsk->parent || !tsk->parent->task_list) return TRUE;
+
+- GList *last = g_list_last (tsk->parent->task_list);
++ last = g_list_last (tsk->parent->task_list);
+ if ((GttTask *) last->data == tsk) return TRUE;
+ return FALSE;
+ }
+@@ -2354,10 +2355,10 @@ time_t
gtt_task_get_secs_earliest (GttTask *tsk)
{
GList *node;
@@ -15,7 +45,7 @@ $NetBSD: patch-aj,v 1.1 2004/11/24 22:35:25 kristerw Exp $
for (node=tsk->interval_list; node; node=node->next)
{
GttInterval * ivl = node->data;
-@@ -2322,9 +2322,8 @@
+@@ -2370,9 +2371,8 @@ time_t
gtt_task_get_secs_latest (GttTask *tsk)
{
GList *node;
diff --git a/time/gnotime/patches/patch-ao b/time/gnotime/patches/patch-ao
new file mode 100644
index 00000000000..ee5636b0f08
--- /dev/null
+++ b/time/gnotime/patches/patch-ao
@@ -0,0 +1,17 @@
+$NetBSD: patch-ao,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- lib/qof/qofid.c.orig Sun May 23 22:57:30 2004
++++ lib/qof/qofid.c Wed Mar 16 09:26:50 2005
+@@ -182,8 +182,9 @@ qof_collection_get_type (QofCollection *
+ static void
+ qof_collection_remove_entity (QofEntity *ent)
+ {
++ QofCollection *col;
+ if (!ent) return;
+- QofCollection *col = ent->collection;
++ col = ent->collection;
+ if (!col) return;
+ g_hash_table_remove (col->hash_of_entities, &ent->guid);
+ ent->collection = NULL;
diff --git a/time/gnotime/patches/patch-ap b/time/gnotime/patches/patch-ap
new file mode 100644
index 00000000000..e6579efa12d
--- /dev/null
+++ b/time/gnotime/patches/patch-ap
@@ -0,0 +1,22 @@
+$NetBSD: patch-ap,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- lib/qof/qofquery.c.orig Sun May 23 22:57:30 2004
++++ lib/qof/qofquery.c Wed Mar 16 09:28:08 2005
+@@ -1216,13 +1216,14 @@ void qof_query_add_guid_match (QofQuery
+
+ void qof_query_set_book (QofQuery *q, QofBook *book)
+ {
++ GSList *slist;
+ if (!q || !book) return;
+
+ /* Make sure this book is only in the list once */
+ if (g_list_index (q->books, book) == -1)
+ q->books = g_list_prepend (q->books, book);
+
+- GSList *slist = NULL;
++ slist = NULL;
+ g_slist_prepend (slist, QOF_PARAM_GUID);
+ g_slist_prepend (slist, QOF_PARAM_BOOK);
+ qof_query_add_guid_match (q, slist,
diff --git a/time/gnotime/patches/patch-aq b/time/gnotime/patches/patch-aq
new file mode 100644
index 00000000000..0c3c23c4846
--- /dev/null
+++ b/time/gnotime/patches/patch-aq
@@ -0,0 +1,158 @@
+$NetBSD: patch-aq,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- lib/qof/qofquery-deserial.c.orig Sun May 23 22:57:30 2004
++++ lib/qof/qofquery-deserial.c Wed Mar 16 09:43:29 2005
+@@ -184,6 +184,7 @@ SUBRNAME (xmlNodePtr root)
+ { \
+ xmlNodePtr xp = root->xmlChildrenNode; \
+ xmlNodePtr node; \
++ QofQueryPredData *pred; \
+ \
+ QofQueryCompare how = QOF_COMPARE_EQUAL; \
+ CTYPE val = 0; \
+@@ -197,7 +198,6 @@ SUBRNAME (xmlNodePtr root)
+ {} \
+ } \
+ \
+- QofQueryPredData *pred; \
+ pred = PRED (how, val); \
+ return pred; \
+ }
+@@ -251,6 +251,7 @@ qof_query_pred_kvp_from_xml (xmlNodePtr
+ QofQueryCompare how = QOF_COMPARE_EQUAL;
+ GSList *path = NULL;
+ KvpValue *value = NULL;
++ QofQueryPredData *pred;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -271,7 +272,6 @@ qof_query_pred_kvp_from_xml (xmlNodePtr
+ GET_DATE(&value, wrap_new_timespec, "qofquery:date");
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_kvp_predicate (how, path, value);
+ g_slist_free (path);
+ return pred;
+@@ -287,6 +287,8 @@ qof_query_pred_guid_from_xml (xmlNodePtr
+ GList *guid_list = NULL;
+
+ QofGuidMatch sm = QOF_GUID_MATCH_ANY;
++ QofQueryPredData *pred;
++ GList *n;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -313,11 +315,9 @@ qof_query_pred_guid_from_xml (xmlNodePtr
+ }
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_guid_predicate (sm, guid_list);
+
+ /* The predicate made a copy of everything, so free our stuff */
+- GList *n;
+ for (n=guid_list; n; n=n->next)
+ {
+ guid_free (n->data);
+@@ -336,6 +336,7 @@ qof_query_pred_char_from_xml (xmlNodePtr
+
+ QofCharMatch sm = QOF_CHAR_MATCH_ANY;
+ const char * char_list = NULL;
++ QofQueryPredData *pred;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -348,7 +349,6 @@ qof_query_pred_char_from_xml (xmlNodePtr
+ {}
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_char_predicate (sm, char_list);
+ return pred;
+ }
+@@ -364,6 +364,7 @@ qof_query_pred_numeric_from_xml (xmlNode
+ QofQueryCompare how = QOF_COMPARE_EQUAL;
+ QofNumericMatch sm = QOF_NUMERIC_MATCH_ANY;
+ gnc_numeric num;
++ QofQueryPredData *pred;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -376,7 +377,6 @@ qof_query_pred_numeric_from_xml (xmlNode
+ {}
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_numeric_predicate (how, sm, num);
+ return pred;
+ }
+@@ -392,6 +392,7 @@ qof_query_pred_date_from_xml (xmlNodePtr
+ QofQueryCompare how = QOF_COMPARE_EQUAL;
+ QofDateMatch sm = QOF_DATE_MATCH_ROUNDED;
+ Timespec date = {0,0};
++ QofQueryPredData *pred;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -404,7 +405,6 @@ qof_query_pred_date_from_xml (xmlNodePtr
+ {}
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_date_predicate (how, sm, date);
+ return pred;
+ }
+@@ -421,6 +421,7 @@ qof_query_pred_string_from_xml (xmlNodeP
+ QofStringMatch sm = QOF_STRING_MATCH_CASEINSENSITIVE;
+ gboolean is_regex = FALSE;
+ const char *pstr = NULL;
++ QofQueryPredData *pred;
+
+ for (node=xp; node; node = node->next)
+ {
+@@ -434,7 +435,6 @@ qof_query_pred_string_from_xml (xmlNodeP
+ {}
+ }
+
+- QofQueryPredData *pred;
+ pred = qof_query_string_predicate (how, pstr, sm , is_regex);
+ return pred;
+ }
+@@ -476,8 +476,9 @@ qof_query_term_from_xml (QofQuery *q, xm
+ if (0 == strcmp (node->name, "qofquery:invert"))
+ {
+ QofQuery *qt = qof_query_create();
++ QofQuery *qinv;
+ qof_query_term_from_xml (qt, node);
+- QofQuery *qinv = qof_query_invert (qt);
++ qinv = qof_query_invert (qt);
+ qof_query_merge_in_place (q, qinv, QOF_QUERY_AND);
+ qof_query_destroy (qinv);
+ qof_query_destroy (qt);
+@@ -594,10 +595,12 @@ QofQuery *
+ qof_query_from_xml (xmlNodePtr root)
+ {
+ QofQuery *q;
++ xmlChar *version;
++ xmlNodePtr qpart, node;
+
+ if (!root) return NULL;
+
+- xmlChar * version = xmlGetProp(root, "version");
++ version = xmlGetProp(root, "version");
+ if (!root->name || strcmp ("qof:qofquery", root->name))
+ {
+ // XXX something is wrong. warn ...
+@@ -606,8 +609,7 @@ qof_query_from_xml (xmlNodePtr root)
+
+ q = qof_query_create ();
+
+- xmlNodePtr qpart = root->xmlChildrenNode;
+- xmlNodePtr node;
++ qpart = root->xmlChildrenNode;
+ for (node=qpart; node; node = node->next)
+ {
+ if (node->type != XML_ELEMENT_NODE) continue;
diff --git a/time/gnotime/patches/patch-ar b/time/gnotime/patches/patch-ar
new file mode 100644
index 00000000000..2715f092619
--- /dev/null
+++ b/time/gnotime/patches/patch-ar
@@ -0,0 +1,209 @@
+$NetBSD: patch-ar,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- lib/qof/qofquery-serialize.c.orig Sun May 23 22:57:30 2004
++++ lib/qof/qofquery-serialize.c Wed Mar 16 09:59:34 2005
+@@ -228,9 +228,10 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_STRING))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-string");
++ query_string_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_string_t pdata = (query_string_t) pd;
++ pdata = (query_string_t) pd;
+ PUT_MATCH2("qofquery:string-match", pdata->options,
+ STRING_MATCH, NORMAL, CASEINSENSITIVE);
+ PUT_BOOL ("qofquery:is-regex", pdata->is_regex);
+@@ -240,9 +241,10 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_NUMERIC))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-numeric");
++ query_numeric_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_numeric_t pdata = (query_numeric_t) pd;
++ pdata = (query_numeric_t) pd;
+ PUT_MATCH3("qofquery:numeric-match", pdata->options,
+ NUMERIC_MATCH, DEBIT, CREDIT, ANY);
+
+@@ -252,11 +254,12 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_KVP))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-kvp");
++ query_kvp_t pdata;
++ GSList *n;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_kvp_t pdata = (query_kvp_t) pd;
++ pdata = (query_kvp_t) pd;
+
+- GSList *n;
+ for (n=pdata->path; n; n=n->next)
+ {
+ PUT_STR ("qofquery:kvp-path", n->data);
+@@ -267,9 +270,10 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_DATE))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-date");
++ query_date_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_date_t pdata = (query_date_t) pd;
++ pdata = (query_date_t) pd;
+
+ PUT_MATCH2("qofquery:date-match", pdata->options,
+ DATE_MATCH, NORMAL, ROUNDED);
+@@ -280,18 +284,20 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_INT64))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-int64");
++ query_int64_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_int64_t pdata = (query_int64_t) pd;
++ pdata = (query_int64_t) pd;
+ PUT_INT64 ("qofquery:int64", pdata->val);
+ return topnode;
+ }
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_INT32))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-int32");
++ query_int32_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_int32_t pdata = (query_int32_t) pd;
++ pdata = (query_int32_t) pd;
+
+ PUT_INT32 ("qofquery:int32", pdata->val);
+ return topnode;
+@@ -299,9 +305,10 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_DOUBLE))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-double");
++ query_double_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_double_t pdata = (query_double_t) pd;
++ pdata = (query_double_t) pd;
+
+ PUT_DBL ("qofquery:double", pdata->val);
+ return topnode;
+@@ -309,9 +316,10 @@ qof_query_pred_data_to_xml (QofQueryPred
+ if (!safe_strcmp (pd->type_name, QOF_TYPE_BOOLEAN))
+ {
+ xmlNodePtr topnode = xmlNewNode (NULL, "qofquery:pred-boolean");
++ query_boolean_t pdata;
+ PUT_HOW ("qofquery:compare", pd->how, LT, LTE, EQUAL, GT, GTE, NEQ);
+
+- query_boolean_t pdata = (query_boolean_t) pd;
++ pdata = (query_boolean_t) pd;
+
+ PUT_BOOL ("qofquery:boolean", pdata->val);
+ return topnode;
+@@ -386,9 +394,10 @@ qof_query_and_terms_to_xml (GList *and_t
+ for ( ; n; n=n->next)
+ {
+ QofQueryTerm *qt = n->data;
++ xmlNodePtr t;
+ if (!qt) continue;
+
+- xmlNodePtr t = qof_query_one_term_to_xml (n->data);
++ t = qof_query_one_term_to_xml (n->data);
+ if (t) xmlAddChild (terms, t);
+ }
+ return terms;
+@@ -419,31 +428,37 @@ static xmlNodePtr
+ qof_query_sorts_to_xml (QofQuery *q)
+ {
+ QofQuerySort *s[3];
++ xmlNodePtr sortlist;
++ int i;
+ qof_query_get_sorts (q, &s[0], &s[1], &s[2]);
+
+ if (NULL == s[0]) return NULL;
+
+- xmlNodePtr sortlist = xmlNewNode (NULL, "qofquery:sort-list");
+- int i;
++ sortlist = xmlNewNode (NULL, "qofquery:sort-list");
+ for (i=0; i<3; i++)
+ {
++ GSList *plist;
++ xmlNodePtr sort, topnode, pl;
++ gboolean increasing;
++ gint opt;
++
+ if (NULL == s[i]) continue;
+
+- GSList *plist = qof_query_sort_get_param_path (s[i]);
++ plist = qof_query_sort_get_param_path (s[i]);
+ if (!plist) continue;
+
+- xmlNodePtr sort = xmlNewNode (NULL, "qofquery:sort");
++ sort = xmlNewNode (NULL, "qofquery:sort");
+ xmlAddChild (sortlist, sort);
+
+- xmlNodePtr topnode = sort;
++ topnode = sort;
+
+- gboolean increasing = qof_query_sort_get_increasing (s[i]);
++ increasing = qof_query_sort_get_increasing (s[i]);
+ PUT_STR ("qofquery:order", increasing ? "DESCENDING" : "ASCENDING");
+
+- gint opt = qof_query_sort_get_sort_options (s[i]);
++ opt = qof_query_sort_get_sort_options (s[i]);
+ PUT_INT32 ("qofquery:options", opt);
+
+- xmlNodePtr pl = qof_query_param_path_to_xml (plist);
++ pl = qof_query_param_path_to_xml (plist);
+ if (pl) xmlAddChild (sort, pl);
+ }
+
+@@ -456,15 +471,17 @@ static void
+ do_qof_query_to_xml (QofQuery *q, xmlNodePtr topnode)
+ {
+ QofIdType search_for = qof_query_get_search_for (q);
++ xmlNodePtr terms, sorts;
++ gint max_results;
+ PUT_STR ("qofquery:search-for", search_for);
+
+- xmlNodePtr terms = qof_query_terms_to_xml(q);
++ terms = qof_query_terms_to_xml(q);
+ if (terms) xmlAddChild (topnode, terms);
+
+- xmlNodePtr sorts = qof_query_sorts_to_xml (q);
++ sorts = qof_query_sorts_to_xml (q);
+ if (sorts) xmlAddChild (topnode, sorts);
+
+- gint max_results = qof_query_get_max_results (q);
++ max_results = qof_query_get_max_results (q);
+ PUT_INT32 ("qofquery:max-results", max_results);
+ }
+
+@@ -499,6 +516,10 @@ int main (int argc, char * argv[])
+ {
+ QofQuery *q;
+ QofSqlQuery *sq;
++ xmlDocPtr doc;
++ xmlNodePtr topnode;
++ xmlChar *xbuf;
++ int bufsz;
+
+ qof_query_init();
+ qof_object_initialize ();
+@@ -523,12 +544,10 @@ int main (int argc, char * argv[])
+
+ qof_query_print (q);
+
+- xmlDocPtr doc = doc = xmlNewDoc("1.0");
+- xmlNodePtr topnode = qof_query_to_xml (q);
++ doc = doc = xmlNewDoc("1.0");
++ topnode = qof_query_to_xml (q);
+ xmlDocSetRootElement(doc,topnode);
+
+- xmlChar *xbuf;
+- int bufsz;
+ xmlDocDumpFormatMemory (doc, &xbuf, &bufsz, 1);
+
+ printf ("%s\n", xbuf);
diff --git a/time/gnotime/patches/patch-as b/time/gnotime/patches/patch-as
new file mode 100644
index 00000000000..f1fc6fafe4f
--- /dev/null
+++ b/time/gnotime/patches/patch-as
@@ -0,0 +1,314 @@
+$NetBSD: patch-as,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- lib/qof/qofsql.c.orig Sun May 23 22:58:28 2004
++++ lib/qof/qofsql.c Wed Mar 16 10:21:03 2005
+@@ -134,8 +134,7 @@ dequote_string (char *str)
+ ('\"' == str[0]))
+ {
+ str ++;
+- size_t len = strlen(str);
+- str[len-1] = 0;
++ str[strlen(str)-1] = 0;
+ }
+ return str;
+ }
+@@ -145,7 +144,14 @@ handle_single_condition (QofSqlQuery *qu
+ {
+ char tmpbuff[128];
+ GSList *param_list;
++ QofQuery *qq;
+ QofQueryPredData *pred_data = NULL;
++ sql_field_item *sparam, *svalue;
++ char *qparam_name, *qvalue_name;
++ char *table_name;
++ char *param_name;
++ QofType param_type;
++ QofQueryCompare qop;
+
+ if (NULL == cond)
+ {
+@@ -161,14 +167,14 @@ handle_single_condition (QofSqlQuery *qu
+ PWARN("missing left paramter");
+ return NULL;
+ }
+- sql_field_item * sparam = cond->d.pair.left->item;
++ sparam = cond->d.pair.left->item;
+ if (SQL_name != sparam->type)
+ {
+ PWARN("we support only paramter names at this time (parsed %d)",
+ sparam->type);
+ return NULL;
+ }
+- char * qparam_name = sparam->d.name->data;
++ qparam_name = sparam->d.name->data;
+ if (NULL == qparam_name)
+ {
+ PWARN ("missing paramter name");
+@@ -183,13 +189,13 @@ handle_single_condition (QofSqlQuery *qu
+ PWARN ("missing right paramter");
+ return NULL;
+ }
+- sql_field_item * svalue = cond->d.pair.right->item;
++ svalue = cond->d.pair.right->item;
+ if (SQL_name != svalue->type)
+ {
+ PWARN("we support only simple values (parsed as %d)", svalue->type);
+ return NULL;
+ }
+- char * qvalue_name = svalue->d.name->data;
++ qvalue_name = svalue->d.name->data;
+ if (NULL == qvalue_name)
+ {
+ PWARN("missing value");
+@@ -202,16 +208,18 @@ handle_single_condition (QofSqlQuery *qu
+ * If it is, look up the value. */
+ if (0 == strncasecmp (qvalue_name, "kvp://", 6))
+ {
++ KvpValue *kv;
++ KvpValueType kvt;
+ if (NULL == query->kvp_join)
+ {
+ PWARN ("missing kvp frame");
+ return NULL;
+ }
+- KvpValue *kv = kvp_frame_get_value (query->kvp_join, qvalue_name+5);
++ kv = kvp_frame_get_value (query->kvp_join, qvalue_name+5);
+ /* If there's no value, its not an error;
+ * we just don't do this predicate */
+ if (!kv) return NULL;
+- KvpValueType kvt = kvp_value_get_type (kv);
++ kvt = kvp_value_get_type (kv);
+
+ tmpbuff[0] = 0x0;
+ qvalue_name = tmpbuff;
+@@ -251,7 +259,6 @@ handle_single_condition (QofSqlQuery *qu
+ param_list = qof_query_build_param_list (qparam_name, NULL);
+
+ /* Get the where-term comparison operator */
+- QofQueryCompare qop;
+ switch (cond->op)
+ {
+ case SQL_eq: qop = QOF_COMPARE_EQUAL; break;
+@@ -270,8 +277,6 @@ handle_single_condition (QofSqlQuery *qu
+ /* OK, need to know the type of the thing being matched
+ * in order to build the correct predicate. Get the type
+ * from the object parameters. */
+- char *table_name;
+- char *param_name;
+ get_table_and_param (qparam_name, &table_name, &param_name);
+ if (NULL == table_name)
+ {
+@@ -290,7 +295,7 @@ handle_single_condition (QofSqlQuery *qu
+ return NULL;
+ }
+
+- QofType param_type = qof_class_get_parameter_type (table_name, param_name);
++ param_type = qof_class_get_parameter_type (table_name, param_name);
+ if (!param_type)
+ {
+ PWARN ("The parameter \'%s\' on object \'%s\' is not known",
+@@ -334,19 +339,20 @@ handle_single_condition (QofSqlQuery *qu
+ }
+ else if (!strcmp (param_type, QOF_TYPE_DATE))
+ {
++ time_t exact;
++ int rc;
++ Timespec ts;
+ // XXX FIXME: this doesn't handle time strings, only date strings
+ // XXX should also see if we need to do a day-compare or time-compare.
+ /* work around highly bogus locale setting */
+ qof_date_format_set(QOF_DATE_FORMAT_US);
+
+- time_t exact;
+- int rc = qof_scan_date_secs (qvalue_name, &exact);
++ qof_scan_date_secs (qvalue_name, &exact);
+ if (0 == rc)
+ {
+ PWARN ("unable to parse date: %s", qvalue_name);
+ return NULL;
+ }
+- Timespec ts;
+ ts.tv_sec = exact;
+ ts.tv_nsec = 0;
+ pred_data = qof_query_date_predicate (qop, QOF_DATE_MATCH_DAY, ts);
+@@ -367,6 +373,8 @@ handle_single_condition (QofSqlQuery *qu
+ else if (!strcmp (param_type, QOF_TYPE_GUID))
+ {
+ GUID guid;
++ QofGuidMatch gm;
++ GList *guid_list;
+ gboolean rc = string_to_guid (qvalue_name, &guid);
+ if (0 == rc)
+ {
+@@ -377,9 +385,9 @@ handle_single_condition (QofSqlQuery *qu
+ // XXX less, than greater than don't make sense,
+ // should check for those bad conditions
+
+- QofGuidMatch gm = QOF_GUID_MATCH_ANY;
++ gm = QOF_GUID_MATCH_ANY;
+ if (QOF_COMPARE_NEQ == qop) gm = QOF_GUID_MATCH_NONE;
+- GList *guid_list = g_list_append (NULL, &guid);
++ guid_list = g_list_append (NULL, &guid);
+ pred_data = qof_query_guid_predicate (gm, guid_list);
+
+ g_list_free (guid_list);
+@@ -389,12 +397,14 @@ handle_single_condition (QofSqlQuery *qu
+ /* We are expecting an encoded value that looks like
+ * /some/path/string:value
+ */
+- char *sep = strchr (qvalue_name, ':');
++ char *path, *str, *p, *sep;
++ KvpValue *kval;
++ int len;
++ sep = strchr (qvalue_name, ':');
+ if (!sep) return NULL;
+ *sep = 0;
+- char * path = qvalue_name;
+- char * str = sep +1;
+- char * p;
++ path = qvalue_name;
++ str = sep +1;
+ /* If str has only digits, we know its a plain number.
+ * If its numbers and a decimal point, assume a float
+ * If its numbers and a slash, assume numeric
+@@ -402,8 +412,8 @@ handle_single_condition (QofSqlQuery *qu
+ * If it looks like an iso date ...
+ * else assume its a string.
+ */
+- KvpValue *kval = NULL;
+- int len = strlen (str);
++ kval = NULL;
++ len = strlen (str);
+ if ((32 == len) && (32 == strspn (str, "0123456789abcdef")))
+ {
+ GUID guid;
+@@ -455,7 +465,7 @@ handle_single_condition (QofSqlQuery *qu
+ return NULL;
+ }
+
+- QofQuery *qq = qof_query_create();
++ qq = qof_query_create();
+ qof_query_add_term (qq, param_list, pred_data, QOF_QUERY_FIRST_TERM);
+ return qq;
+ }
+@@ -471,9 +481,10 @@ handle_where (QofSqlQuery *query, sql_wh
+ {
+ QofQuery *qleft = handle_where (query, swear->d.pair.left);
+ QofQuery *qright = handle_where (query, swear->d.pair.right);
++ QofQueryOp qop;
++ QofQuery *qq;
+ if (NULL == qleft) return qright;
+ if (NULL == qright) return qleft;
+- QofQueryOp qop;
+ switch (swear->d.pair.op)
+ {
+ case SQL_and: qop = QOF_QUERY_AND; break;
+@@ -484,7 +495,7 @@ handle_where (QofSqlQuery *query, sql_wh
+ qof_query_destroy (qright);
+ return NULL;
+ }
+- QofQuery * qq = qof_query_merge (qleft, qright, qop);
++ qq = qof_query_merge (qleft, qright, qop);
+ qof_query_destroy (qleft);
+ qof_query_destroy (qright);
+ return qq;
+@@ -511,12 +522,12 @@ handle_where (QofSqlQuery *query, sql_wh
+ static void
+ handle_sort_order (QofSqlQuery *query, GList *sorder_list)
+ {
+- if (!sorder_list) return;
+-
+ GSList *qsp[3];
+ gboolean direction[3];
+ int i;
+
++ if (!sorder_list) return;
++
+ for (i=0; i<3; i++)
+ {
+ qsp[i] = NULL;
+@@ -524,14 +535,15 @@ handle_sort_order (QofSqlQuery *query, G
+
+ if (sorder_list)
+ {
++ char * qparam_name = NULL;
++ GList *n;
+ sql_order_field *sorder = sorder_list->data;
+
+ /* Set the sort direction */
+ if (SQL_asc == sorder->order_type) direction[i] = TRUE;
+
+ /* Find the paramter name */
+- char * qparam_name = NULL;
+- GList *n = sorder->name;
++ n = sorder->name;
+ if (n)
+ {
+ qparam_name = n->data;
+@@ -559,6 +571,10 @@ handle_sort_order (QofSqlQuery *query, G
+ void
+ qof_sql_query_parse (QofSqlQuery *query, const char *str)
+ {
++ GList *tables;
++ sql_select_statement *sss;
++ sql_where *swear;
++
+ if (!query) return;
+
+ /* Delete old query, if any */
+@@ -590,14 +606,14 @@ qof_sql_query_parse (QofSqlQuery *query,
+ * user wrote "SELECT * FROM tableA, tableB WHERE ..."
+ * then we don't have a single unique table-name.
+ */
+- GList *tables = sql_statement_get_tables (query->parse_result);
++ tables = sql_statement_get_tables (query->parse_result);
+ if (1 == g_list_length (tables))
+ {
+ query->single_global_tablename = tables->data;
+ }
+
+- sql_select_statement *sss = query->parse_result->statement;
+- sql_where * swear = sss->where;
++ sss = query->parse_result->statement;
++ swear = sss->where;
+ if (swear)
+ {
+ /* Walk over the where terms, turn them into QOF predicates */
+@@ -625,7 +641,7 @@ qof_sql_query_parse (QofSqlQuery *query,
+ GList *
+ qof_sql_query_run (QofSqlQuery *query, const char *str)
+ {
+- GList *node;
++ GList *node, *results;
+
+ if (!query) return NULL;
+
+@@ -635,7 +651,7 @@ qof_sql_query_run (QofSqlQuery *query, c
+ qof_query_set_book (query->qof_query, query->book);
+
+ // qof_query_print (query->qof_query);
+- GList *results = qof_query_run (query->qof_query);
++ results = qof_query_run (query->qof_query);
+
+ return results;
+ }
+@@ -643,7 +659,7 @@ qof_sql_query_run (QofSqlQuery *query, c
+ GList *
+ qof_sql_query_rerun (QofSqlQuery *query)
+ {
+- GList *node;
++ GList *node, *results;
+
+ if (!query) return NULL;
+
+@@ -652,7 +668,7 @@ qof_sql_query_rerun (QofSqlQuery *query)
+ qof_query_set_book (query->qof_query, query->book);
+
+ // qof_query_print (query->qof_query);
+- GList *results = qof_query_run (query->qof_query);
++ results = qof_query_run (query->qof_query);
+
+ return results;
+ }
diff --git a/time/gnotime/patches/patch-at b/time/gnotime/patches/patch-at
new file mode 100644
index 00000000000..e110944e0a2
--- /dev/null
+++ b/time/gnotime/patches/patch-at
@@ -0,0 +1,57 @@
+$NetBSD: patch-at,v 1.1 2005/03/16 12:48:49 rillig Exp $
+
+gcc-2.95.3 does not like code intermixed with declarations.
+
+--- src/idle-dialog.c.orig Sat May 8 18:14:49 2004
++++ src/idle-dialog.c Wed Mar 16 10:47:21 2005
+@@ -111,12 +111,13 @@ util_escape_html_markup (const char *str
+ {
+ char * p;
+ char * ret;
++ int ampcnt = 0, len;
++ const char *start;
+
+ p = strchr (str, '&');
+ if (!p) return g_strdup (str);
+
+ /* count number of ampersands */
+- int ampcnt = 0;
+ while (p)
+ {
+ ampcnt ++;
+@@ -124,12 +125,12 @@ util_escape_html_markup (const char *str
+ }
+
+ /* make room for the escapes */
+- int len = strlen(str);
++ len = strlen(str);
+ ret = g_new0 (char, len+4*ampcnt+1);
+
+ /* replace & by &amp; unless its already &amp; */
+ p = strchr (str, '&');
+- const char *start = str;
++ start = str;
+ while (p)
+ {
+ strncat (ret, start, p-start);
+@@ -155,7 +156,7 @@ display_value (GttIdleDialog *dlg, time_
+ {
+ char tbuff [30];
+ char mbuff [130];
+- char * msg;
++ char *msg, *ptitle, *pdesc;
+ time_t now = time(0);
+ time_t idle_time;
+
+@@ -201,9 +202,9 @@ display_value (GttIdleDialog *dlg, time_
+ /* Update the total elapsed time part of the message */
+ idle_time = now - dlg->last_activity;
+
+- char *ptitle = util_escape_html_markup (
++ ptitle = util_escape_html_markup (
+ gtt_project_get_title(dlg->prj));
+- char *pdesc = util_escape_html_markup (
++ pdesc = util_escape_html_markup (
+ gtt_project_get_desc(dlg->prj));
+ if (3600 > idle_time)
+ {