From 46aae08e8d129d1dc9d3b92463178352460f88b2 Mon Sep 17 00:00:00 2001 From: George Lebl Date: Sat, 29 Sep 2001 09:42:20 +0000 Subject: [PATCH] cast the string size to gulong and use %lu for printing to avoid 64bit Sat Sep 29 02:33:14 2001 George Lebl * tests/testglib.c (main): cast the string size to gulong and use %lu for printing to avoid 64bit issues * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument to gsize instead guint. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-12 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ glib/gstrfuncs.c | 2 +- glib/gstrfuncs.h | 2 +- tests/testglib.c | 2 +- 11 files changed, 67 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c21a84a92..adc429612 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index c21a84a92..adc429612 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Sat Sep 29 02:33:14 2001 George Lebl + + * tests/testglib.c (main): cast the string size to gulong and use %lu + for printing to avoid 64bit issues + + * glib/gstrfuncs.[ch] (g_ascii_strncasecmp): Change the 'n' argument + to gsize instead guint. + Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c index 9d1cf4fa7..5fea8091b 100644 --- a/glib/gstrfuncs.c +++ b/glib/gstrfuncs.c @@ -1268,7 +1268,7 @@ g_ascii_strcasecmp (const gchar *s1, gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, - guint n) + gsize n) { gint c1, c2; diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h index 2f5bfbfd4..7aedde134 100644 --- a/glib/gstrfuncs.h +++ b/glib/gstrfuncs.h @@ -129,7 +129,7 @@ gint g_ascii_strcasecmp (const gchar *s1, const gchar *s2); gint g_ascii_strncasecmp (const gchar *s1, const gchar *s2, - guint n); + gsize n); gchar* g_ascii_strdown (const gchar *str, gssize len); gchar* g_ascii_strup (const gchar *str, diff --git a/tests/testglib.c b/tests/testglib.c index 1302b5997..865225e7d 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -823,7 +823,7 @@ main (int argc, 10, 666, 15, 15, 666.666666666, 666.666666666); #endif - g_print ("string2 length = %d...\n", string2->len); + g_print ("string2 length = %lu...\n", (gulong)string2->len); string2->str[70] = '\0'; g_print ("first 70 chars:\n%s\n", string2->str); string2->str[141] = '\0';