summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2004-03-05 08:50:44 +0000
committerMark McLoughlin <markmc@src.gnome.org>2004-03-05 08:50:44 +0000
commitac3c61f3e8982cdb8bb1706972f5e831b75ef64b (patch)
tree3c59e9c8082bc13e6ceccbd81000156b74bc4d59
parent0b49ca466be2b41475d6bb85319492d5cb8a4ecc (diff)
downloadgnome-desktop-ac3c61f3e8982cdb8bb1706972f5e831b75ef64b.tar.gz
remove the dependancy on strptime(). Fixes #135922.
2004-03-05 Mark McLoughlin <mark@skynet.ie> * gnome-about.c: (create_date_string): remove the dependancy on strptime(). Fixes #135922. 2004-03-05 Mark McLoughlin <mark@skynet.ie> * configure.in: remove the XOPEN_SOUCE define since we don't use strptime anymore.
-rw-r--r--ChangeLog5
-rw-r--r--configure.in3
-rw-r--r--gnome-about/ChangeLog5
-rw-r--r--gnome-about/gnome-about.c22
-rw-r--r--libgnome-desktop/libgnome/.cvsignore2
-rw-r--r--libgnome-desktop/libgnomeui/.cvsignore2
6 files changed, 29 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index e194a560..b996db62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-05 Mark McLoughlin <mark@skynet.ie>
+
+ * configure.in: remove the XOPEN_SOUCE define since
+ we don't use strptime anymore.
+
2004-03-04 Guntupalli Karunakar <karunakar@freedomink.org>
* configure.in: Added "pa" (Punjabi) to ALL_LINGUAS.
diff --git a/configure.in b/configure.in
index 11d8e82d..b033c9f2 100644
--- a/configure.in
+++ b/configure.in
@@ -150,9 +150,6 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
-AC_DEFINE(_XOPEN_SOURCE, [], [Needed on Linux systems to provide full X/Open
-compatibility (e.g. prototypes strptime).])
-
AC_OUTPUT([
Makefile
gnome-desktop.spec
diff --git a/gnome-about/ChangeLog b/gnome-about/ChangeLog
index 31aee694..f76df3f4 100644
--- a/gnome-about/ChangeLog
+++ b/gnome-about/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-05 Mark McLoughlin <mark@skynet.ie>
+
+ * gnome-about.c: (create_date_string): remove the dependancy
+ on strptime(). Fixes #135922.
+
==================== 2.5.90 ====================
==================== 2.5.5 ====================
diff --git a/gnome-about/gnome-about.c b/gnome-about/gnome-about.c
index 4cdc0503..d6dd366f 100644
--- a/gnome-about/gnome-about.c
+++ b/gnome-about/gnome-about.c
@@ -752,17 +752,25 @@ get_description_messages (xmlNodePtr node)
static char*
create_date_string (const char *value)
{
- struct tm tm;
- char *result;
- GDate *date = g_date_new ();
-
- if (!strptime (value, "%Y-%m-%d", &tm)) {
+ char *result;
+ GDate *date;
+ int day;
+ int month;
+ int year;
+
+ /* YYYY-MM-DD */
+ if (sscanf (value, "%d-%d-%d", &year, &month, &day) < 3)
return NULL;
- }
- g_date_set_dmy (date, tm.tm_mday, 1 + tm.tm_mon, 1900 + tm.tm_year);
+
+ date = g_date_new ();
+
+ g_date_set_dmy (date, day, month, year);
+
result = g_new0 (char, 20);
g_date_strftime (result, 20, "%x", date);
+
g_date_free (date);
+
return result;
}
diff --git a/libgnome-desktop/libgnome/.cvsignore b/libgnome-desktop/libgnome/.cvsignore
new file mode 100644
index 00000000..282522db
--- /dev/null
+++ b/libgnome-desktop/libgnome/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/libgnome-desktop/libgnomeui/.cvsignore b/libgnome-desktop/libgnomeui/.cvsignore
new file mode 100644
index 00000000..282522db
--- /dev/null
+++ b/libgnome-desktop/libgnomeui/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in