+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
+Fri Feb 27 00:46:29 2004 Matthias Clasen <maclas@gmx.de>
+
+ * glib/gstrfuncs.c (g_strerror): Don't modify errno. (#116617,
+ Balazs Scheidler)
+
2004-02-26 Sebastian Wilhelmi <seppi@seppi.de>
* glib/gatomic.h: Fix the !G_THREADS_ENABLED case.
{
static GStaticPrivate msg_private = G_STATIC_PRIVATE_INIT;
char *msg;
+ int saved_errno = errno;
#ifdef HAVE_STRERROR
const char *msg_locale;
msg_locale = strerror (errnum);
if (g_get_charset (NULL))
- return msg_locale;
+ {
+ errno = saved_errno;
+ return msg_locale;
+ }
else
{
gchar *msg_utf8 = g_locale_to_utf8 (msg_locale, -1, NULL, NULL, NULL);
GQuark msg_quark = g_quark_from_string (msg_utf8);
g_free (msg_utf8);
- return g_quark_to_string (msg_quark);
+ msg_utf8 = (gchar *) g_quark_to_string (msg_quark);
+ errno = saved_errno;
+ return msg_utf8;
}
}
#elif NO_SYS_ERRLIST
_g_sprintf (msg, "unknown error (%d)", errnum);
+ errno = saved_errno;
return msg;
}