mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-12 10:45:13 +01:00
Remove warning about g_print, etc, encoding.
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com> * 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.
This commit is contained in:
parent
f404089654
commit
90d93042c2
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
@ -1,3 +1,20 @@
|
||||
Thu Mar 28 18:22:53 2002 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* 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 <timj@gtk.org>
|
||||
|
||||
* glib/gmessages.c:
|
||||
|
25
NEWS
25
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
|
||||
=================================
|
||||
|
||||
|
11
README
11
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
|
||||
==================
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user