From 27cb515443e50d62345e9ba2426b82c924cc3c7a Mon Sep 17 00:00:00 2001 From: Hans Breuer Date: Mon, 3 Dec 2007 22:46:17 +0000 Subject: [PATCH] added glib_gettext (in use by gio) also try building gio 2007-12-03 Hans Breuer * glib/glib.symbols : added glib_gettext (in use by gio) * makefile.msc : also try building gio * glib/gmarkup.c : use G_GUINT64_CONSTANT() to avoid 'bad suffix on number' * glib/gtestutils.c : declare cariable at the beginning of the block, include for G_OS_WIN32 * makefile.msc.in : add gurifuncs and gtestutils svn path=/trunk/; revision=6028 --- ChangeLog | 11 +++++++++++ glib/glib.symbols | 2 ++ glib/gmarkup.c | 4 ++-- glib/gtestutils.c | 21 ++++++++++++++------- glib/makefile.msc.in | 2 ++ makefile.msc | 2 +- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index b2f1fbb6..cd994e3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-12-03 Hans Breuer + + * glib/glib.symbols : added glib_gettext (in use by gio) + * makefile.msc : also try building gio + + * glib/gmarkup.c : use G_GUINT64_CONSTANT() to avoid + 'bad suffix on number' + * glib/gtestutils.c : declare cariable at the beginning of the block, + include for G_OS_WIN32 + * makefile.msc.in : add gurifuncs and gtestutils + 2007-12-03 Ryan Lortie * glib/ghash.c: create a common function for the many places where all diff --git a/glib/glib.symbols b/glib/glib.symbols index 28fa1ba1..9b40d4e1 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -1559,6 +1559,8 @@ g_win32_locale_filename_from_utf8 #endif #endif +glib_gettext + #ifdef INCLUDE_VARIABLES g_ascii_table g_utf8_skip diff --git a/glib/gmarkup.c b/glib/gmarkup.c index 381bea2b..1467e17b 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -2496,7 +2496,7 @@ g_markup_collect_attributes (const gchar *element_name, mandatory = FALSE; for (i = 0; attribute_names[i]; i++) - if (i >= 40 || !(collected & (1ull << i))) + if (i >= 40 || !(collected & (G_GUINT64_CONSTANT(1) << i))) if (!strcmp (attribute_names[i], attr)) break; @@ -2514,7 +2514,7 @@ g_markup_collect_attributes (const gchar *element_name, * what error it is, so just continue... */ if (i < 40) - collected |= (1ull << i); + collected |= (G_GUINT64_CONSTANT(1) << i); value = attribute_values[i]; diff --git a/glib/gtestutils.c b/glib/gtestutils.c index a973e3df..9f13a6f4 100644 --- a/glib/gtestutils.c +++ b/glib/gtestutils.c @@ -30,6 +30,9 @@ #ifdef HAVE_UNISTD_H #include #endif +#ifdef G_OS_WIN32 +#include +#endif #include #include #ifdef HAVE_SYS_SELECT_H @@ -753,11 +756,12 @@ g_test_create_case (const char *test_name, void (*data_test) (void), void (*data_teardown) (void)) { + GTestCase *tc; g_return_val_if_fail (test_name != NULL, NULL); g_return_val_if_fail (strchr (test_name, '/') == NULL, NULL); g_return_val_if_fail (test_name[0] != 0, NULL); g_return_val_if_fail (data_test != NULL, NULL); - GTestCase *tc = g_slice_new0 (GTestCase); + tc = g_slice_new0 (GTestCase); tc->name = g_strdup (test_name); tc->fixture_size = data_size; tc->fixture_setup = (void*) data_setup; @@ -837,10 +841,11 @@ g_test_add_func (const char *testpath, GTestSuite* g_test_create_suite (const char *suite_name) { + GTestSuite *ts; g_return_val_if_fail (suite_name != NULL, NULL); g_return_val_if_fail (strchr (suite_name, '/') == NULL, NULL); g_return_val_if_fail (suite_name[0] != 0, NULL); - GTestSuite *ts = g_slice_new0 (GTestSuite); + ts = g_slice_new0 (GTestSuite); ts->name = g_strdup (suite_name); return ts; } @@ -933,10 +938,11 @@ test_case_run (GTestCase *tc) { GTimer *test_run_timer = g_timer_new(); long double largs[3]; + void *fixture; g_test_log (G_TEST_LOG_START_CASE, test_run_name, NULL, 0, NULL); test_run_forks = 0; g_timer_start (test_run_timer); - void *fixture = g_malloc0 (tc->fixture_size); + fixture = g_malloc0 (tc->fixture_size); test_run_seed (test_run_seedstr); if (tc->fixture_setup) tc->fixture_setup (fixture); @@ -1057,11 +1063,12 @@ g_assertion_message (const char *domain, const char *message) { char lstr[32]; + char *s; g_snprintf (lstr, 32, "%d", line); - char *s = g_strconcat (domain ? domain : "", domain && domain[0] ? ":" : "", - file, ":", lstr, ":", - func, func[0] ? ":" : "", - " ", message, NULL); + s = g_strconcat (domain ? domain : "", domain && domain[0] ? ":" : "", + file, ":", lstr, ":", + func, func[0] ? ":" : "", + " ", message, NULL); g_printerr ("**\n** %s\n", s); g_free (s); abort(); diff --git a/glib/makefile.msc.in b/glib/makefile.msc.in index 0c658f03..dc8f2c6e 100644 --- a/glib/makefile.msc.in +++ b/glib/makefile.msc.in @@ -78,6 +78,7 @@ glib_OBJECTS = \ gstdio.obj \ gstrfuncs.obj \ gstring.obj \ + gtestutils.obj \ gthread.obj \ gthreadpool.obj \ gtimer.obj \ @@ -86,6 +87,7 @@ glib_OBJECTS = \ gunicollate.obj \ gunidecomp.obj \ guniprop.obj \ + gurifuncs.obj \ gutf8.obj \ gutils.obj \ gwin32.obj \ diff --git a/makefile.msc b/makefile.msc index bbb24b85..52e07f6d 100644 --- a/makefile.msc +++ b/makefile.msc @@ -1,7 +1,7 @@ ## Makefile for building the GLib dlls with Microsoft C ## Use: nmake -f makefile.msc -PARTS = glib gmodule gthread gobject tests +PARTS = glib gmodule gthread gobject gio tests all : \ config.h \ -- 2.34.1