diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-06-08 18:41:09 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-06-08 18:41:09 +0000 |
commit | 2379e6b1241cee46346bca82ea8ab5013b7511b6 (patch) | |
tree | 4bf1d364752abbc7a0420f882a5a657c5447d23e | |
parent | 320f2ba8857395caf57bf670be36bb0e215971fe (diff) | |
download | gdk-pixbuf-2379e6b1241cee46346bca82ea8ab5013b7511b6.tar.gz |
Handle return values from nl_langinfo() more correctly.
2007-06-09 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcalendar.c (gtk_calendar_init): Handle return values
from nl_langinfo() more correctly.
svn path=/branches/gtk-2-10/; revision=18086
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gtk/gtkcalendar.c | 10 |
2 files changed, 12 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2007-06-09 Matthias Clasen <mclasen@redhat.com> + + Merge from trunk: + + * gtk/gtkcalendar.c (gtk_calendar_init): Handle return values + from nl_langinfo() more correctly. + 2007-06-07 Yevgen Muntyan <muntyan@tamu.edu> Merge from trunk (#445196): diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 4f5df8e50..a0e33edbb 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -569,7 +569,7 @@ gtk_calendar_init (GtkCalendar *calendar) GtkCalendarPrivate *priv; gchar *year_before; #ifdef HAVE__NL_TIME_FIRST_WEEKDAY - gchar *langinfo; + union { unsigned int word; char *string; } langinfo; gint week_1stday = 0; gint first_weekday = 1; guint week_origin; @@ -723,10 +723,10 @@ gtk_calendar_init (GtkCalendar *calendar) } #else #ifdef HAVE__NL_TIME_FIRST_WEEKDAY - langinfo = nl_langinfo (_NL_TIME_FIRST_WEEKDAY); - first_weekday = langinfo[0]; - langinfo = nl_langinfo (_NL_TIME_WEEK_1STDAY); - week_origin = GPOINTER_TO_INT (langinfo); + langinfo.string = nl_langinfo (_NL_TIME_FIRST_WEEKDAY); + first_weekday = langinfo.string[0]; + langinfo.string = nl_langinfo (_NL_TIME_WEEK_1STDAY); + week_origin = langinfo.word; if (week_origin == 19971130) /* Sunday */ week_1stday = 0; else if (week_origin == 19971201) /* Monday */ |