glib/tests/fileutils.c: Include unistd.h on *NIX only
authorChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 4 Nov 2013 04:23:30 +0000 (12:23 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Mon, 4 Nov 2013 14:51:39 +0000 (22:51 +0800)
commit1079d30e1b5b9002ca5d4e5bef398e855a7c115f
tree9d66287abb8e508354f0d6f1e288cdd0635a796f
parent20f873a0bcafe9d8d929be98ea72a0d0608d076a
glib/tests/fileutils.c: Include unistd.h on *NIX only

...and fix the test on non-English Windows, as gettext on Windows does
not honor LC_ALL = "C" (the default CRT behavior) but requires using
SetThreadLocale() to set the locale as it picks up the user's environment
and the thread's locale.  Without doing so the g_format_size_for_display()
et al will display the translated message if the gettext translations have
been installed before, causing the test_format_size_for_display tests to
fail.

https://bugzilla.gnome.org/show_bug.cgi?id=711047
glib/tests/fileutils.c