+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Fri Mar 8 10:20:46 2002 Owen Taylor <otaylor@redhat.com>
+
+ * NEWS: Final updates for 2.0.0
+
+ * glib/gstrfuncs.c: Convert the results of strerror()
+ and strsignal() to UTF-8.
+
+ * glib/gconvert.c glib/gdir.c glib/giochannel.c glib/giounix.c
+ glib/giowin32.c: Use g_strerror(), not strerror().
+
Fri Mar 8 00:15:29 2002 Owen Taylor <otaylor@redhat.com>
* README.in: Updates.
+Overview of Changes in GLib 2.0.0
+=================================
+
+* Thread portability fixes [Sebastian Wilhelmi]
+* Documentation updates [Owen Taylor]
+* Make g_strerror(), g_strsignal() properly return UTF-8,
+ call bind_text_domain_codeset() so that error strings
+ are in UTF-8 as well. [Owen, Tor Lillqvist]
+
+Overview of Changes in GLib 2.0.0 rc1:
+======================================
+
+* Win32 fixes [Tor Lillqvist]
+* Portability fixes [Finlay Dobbie, Miroslaw Dobrzanski-Neumann]
+* Fix up g_date_strftime [Daniel Elstner]
+* Add some structure padding [Tim Janik]
+* Make g_get_homedir() prefer the users home directory to $HOME
+
+Other contributors: Matthias Clasen, Paolo Maggi, Christian Rose
+
Overview of Changes in GLib 1.3.15:
===================================
Application programmers should not call g_locale_to_utf8() on these
strings.
-* The results of g_strerror() are currently in the encoding of the locale
- rather than in UTF-8. Again, this is a bug, and not behavior that
- should be relied upon.
-
* Similarly, the GLib error logging functions such as g_print(), g_warning(),
g_error(), currently do not convert the strings they are passed from
UTF-8 to the encoding of the locale, or check that the strings they
else
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
_("Could not open converter from '%s' to '%s': %s"),
- from_codeset, to_codeset, strerror (errno));
+ from_codeset, to_codeset, g_strerror (errno));
return cd;
}
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
_("Error during conversion: %s"),
- strerror (errno));
+ g_strerror (errno));
have_error = TRUE;
break;
}
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
_("Error during conversion: %s"),
- strerror (errno));
+ g_strerror (errno));
have_error = TRUE;
break;
}
#include "config.h"
#include <errno.h>
-#include <string.h> /* strerror, strcmp */
+#include <string.h> /* strcmp */
#ifdef HAVE_DIRENT_H
#include <dirent.h>
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Error opening directory '%s': %s"),
- path, strerror (errno));
+ path, g_strerror (errno));
g_free (dir);
return NULL;
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Error reading file '%s': %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
goto error;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to read from file '%s': %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
return FALSE;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to open file '%s': %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
return FALSE;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to get attributes of file '%s': fstat() failed: %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
return FALSE;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to open file '%s': fdopen() failed: %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
return FALSE;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to open file '%s': %s"),
- filename, strerror (errno));
+ filename, g_strerror (errno));
return FALSE;
}
G_FILE_ERROR,
g_file_error_from_errno (errno),
_("Failed to create file '%s': %s"),
- fulltemplate, strerror (errno));
+ fulltemplate, g_strerror (errno));
g_free (fulltemplate);
return -1;
}
else
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
_("Could not open converter from `%s' to `%s': %s"),
- from_enc, to_enc, strerror (err));
+ from_enc, to_enc, g_strerror (err));
if (read_cd != (GIConv) -1)
g_iconv_close (read_cd);
default:
g_assert (errval != EBADF); /* The converter should be open */
g_set_error (err, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- _("Error during conversion: %s"), strerror (errval));
+ _("Error during conversion: %s"), g_strerror (errval));
return G_IO_STATUS_ERROR;
}
}
return G_IO_STATUS_ERROR;
default:
g_set_error (error, G_CONVERT_ERROR, G_CONVERT_ERROR_FAILED,
- _("Error during conversion: %s"), strerror (errnum));
+ _("Error during conversion: %s"), g_strerror (errnum));
if (from_buf_len >= left_len + from_buf_old_len)
wrote_bytes += from_buf_len - left_len - from_buf_old_len;
if (bytes_written)
default:
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
}
default:
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
}
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (EINVAL),
- strerror (EINVAL));
+ g_strerror (EINVAL));
return G_IO_STATUS_ERROR;
}
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
{
g_set_error (error, G_FILE_ERROR,
g_file_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return (GIOChannel *)NULL;
}
close (fid);
g_set_error (error, G_FILE_ERROR,
g_file_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return (GIOChannel *)NULL;
}
&channel->thread_id);
if (channel->thread_handle == 0)
g_warning (G_STRLOC ": Error creating reader thread: %s",
- strerror (errno));
+ g_strerror (errno));
WaitForSingleObject (channel->space_avail_event, INFINITE);
}
default:
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
}
default:
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
}
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (EINVAL),
- strerror (EINVAL));
+ g_strerror (EINVAL));
return G_IO_STATUS_ERROR;
}
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return G_IO_STATUS_ERROR;
}
{
g_set_error (error, G_FILE_ERROR,
g_file_error_from_errno (errno),
- strerror (errno));
+ g_strerror (errno));
return (GIOChannel *)NULL;
}
char *msg;
#ifdef HAVE_STRERROR
- return strerror (errnum);
+ const char *msg_locale;
+
+ msg_locale = strerror (errnum);
+ if (g_get_charset (NULL))
+ return msg_locale;
+ else
+ {
+ gchar *msg_utf8 = g_locale_to_utf8 (msg_locale, -1, NULL, NULL, NULL);
+ if (msg_utf8)
+ {
+ /* Stick in the quark table so that we can return a static result
+ */
+ GQuark msg_quark = g_quark_from_string (msg_utf8);
+ g_free (msg_utf8);
+
+ return g_quark_to_string (msg_quark);
+ }
+ }
#elif NO_SYS_ERRLIST
switch (errnum)
{
char *msg;
#ifdef HAVE_STRSIGNAL
+ const char *msg_locale;
+
#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN)
extern const char *strsignal(int);
#else
/* this is declared differently (const) in string.h on BeOS */
extern char *strsignal (int sig);
#endif /* !G_OS_BEOS && !G_WITH_CYGWIN */
- return strsignal (signum);
+ msg_locale = strsignal (signum);
+ if (g_get_charset (NULL))
+ return msg_locale;
+ else
+ {
+ gchar *msg_utf8 = g_locale_to_utf8 (msg_locale, -1, NULL, NULL, NULL);
+ if (msg_utf8)
+ {
+ /* Stick in the quark table so that we can return a static result
+ */
+ GQuark msg_quark = g_quark_from_string (msg_utf8);
+ g_free (msg_utf8);
+
+ return g_quark_to_string (msg_quark);
+ }
+ }
#elif NO_SYS_SIGLIST
switch (signum)
{