Index: gdate.c
===================================================================
RCS file: /cvs/gnome/glib/glib/gdate.c,v
retrieving revision 1.29
diff -u -p -r1.29 gdate.c
--- gdate.c	27 Feb 2002 08:34:46 -0000	1.29
+++ gdate.c	27 May 2002 10:03:43 -0000
@@ -43,6 +43,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <locale.h>
+#ifdef __STDC_ISO_10646__
+#include <wchar.h>
+#endif
 
 GDate*
 g_date_new ()
@@ -1337,6 +1340,7 @@ g_date_strftime (gchar       *s, 
                  const GDate *d)
 {
   struct tm tm;
+#ifndef __STDC_ISO_10646__
   gsize locale_format_len = 0;
   gchar *locale_format;
   gsize tmplen;
@@ -1345,6 +1349,7 @@ g_date_strftime (gchar       *s, 
   gsize convlen = 0;
   gchar *convbuf;
   GError *error = NULL;
+#endif /* !__STDC_ISO_10646__ */
   gsize retval;
 
   g_return_val_if_fail (d != NULL, 0);
@@ -1355,6 +1360,19 @@ g_date_strftime (gchar       *s, 
 
   g_date_to_struct_tm (d, &tm);
 
+#ifdef __STDC_ISO_10646__
+
+  retval = wcsftime ((wchar_t *)s, slen, (wchar_t *)format, &tm);
+  if (retval == 0)
+  {
+    /* If retval == 0, the contents of s are undefined.  We define
+     *  them. 
+     */
+    s[0] = '\0';
+  }
+
+#else /* !__STDC_ISO_10646__ */
+
   locale_format = g_locale_from_utf8 (format, -1, NULL, &locale_format_len, &error);
 
   if (error)
@@ -1426,6 +1444,8 @@ g_date_strftime (gchar       *s, 
   memcpy (s, convbuf, convlen);
   s[convlen] = '\0';
   g_free (convbuf);
+
+#endif /* __STDC_ISO_10646__ */
 
   return retval;
 }
