diff --git a/ChangeLog b/ChangeLog index e98ae1156..594089092 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index e98ae1156..594089092 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,20 @@ +Thu Mar 28 18:22:53 2002 Owen Taylor + + * README: Remove warning about g_print, etc, encoding. + + * NEWS: Updates. + + * glib/gmessages.c (g_log_default_handler): Use %lu + (plus a cast) when printing out pid_t arguments. + (#76770, Morten Welinder) + + * glib/gstrfuncs.c (g_strdup_vprintf): Check the + result of vasprintf(), return NULL on failure. + (#76802, Akira Tagoh) + + * tests/testglib.c (TEST): Supress a warning with + some GCC versions. + Thu Mar 28 20:31:51 2002 Tim Janik * glib/gmessages.c: diff --git a/NEWS b/NEWS index 5f68bae76..2675ba27f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,28 @@ +Overview of Changes in GLib 2.0.1 +================================= + +* Portability fixes for Sun's Forte compiler [Erwann Chenede] +* Performance improvements for GObject parameter lookup, + g_filename_to/from_utf8() [Alex Larsson] +* Actually check interface prerequisites [Matthias Clasen, + Miroslaw Dobrzanski-Neumann] +* Fix problem with glib-mkenums taking huge amounts of stack. [Owen Taylor] +* Fix g_signal_handlers_disconnect_by_func() for C++ [Damien Sandras] +* Fixes for g_log() and threading. + [Sebastian Wilhelmi, Miroslaw Dobrzanski-Neumann, Tim Janik] +* Make g_print(), g_printerr(), g_warning(), etc, convert from + UTF-8 to the encoding of the locale [Sebastain Wilhelmi, Tim] +* Fixes for GIOChannel on windows. [Tor Lillquist] +* Fix gsize/gint mismatches in giochannel.c [Miroslaw Dobrzanski-Neumann] +* Fix file descriptor leak in g_file_get_contents() [Matthias] +* Workaround iconv() problems on older Solaris [Lauri Alanko] +* Fix warnings with gcc-3.1 about asm const [Cody Russel] +* Minor bug fixes. + +Other contributors: Hans Breuer, LEE Sau Dan, Sven Neumann, Salmaso Raffaele, + Akira Tagoh, Morten Welinder + + Overview of Changes in GLib 2.0.0 ================================= diff --git a/README b/README index 5116c8930..ac8ba03cd 100644 --- a/README +++ b/README @@ -24,23 +24,16 @@ Installation See the file 'INSTALL' -Notes about GLib-2.0.0 +Notes about GLib-2.0.1 ====================== * On systems without the libintl from GNU gettext() or a recent version of the GNU C library, the encoding of translated error messages will be incorrect (they should be in UTF-8). A workaround for this is to install - GNU gettext and use that libintl. This is expected to be fixed in GLib-2.0.1. + GNU gettext and use that libintl. This is expected to be fixed in GLib-2.0.2. Application programmers should not call g_locale_to_utf8() on these strings. -* 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 - are passed are valid UTF-8. They should, despite this, be assumed to take - UTF-8 arguments. - - How to report bugs ================== diff --git a/glib/gmessages.c b/glib/gmessages.c index 4a72be50a..da8959aa5 100644 --- a/glib/gmessages.c +++ b/glib/gmessages.c @@ -747,9 +747,9 @@ g_log_default_handler (const gchar *log_domain, const gchar *prg_name = g_get_prgname (); if (!prg_name) - g_string_append_printf (gstring, "(process:%u): ", getpid ()); + g_string_append_printf (gstring, "(process:%lu): ", (gulong)getpid ()); else - g_string_append_printf (gstring, "(%s:%u): ", prg_name, getpid ()); + g_string_append_printf (gstring, "(%s:%lu): ", prg_name, (gulong)getpid ()); } if (log_domain) diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 08c3e55b8..ba72664c7 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -183,8 +183,9 @@ g_strdup_vprintf (const gchar *format, { gchar *buffer; #ifdef HAVE_VASPRINTF - vasprintf (&buffer, format, args1); - if (!g_mem_is_system_malloc ()) + if (vasprintf (&buffer, format, args1) < 0) + buffer = NULL; + else if (!g_mem_is_system_malloc ()) { gchar *buffer1 = g_strdup (buffer); free (buffer); diff --git a/tests/testglib.c b/tests/testglib.c index c4478341b..1c8de8d00 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -50,12 +50,14 @@ static int array[10000]; static gboolean failed = FALSE; +/* We write (m ? m : "") even in the m != NULL case to suppress a warning with GCC-3.1 + */ #define TEST(m,cond) G_STMT_START { failed = !(cond); \ if (failed) \ { if (!m) \ g_print ("\n(%s:%d) failed for: %s\n", __FILE__, __LINE__, ( # cond )); \ else \ - g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)m); \ + g_print ("\n(%s:%d) failed for: %s: (%s)\n", __FILE__, __LINE__, ( # cond ), (gchar*)(m ? m : "")); \ } \ else \ g_print ("."); fflush (stdout); \