adapt to recent api changes variable declaration at the beginning of a

2007-12-09  Hans Breuer  <hans@breuer.org>

	* tests/gio-ls.c : adapt to recent api changes
	* tests/testglib.c : variable declaration at the beginning of a block
	
	(Lieven van der Heide, #503602)
	* win32-fixup.pl : process *.rc.in as well; substitute 
	LT_CURRENT_MINUS_AGE
	* glib/makefile.msc.in : alphabetic sorting of OBJECTS


svn path=/trunk/; revision=6184
This commit is contained in:
Hans Breuer 2007-12-21 10:11:35 +00:00 committed by Hans Breuer
parent 2c0f3fc5ff
commit 1cda3c9e01
5 changed files with 32 additions and 19 deletions

View File

@ -1,3 +1,13 @@
2007-12-09 Hans Breuer <hans@breuer.org>
* tests/gio-ls.c : adapt to recent api changes
* tests/testglib.c : variable declaration at the beginning of a block
(Lieven van der Heide, #503602)
* win32-fixup.pl : process *.rc.in as well; substitute
LT_CURRENT_MINUS_AGE
* glib/makefile.msc.in : alphabetic sorting of OBJECTS
2007-12-20 Matthias Clasen <mclasen@redhat.com> 2007-12-20 Matthias Clasen <mclasen@redhat.com>
* configure.in: Bump version * configure.in: Bump version

View File

@ -51,22 +51,22 @@ glib_OBJECTS = \
gfileutils.obj \ gfileutils.obj \
ghash.obj \ ghash.obj \
ghook.obj \ ghook.obj \
gkeyfile.obj \
gmappedfile.obj \
giochannel.obj \ giochannel.obj \
giowin32.obj \ giowin32.obj \
gkeyfile.obj \
glist.obj \ glist.obj \
gmain.obj \ gmain.obj \
gmappedfile.obj \
gmarkup.obj \ gmarkup.obj \
gmem.obj \ gmem.obj \
gmessages.obj \ gmessages.obj \
gnode.obj \ gnode.obj \
goption.obj \ goption.obj \
gpattern.obj \
gprimes.obj \ gprimes.obj \
gprintf.obj \
gqsort.obj \ gqsort.obj \
gqueue.obj \ gqueue.obj \
gpattern.obj \
gprintf.obj \
grand.obj \ grand.obj \
gregex.obj \ gregex.obj \
grel.obj \ grel.obj \

View File

@ -1,5 +1,4 @@
#include <glib/goption.h>
#include <gio/gio.h> #include <gio/gio.h>
#define GETTEXT_PACKAGE "gio-ls" #define GETTEXT_PACKAGE "gio-ls"
@ -61,7 +60,7 @@ print_path (const gchar* path,
guint32 flags) guint32 flags)
{ {
GFile *top; GFile *top;
const gchar *short_attrs = G_FILE_ATTRIBUTE_STD_NAME; const gchar *short_attrs = G_FILE_ATTRIBUTE_STANDARD_NAME;
const gchar *long_attrs = G_FILE_ATTRIBUTE_OWNER_USER "," G_FILE_ATTRIBUTE_OWNER_GROUP "," \ const gchar *long_attrs = G_FILE_ATTRIBUTE_OWNER_USER "," G_FILE_ATTRIBUTE_OWNER_GROUP "," \
"access:*,std:*"; "access:*,std:*";
const gchar *attrs; const gchar *attrs;
@ -92,7 +91,7 @@ print_path (const gchar* path,
if (flags & SHOW_LONG) if (flags & SHOW_LONG)
{ {
GFileAttributeValue *val = g_file_info_get_attribute (info, G_FILE_ATTRIBUTE_OWNER_USER); const gchar *val;
g_print ("%c%c%c%c ", g_print ("%c%c%c%c ",
g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY ? 'd' : '-', g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY ? 'd' : '-',
@ -100,19 +99,14 @@ print_path (const gchar* path,
g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) ? 'w' : '-', g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE) ? 'w' : '-',
g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE) ? 'x' : '-'); g_file_info_get_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE) ? 'x' : '-');
if (!val) val = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_OWNER_USER);
g_print ("\t?"); g_print ("\t%15s", val ? val : "?user?");
else if (val->type == G_FILE_ATTRIBUTE_TYPE_STRING)
g_print ("\t%15s", val->u.string);
val = g_file_info_get_attribute (info, G_FILE_ATTRIBUTE_OWNER_GROUP); val = g_file_info_get_attribute_string (info, G_FILE_ATTRIBUTE_OWNER_GROUP);
if (!val) g_print ("\t%15s", val ? val : "?group?");
g_print ("\t?");
else if (val->type == G_FILE_ATTRIBUTE_TYPE_STRING)
g_print ("\t%15s", val->u.string);
} }
g_print ("\t%s\n", name ? name : "<NULL>"); g_print ("\t%s\n", name ? name : "?noname?");
g_object_unref (info); g_object_unref (info);
} }

