diff options
author | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-01-06 23:03:44 (GMT) |
---|---|---|
committer | Nickolay V. Shmyrev <nshmyrev@src.gnome.org> | 2006-01-06 23:03:44 (GMT) |
commit | 68f32e3484d5cabf3e167c4ce1d40bd0991ccb68 (patch) | |
tree | ff15af0e35cf1e3dd78b837718da5e4b9b6b18c0 /shell/ev-metadata-manager.c | |
parent | 43398c4ea1a940bc2ee2921d5811fe8ee4144a65 (diff) |
Commit workaround Mozilla problem. Fix for the bug #325919
* ps/ps.c: (psscan):
Commit workaround Mozilla problem. Fix for the bug #325919
* shell/ev-metadata-manager.c: (parse_value), (parseItem),
(save_item):
Fix for year 2038 problem.
Diffstat (limited to 'shell/ev-metadata-manager.c')
-rw-r--r-- | shell/ev-metadata-manager.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/shell/ev-metadata-manager.c b/shell/ev-metadata-manager.c index 8249fb0..4103a35 100644 --- a/shell/ev-metadata-manager.c +++ b/shell/ev-metadata-manager.c @@ -142,13 +142,13 @@ parse_value (xmlChar *value, xmlChar *type) g_value_set_string (ret, (char *)value); break; case G_TYPE_INT: - g_value_set_int (ret, atoi ((char *)value)); + g_value_set_int (ret, g_ascii_strtoull ((char *)value, NULL, 0)); break; case G_TYPE_DOUBLE: g_value_set_double (ret, g_ascii_strtod ((char *)value, NULL)); break; case G_TYPE_BOOLEAN: - g_value_set_boolean (ret, atoi ((char *)value)); + g_value_set_boolean (ret, g_ascii_strtoull ((char *)value, NULL, 0)); break; } @@ -179,7 +179,7 @@ parseItem (xmlDocPtr doc, xmlNodePtr cur) item = g_new0 (Item, 1); - item->atime = atol ((char *)atime); + item->atime = g_ascii_strtoull((char*)atime, NULL, 0); item->values = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -569,10 +569,8 @@ save_item (const gchar *key, const gpointer *data, xmlNodePtr parent) xmlSetProp (xml_node, (const xmlChar *)"uri", (const xmlChar *)key); - /* FIXME: is the cast right? - Paolo */ - atime = g_strdup_printf ("%d", (int)item->atime); - xmlSetProp (xml_node, (const xmlChar *)"atime", (const xmlChar *)atime); - + atime = g_strdup_printf ("%ld", item->atime); + xmlSetProp (xml_node, (const xmlChar *)"atime", (const xmlChar *)atime); g_free (atime); g_hash_table_foreach (item->values, |