View File

@ -819,6 +819,9 @@ test_info (void)
if (g_test_verbose()) if (g_test_verbose())
{ {
#ifdef G_PLATFORM_WIN32
gchar *glib_dll;
#endif
const gchar *charset; const gchar *charset;
if (g_get_charset ((G_CONST_RETURN char**)&charset)) if (g_get_charset ((G_CONST_RETURN char**)&charset))
g_print ("current charset is UTF-8: %s\n", charset); g_print ("current charset is UTF-8: %s\n", charset);
@ -828,10 +831,10 @@ test_info (void)
#ifdef G_PLATFORM_WIN32 #ifdef G_PLATFORM_WIN32
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
/* Can't calculate GLib DLL name at runtime. */ /* Can't calculate GLib DLL name at runtime. */
gchar *glib_dll = "libglib-2.0-0.dll"; glib_dll = "libglib-2.0-0.dll";
#endif #endif
#ifdef G_WITH_CYGWIN #ifdef G_WITH_CYGWIN
gchar *glib_dll = "cygglib-2.0-0.dll"; glib_dll = "cygglib-2.0-0.dll";
#endif #endif
g_print ("current locale: %s\n", g_win32_getlocale ()); g_print ("current locale: %s\n", g_win32_getlocale ());

View File

@ -6,6 +6,7 @@ $micro = 7;
$binary_age = 0; $binary_age = 0;
$interface_age = 0; $interface_age = 0;
$gettext_package = "glib20"; $gettext_package = "glib20";
$current_minus_age = 0;
sub process_file sub process_file
{ {
@ -22,6 +23,7 @@ sub process_file
s/\@GLIB_INTERFACE_AGE\@/$interface_age/g; s/\@GLIB_INTERFACE_AGE\@/$interface_age/g;
s/\@GLIB_BINARY_AGE\@/$binary_age/g; s/\@GLIB_BINARY_AGE\@/$binary_age/g;
s/\@GETTEXT_PACKAGE\@/$gettext_package/g; s/\@GETTEXT_PACKAGE\@/$gettext_package/g;
s/\@LT_CURRENT_MINUS_AGE@/$current_minus_age/g;
print OUTPUT; print OUTPUT;
} }
} }
@ -29,7 +31,11 @@ sub process_file
process_file ("config.h.win32"); process_file ("config.h.win32");
process_file ("glibconfig.h.win32"); process_file ("glibconfig.h.win32");
process_file ("glib/makefile.msc"); process_file ("glib/makefile.msc");
process_file ("glib/glib.rc");
process_file ("gmodule/makefile.msc"); process_file ("gmodule/makefile.msc");
process_file ("gmodule/gmodule.rc");
process_file ("gobject/makefile.msc"); process_file ("gobject/makefile.msc");
process_file ("gobject/gobject.rc");
process_file ("gthread/makefile.msc"); process_file ("gthread/makefile.msc");
process_file ("gthread/gthread.rc");
process_file ("tests/makefile.msc"); process_file ("tests/makefile.msc");