platform/upstream/glib.git
10 years agoAvoid a compiler warning
Matthias Clasen [Sun, 24 Nov 2013 05:56:26 +0000 (00:56 -0500)]
Avoid a compiler warning

10 years agoFix G_OS #ifdefs in gbusserver.c
Manuel Bachmann [Sun, 24 Nov 2013 03:51:21 +0000 (04:51 +0100)]
Fix G_OS #ifdefs in gbusserver.c

G_OS #ifdefs are only available once glibconfig.h has been
evaluated ; that is, after including glib headers.
Move this block down so it gets correctly evaluated.

10 years agoFix up appinfo test
Matthias Clasen [Sun, 24 Nov 2013 03:24:00 +0000 (22:24 -0500)]
Fix up appinfo test

Make it possible to skip the terminal-launching test simply
by setting DISPLAY= . Previously, you had to unset DISPLAY,
which is a little more cumbersome.

https://bugzilla.gnome.org/show_bug.cgi?id=711178

10 years agoFix up the appinfo test
Matthias Clasen [Sun, 24 Nov 2013 03:21:29 +0000 (22:21 -0500)]
Fix up the appinfo test

One testcase was launching appinfo-test from a GAppInfo that
does not have a filename. In this case, the G_LAUNCHED_DESKTOP_FILE
envvar is not exported. Make appinfo-test deal with that, without
spewing warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=711178

10 years agoFix warnings in a the actions test
Matthias Clasen [Sun, 24 Nov 2013 02:28:40 +0000 (21:28 -0500)]
Fix warnings in a the actions test

The actions test tests the GSimpleActionGroup API. Maybe this
should be moved to use GActionMap, but for now, just disable
the deprecations.

There was also one test that wasn't actually hooked up, so
do that as well.

10 years agoFix array API inconsistency
Matthias Clasen [Sun, 24 Nov 2013 02:10:06 +0000 (21:10 -0500)]
Fix array API inconsistency

g_array_remove_range and g_byte_array_remove_range return
a pointer to the array, g_ptr_array_remove_range returns
void. Since it is pretty harmless, make it return the array
too.

https://bugzilla.gnome.org/show_bug.cgi?id=159528

10 years agoFix the stack direction check again
Matthias Clasen [Sun, 24 Nov 2013 02:09:32 +0000 (21:09 -0500)]
Fix the stack direction check again

Turns out I got it wrong.

10 years agoImprove stack direction detection
Matthias Clasen [Sun, 24 Nov 2013 01:24:49 +0000 (20:24 -0500)]
Improve stack direction detection

When the function in the test program is inlined, all bets are
off whether the detection will work correctly or not. Make it
harder for the compiler to play games on us by making the
function recursive.

https://bugzilla.gnome.org/show_bug.cgi?id=307947

10 years agoFix the configure check for growing stack
Matthias Clasen [Sun, 24 Nov 2013 01:12:13 +0000 (20:12 -0500)]
Fix the configure check for growing stack

The check was getting the direction wrong, as proven by the
just committed signal invocation hint test.

https://bugzilla.gnome.org/show_bug.cgi?id=711871

10 years agoAdd a test for g_signal_get_invocation_hint
Matthias Clasen [Sun, 24 Nov 2013 01:06:07 +0000 (20:06 -0500)]
Add a test for g_signal_get_invocation_hint

This is the sole piece of code in GLib where we make use of the
stack growing direction. And this test proves that we have been
getting the direction wrong all these years...

10 years agoapplication: Use printerr for runtime errors
Christian Persch [Thu, 24 May 2012 17:18:44 +0000 (19:18 +0200)]
application: Use printerr for runtime errors

g_critical can be fatal (with --g-fatal-warnings, or some env var set),
so don't use it to print out runtime errors.

Bug #676761.

10 years agoFix desktop-app-info test
Matthias Clasen [Sat, 23 Nov 2013 23:15:04 +0000 (18:15 -0500)]
Fix desktop-app-info test

The recent change to the search scoring algorithm made
nautilus and konqueror switch places in the search results.
Update the test to reflect that.

10 years agogtestdbus: Properly close server connections
Stef Walter [Sat, 9 Nov 2013 19:18:34 +0000 (20:18 +0100)]
gtestdbus: Properly close server connections

Otherwise g_test_dbus_down() following a g_test_dbus_stop()
will hang until it times out.

https://bugzilla.gnome.org/show_bug.cgi?id=711807

10 years agoAdd a test for notify emission ordering
Matthias Clasen [Sat, 23 Nov 2013 21:58:51 +0000 (16:58 -0500)]
Add a test for notify emission ordering

This tests the ordering that was just documented.
See

https://bugzilla.gnome.org/show_bug.cgi?id=607016

10 years agoDocument details of GObject::notify
Matthias Clasen [Sat, 23 Nov 2013 21:44:31 +0000 (16:44 -0500)]
Document details of GObject::notify

The signals queued while notify is frozen are emitted in
reverse order, while omitting duplicates. The lack of documentation
for this was pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=607016

10 years agogdbus-connection: Fix race condition in test
Stef Walter [Sat, 9 Nov 2013 08:25:02 +0000 (09:25 +0100)]
gdbus-connection: Fix race condition in test

The test was expecting that the spawned process wouldn't start
up before the NameOwnerChanged signal was subscribed.

https://bugzilla.gnome.org/show_bug.cgi?id=711805

10 years agoAdd basic test for the GNotification gtk backend
Lars Uebernickel [Tue, 29 Oct 2013 07:01:38 +0000 (00:01 -0700)]
Add basic test for the GNotification gtk backend

https://bugzilla.gnome.org/show_bug.cgi?id=711051

10 years agogtestdbus: Don't destroy GSource twice
Stef Walter [Sat, 9 Nov 2013 19:17:49 +0000 (20:17 +0100)]
gtestdbus: Don't destroy GSource twice

https://bugzilla.gnome.org/show_bug.cgi?id=711806

10 years agoGObject: Introspection annotations for enums
Gergely POLONKAI [Wed, 18 Sep 2013 11:01:00 +0000 (11:01 +0000)]
GObject: Introspection annotations for enums

This commit adds a few missing annotations to g_enum and
g_flags functions.

https://bugzilla.gnome.org/show_bug.cgi?id=708274

10 years agoGSettings: More docs for deprecated _list_schemas()
Bastien Nocera [Thu, 14 Nov 2013 16:39:06 +0000 (17:39 +0100)]
GSettings: More docs for deprecated _list_schemas()

Most _list_schemas() uses were to check for the availability
of a particular schema. g_settings_schema_source_lookup() is
a better way to do this.

https://bugzilla.gnome.org/show_bug.cgi?id=712315

10 years agoGVariantBuilder: small documentation fixes
Matthias Clasen [Sat, 23 Nov 2013 18:16:06 +0000 (13:16 -0500)]
GVariantBuilder: small documentation fixes

The examples for g_variant_builder_add and
g_variant_builder_add_parsed were leaking a heap-allocated
builder. Fix that by converting the examples to stack
allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=697585
https://bugzilla.gnome.org/show_bug.cgi?id=703522

10 years agoCLOEXEC fix for older FreeBSDs and OS X.
Andrew Walton [Tue, 12 Nov 2013 21:04:49 +0000 (13:04 -0800)]
CLOEXEC fix for older FreeBSDs and OS X.

Some older POSIX-flavored operating systems may not have adopted
O_CLOEXEC yet.

See https://bugzilla.gnome.org/show_bug.cgi?id=712136.

10 years agoSmall documentation clarification
Matthias Clasen [Sat, 23 Nov 2013 15:49:00 +0000 (10:49 -0500)]
Small documentation clarification

https://bugzilla.gnome.org/show_bug.cgi?id=671557

10 years agogiomodule: Allow overriding source directory gio modules are loaded from
Stef Walter [Fri, 8 Nov 2013 13:26:33 +0000 (14:26 +0100)]
giomodule: Allow overriding source directory gio modules are loaded from

When testing (and valgrinding) we need to have a known set of modules
loaded.

https://bugzilla.gnome.org/show_bug.cgi?id=711801

10 years agoglib-tap.mk: fix to actually use the TAP driver
Dan Winship [Sun, 10 Nov 2013 18:27:15 +0000 (13:27 -0500)]
glib-tap.mk: fix to actually use the TAP driver

The Makefile rules in glib-tap.mk were copied from an example that
assumed that all the test programs had names ending in ".test", so
they didn't actually have any effect for us and resulted in us still
using the standard automake test driver. Fix this so we actually do
use TAP now.

https://bugzilla.gnome.org/show_bug.cgi?id=711796

10 years agogio/tests: fix output of gdbus-proxy-threads and gdbus-threading
Dan Winship [Sun, 10 Nov 2013 18:26:01 +0000 (13:26 -0500)]
gio/tests: fix output of gdbus-proxy-threads and gdbus-threading

Make gdbus-proxy-threads and gdbus-threading print a newline at the
end of their progress strings, to avoid messing up their TAP-format
output.

https://bugzilla.gnome.org/show_bug.cgi?id=711796

10 years agogio/tests: basic-application is a helper program, not a test
Dan Winship [Sun, 10 Nov 2013 18:25:45 +0000 (13:25 -0500)]
gio/tests: basic-application is a helper program, not a test

https://bugzilla.gnome.org/show_bug.cgi?id=711796

10 years agogtestutils: add "options" to g_test_init(), make option-argv0 use gtester
Dan Winship [Sun, 10 Nov 2013 18:23:15 +0000 (13:23 -0500)]
gtestutils: add "options" to g_test_init(), make option-argv0 use gtester

Declare that the previously-unused "..." argument to g_test_init() is
actually a NULL-terminated list of strings indicating testing options,
and add an option "no_g_set_prgname", which keeps g_test_init() from
calling g_set_prgname(). Then we can port glib/tests/option-argv0 to
use gtester, by passing that option.

https://bugzilla.gnome.org/show_bug.cgi?id=711796

10 years agoglib/tests/include: port to gtester
Dan Winship [Sun, 10 Nov 2013 18:22:46 +0000 (13:22 -0500)]
glib/tests/include: port to gtester

https://bugzilla.gnome.org/show_bug.cgi?id=711796

10 years agoAdd some mainloop instrumentation
Matthias Clasen [Sat, 23 Nov 2013 05:22:09 +0000 (00:22 -0500)]
Add some mainloop instrumentation

Add trace points around adding, removing and dispatching of
sources.

https://bugzilla.gnome.org/show_bug.cgi?id=710741

10 years agobuilding: Document C90 and POSIX requirements
Dan Winship [Wed, 20 Nov 2013 14:41:13 +0000 (09:41 -0500)]
building: Document C90 and POSIX requirements

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agobuilding: belated docs update: GNU make is required, not recommended
Dan Winship [Wed, 20 Nov 2013 14:31:20 +0000 (09:31 -0500)]
building: belated docs update: GNU make is required, not recommended

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoReplace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX
Dan Winship [Sat, 19 Oct 2013 17:04:00 +0000 (13:04 -0400)]
Replace #ifdef HAVE_UNISTD_H checks with #ifdef G_OS_UNIX

In Windows development environments that have it, <unistd.h> is mostly
just a wrapper around several other native headers (in particular,
<io.h>, which contains read(), close(), etc, and <process.h>, which
contains getpid()). But given that some Windows dev environments don't
have <unistd.h>, everything that uses those functions on Windows
already needed to include the correct Windows header as well, and so
there is never any point to including <unistd.h> on Windows.

Also, remove some <unistd.h> includes (and a few others) that were
unnecessary even on unix.

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoRequire POSIX.1 (1990) compliance on unix
Dan Winship [Sat, 19 Oct 2013 17:03:59 +0000 (13:03 -0400)]
Require POSIX.1 (1990) compliance on unix

Assume unix platforms support the original POSIX.1 standard.
Specifically, assume that if G_OS_UNIX, then we have chown(),
getcwd(), getgrgid(), getpwuid(), link(), <grp.h>, <pwd.h>,
<sys/types.h>, <sys/uio.h>, <sys/wait.h>, and <unistd.h>.

Additionally, since all versions of Windows that we care about also
have <sys/types.h>, we can remove HAVE_SYS_TYPES_H checks everywhere.

Also remove one include of <sys/times.h>, and the corresponding
configure check, since the include is not currently needed (and may
always have just been a typo for <sys/time.h>).

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoRequire C90 compliance
Dan Winship [Sat, 19 Oct 2013 17:03:58 +0000 (13:03 -0400)]
Require C90 compliance

Assume all supported platforms implement C90, and therefore they
(correctly) implement atexit(), memmove(), setlocale(), strerror(),
and vprintf(), and have <float.h> and <limits.h>.

(Also remove the configure check testing that "do ... while (0)" works
correctly; the non-do/while-based version of G_STMT_START and
G_STMT_END was removed years ago, but the check remained. Also, remove
some checks that configure.ac claimed were needed for libcharset, but
aren't actually used.)

Note that removing the g_memmove() function is not an ABI break even
on systems where g_memmove() was previously not a macro, because it
was never marked GLIB_AVAILABLE_IN_ALL or listed in glib.symbols, so
it would have been glib-internal since 2004.

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoRemove alleged support for last-millennium Unixes
Dan Winship [Sat, 19 Oct 2013 17:03:56 +0000 (13:03 -0400)]
Remove alleged support for last-millennium Unixes

Remove workarounds for NeXTStep (last released in 1995), SunOS (1994),
HP-UX 9.x (1992) and 10.x (1995), OSF/1 / Digital UNIX / Tru64 UNIX
4.x (1999), and AIX 4.x (1999).

HP-UX 11 implements dlopen(), so dropping support for earlier versions
also lets us remove the HP-UX-specific gmodule-dld.

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoRemove alleged support for BeOS
Dan Winship [Sat, 19 Oct 2013 17:03:55 +0000 (13:03 -0400)]
Remove alleged support for BeOS

Since the initial addition of BeOS support in 1999, there has only
been one update to it (in 2005, and it wasn't even very big). GLib is
known to not currently build on Haiku (or presumably actual BeOS)
without additional patching, and the fact that there isn't a single
G_OS_BEOS check in gio/ is suspicious.

Additionally, other than the GModule implementation, all of the
existing G_OS_BEOS checks are either (a) "G_OS_UNIX || G_OS_BEOS", or
(b) random minor POSIXy tweaks (include this header file rather than
that one, etc), suggesting that if we were going to support Haiku, it
would probably be simpler to treat it as a special kind of G_OS_UNIX
(as we do with Mac OS X) rather than as its own completely different
thing.

So, kill G_OS_BEOS.

https://bugzilla.gnome.org/show_bug.cgi?id=710519

10 years agoRemove alleged support for OS/2
Dan Winship [Sat, 19 Oct 2013 17:03:46 +0000 (13:03 -0400)]
Remove alleged support for OS/2

In particular, remove the OS/2 GModule implementation (which AFAICT
was never actually built even on OS/2).

https://bugzilla.gnome.org/show_bug.cgi?id=710519

11 years agogbacktrace: Print out gdb exec errors correctly
Stef Walter [Tue, 29 Oct 2013 17:03:29 +0000 (18:03 +0100)]
gbacktrace: Print out gdb exec errors correctly

We want to see error messages related to starting and running
gdb (such as if it's not installed).

https://bugzilla.gnome.org/show_bug.cgi?id=711088

11 years agobuild: Give internal libraries higher precedence
Michael Haubenwallner [Thu, 14 Nov 2013 15:22:10 +0000 (16:22 +0100)]
build: Give internal libraries higher precedence

Linking local libraries too late may cause preinstalled libraries to
get found earlier, due to external library paths in .la files.

https://bugzilla.gnome.org/show_bug.cgi?id=712314

11 years agogmessages: Add g_info macro for G_LOG_LEVEL_INFO
Stef Walter [Tue, 29 Oct 2013 20:30:06 +0000 (21:30 +0100)]
gmessages: Add g_info macro for G_LOG_LEVEL_INFO

For completeness. Although less used than others, projects want
to use this, and end up having to define it awkwardly themselves.

https://bugzilla.gnome.org/show_bug.cgi?id=711103

11 years agoGSocketClient: For _CONNECTING event, make remote address accessible
Colin Walters [Mon, 18 Nov 2013 21:15:34 +0000 (16:15 -0500)]
GSocketClient: For _CONNECTING event, make remote address accessible

My application (hotssh) would like to get the resolved address from DNS,
before we start the connect().

We could add a new event, but it's easy enough to just cache it on the
GSocketConnection; this avoids any new API.

https://bugzilla.gnome.org/show_bug.cgi?id=712547

11 years agoAIX splice() is something different
Michael Haubenwallner [Thu, 14 Nov 2013 15:16:59 +0000 (16:16 +0100)]
AIX splice() is something different

AIX does provide the splice() symbol, but this does have different
signature and usecase than what Linux may provide.

https://bugzilla.gnome.org/show_bug.cgi?id=712314

11 years agoUse AC_HEADER_MAJOR
Michael Haubenwallner [Thu, 14 Nov 2013 15:12:02 +0000 (16:12 +0100)]
Use AC_HEADER_MAJOR

Instead of checking for sys/mkdev.h headerfile, there is the
AC_HEADER_MAJOR helper for how to get major(), minor(), makedev().

https://bugzilla.gnome.org/show_bug.cgi?id=712314

11 years agogsettings.m4: @GSETTINGS_RULES@: Support srcdir != builddir with nonrecursive make
Colin Walters [Tue, 12 Nov 2013 18:41:47 +0000 (13:41 -0500)]
gsettings.m4: @GSETTINGS_RULES@: Support srcdir != builddir with nonrecursive make

In hotssh I use nonrecursive make.  gnome-continuous uses srcdir !=
builddir by default.  @GSETTINGS_RULES@ will then attempt to touch a
nonexistent path.

This patch fixes that.

https://bugzilla.gnome.org/show_bug.cgi?id=712171

11 years agoGDummyTlsBackend: cache the GDummyTlsDatabase
Dan Winship [Sun, 17 Nov 2013 14:45:20 +0000 (09:45 -0500)]
GDummyTlsBackend: cache the GDummyTlsDatabase

The default GTlsDatabase is supposed to be a singleton (and libsoup
has tests that will fail if it's not).

11 years agogobject: Box GMappedFile
Ray Strode [Fri, 15 Nov 2013 19:47:09 +0000 (14:47 -0500)]
gobject: Box GMappedFile

GMappedFile is current unintrospectable, because it's not a registered
box type.  It already has reference counting functions, so there's
little reason not to box it.

This commit adds GMappedFile to the hoard of other boxes types handled
by gboxed.c

https://bugzilla.gnome.org/show_bug.cgi?id=712393

11 years agoFix GSettings testcase again
Ryan Lortie [Fri, 15 Nov 2013 20:23:43 +0000 (15:23 -0500)]
Fix GSettings testcase again

Hopefully this one will work for both srcdir == builddir and not.

11 years agogstrfuncs: Mention nullability in g_ascii_strcasecmp() documentation
Philip Withnall [Thu, 14 Nov 2013 18:06:32 +0000 (18:06 +0000)]
gstrfuncs: Mention nullability in g_ascii_strcasecmp() documentation

Like strcmp(), g_ascii_strcasecmp() requires that both of its parameters
be non-%NULL.

11 years agogdesktopappinfo: Rank Keywords matches higher than GenericName
Florian Müllner [Thu, 7 Nov 2013 22:41:21 +0000 (23:41 +0100)]
gdesktopappinfo: Rank Keywords matches higher than GenericName

It makes sense to match on GenericName in case an application does
not provide any keywords, but the Keywords field has been added
to explicitly support the search case, while GenericName was used
to be displayed in menus, so it makes more sense to consider
Keywords more (or equally) relevant for search.

https://bugzilla.gnome.org/show_bug.cgi?id=711640

11 years agobump version
Ryan Lortie [Tue, 12 Nov 2013 05:19:50 +0000 (00:19 -0500)]
bump version

11 years agoGLib 2.39.1 2.39.1
Ryan Lortie [Tue, 12 Nov 2013 04:09:11 +0000 (23:09 -0500)]
GLib 2.39.1

11 years agoRevert "gdbus-connection-loss: Fix leak in test"
Ryan Lortie [Tue, 12 Nov 2013 04:11:55 +0000 (23:11 -0500)]
Revert "gdbus-connection-loss: Fix leak in test"

This reverts commit 670379b26f4a86c7b51b928eb0332b9a654e4c4c.

This is causing distcheck to fail and will have to be revisited later.

11 years agogsettings test: fix srcdir != builddir
Ryan Lortie [Tue, 12 Nov 2013 04:17:32 +0000 (23:17 -0500)]
gsettings test: fix srcdir != builddir

Just copy the schemas to the builddir and compile them in place instead
of trying to mess around with creating the compiled file in a different
dir.  This solves issues in the summary/description testcase when
GSettings expects the usual situation of having the .xml files present
in the same directory.

11 years agogsubprocess: Fix a number of leaks and a segfault
Stef Walter [Sat, 9 Nov 2013 07:51:41 +0000 (08:51 +0100)]
gsubprocess: Fix a number of leaks and a segfault

Fixed a number of leaks in gsubprocess, as well as a segfault
that was hidden by never calling g_subprocess_communicate_state_free().

https://bugzilla.gnome.org/show_bug.cgi?id=711803

11 years agothreadpool-test: Fix leaks in tests
Stef Walter [Sat, 9 Nov 2013 19:53:32 +0000 (20:53 +0100)]
threadpool-test: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711751

11 years agomainloop-test: Fix uninitialized memory access in tests
Stef Walter [Sat, 9 Nov 2013 19:26:31 +0000 (20:26 +0100)]
mainloop-test: Fix uninitialized memory access in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711751

11 years agoRevert "giomodule: Fix leaks in module loading"
Stef Walter [Thu, 7 Nov 2013 21:56:11 +0000 (22:56 +0100)]
Revert "giomodule: Fix leaks in module loading"

This reverts commit dc72039c162e1ca6400f28f92dd8e090ce99bd3f.

This depends on a patch that allows GTypeModule to be finalized.
Lets put this back in bugzilla until that gets in.

11 years agoRevert "defaultiface: Fix leak in test"
Stef Walter [Mon, 11 Nov 2013 14:27:24 +0000 (15:27 +0100)]
Revert "defaultiface: Fix leak in test"

This reverts commit fd7b2faa64febab407ffde2506c995544583a9d5.

This required another patch to be commited first. Will put this
back in bugzilla.

11 years agoglib/tests/: Avoid GCCisms and fix tests for MSVC
Chun-wei Fan [Wed, 6 Nov 2013 08:35:21 +0000 (16:35 +0800)]
glib/tests/: Avoid GCCisms and fix tests for MSVC

Skip the tests on inf/nan strings for the gvariant and strfuncs tests, and
skip the hex strings for the strtod tests in strfuncs as they are C99
features that are not yet supported by Visual C++ (even 2013).  Use a
definition for NAN and INFINITY (that is also used in PyGObject) as
atof("NaN") and atof("Infinity") simply returns 0.0 (which is not a NAN)
in Visual C++ to fix the tests running there.

Also adapt to the format of g_ascii_formatd() when dealing with 1e99.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agoTests: Fix up the expected messages
Chun-wei Fan [Wed, 6 Nov 2013 08:58:00 +0000 (16:58 +0800)]
Tests: Fix up the expected messages

There was an expected messages that was not in the form that GLib on
Windows actually produces, which causes some test to fail.  Fix this up.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agotests: Fix for non-GCC
Chun-wei Fan [Wed, 6 Nov 2013 08:45:12 +0000 (16:45 +0800)]
tests: Fix for non-GCC

Remove uses of using empty arrays in initialization and structs, and build
tests that rely on GCCisms on GCC only.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agoglib/tests/spawn-singlethread: Improve test for Windows
Chun-wei Fan [Wed, 6 Nov 2013 07:14:06 +0000 (15:14 +0800)]
glib/tests/spawn-singlethread: Improve test for Windows

Use a Windows-style .bat script for the test_spawn_script() test, at least
when the code is built with Visual C++ (due to differences in how scripts
are written for shells and Windows cmd.exe), and account for Windows-style
line endings for that test too.

Let the MinGW builds (which are normally done in an MSYS BASH-style shell) continue to use the
*NIX-style script for that test.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agogio/tests/gsubprocess.c: Fix on Windows
Chun-wei Fan [Tue, 5 Nov 2013 09:33:09 +0000 (17:33 +0800)]
gio/tests/gsubprocess.c: Fix on Windows

We need to check for the correct line endings on Windows (\r\n) for the
echo tests and currently need to skip the test_echo_eof test there, as
it depends on the cat utility that is not normally found on Windows, and
using an external installation of cat via MSYS or Cygwin would render the
test program to hang as cat waits for user input.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agotests/: Include unistd.h on *NIX only
Chun-wei Fan [Tue, 5 Nov 2013 08:08:45 +0000 (16:08 +0800)]
tests/: Include unistd.h on *NIX only

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agoglib/gspawn-win32-helper.c: Clean up a bit
Chun-wei Fan [Tue, 5 Nov 2013 07:51:08 +0000 (15:51 +0800)]
glib/gspawn-win32-helper.c: Clean up a bit

Remove the parts about storing up the fd's in a data structure, but call
close() on the fd's.  However, retain the _get_osfhandle() check on the
fd's when we iterate through the fd's as on fd values in the iteration may
well be invalid fd's.  As a result, the invalid parameter handler is still
needed for newer Microsoft CRTs (8.0/2005+) for _get_osfhandle() to
make sure that the program does not abort when we check the validity of
fd's to be closed in the loop[1].

[1]: http://msdn.microsoft.com/en-us/library/ks2530z6%28v=vs.80%29.aspx

11 years agotests/: Avoid closing invalid fd's
Chun-wei Fan [Tue, 5 Nov 2013 04:58:40 +0000 (12:58 +0800)]
tests/: Avoid closing invalid fd's

...and only include unistd.h when we are on *NIX.

Newer Visual C++ runtimes (8.0/2005 and later) will cause the program to
crash with an internal abort() call when they detect instances of close()
being called on an invalid fd, such as when the fd is -1, and these should
be purged anyways.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agoglib/gmessages.h: Unify log messages
Chun-wei Fan [Tue, 5 Nov 2013 04:45:38 +0000 (12:45 +0800)]
glib/gmessages.h: Unify log messages

...Under various compilers when !G_DISABLE_CHECKS.  Previously, the
messages that are logged differ depending whether GLib was built with GCC
or not.  To simplify test cases, make all builds use a single output format
for g_return_if_fail(), g_return_val_if_fail(), g_return_if_reached(), and
g_return_val_if_reached(), by using the GCC-style format and replaceing
__PRETTY_FUNCTION__ with G_STRFUNC, so that it will work across various
compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=711047

11 years agogcancellable: don't use g_cancellable_connect() in GCancellableSource
Dan Winship [Sat, 2 Nov 2013 13:33:26 +0000 (09:33 -0400)]
gcancellable: don't use g_cancellable_connect() in GCancellableSource

g_cancellable_connect() is documented as calling its callback only
once, but GCancellableSource should trigger every time the cancellable
is cancelled.

https://bugzilla.gnome.org/show_bug.cgi?id=710691
https://bugzilla.gnome.org/show_bug.cgi?id=711286

11 years agoUpdated Tamil Translations
Shantha kumar [Mon, 11 Nov 2013 08:50:40 +0000 (14:20 +0530)]
Updated Tamil Translations

11 years agogdbus-connection-loss: Fix leak in test
Stef Walter [Sat, 9 Nov 2013 19:28:28 +0000 (20:28 +0100)]
gdbus-connection-loss: Fix leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogdbus-introspection: Fix leaks in tests
Stef Walter [Sat, 9 Nov 2013 19:23:15 +0000 (20:23 +0100)]
gdbus-introspection: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agoprivate: Use threading primitives correctly in private test
Stef Walter [Thu, 7 Nov 2013 21:40:40 +0000 (22:40 +0100)]
private: Use threading primitives correctly in private test

We shouldn't be clearing statically allocated mutexes, and also
don't use deprecated heap-allocated GPrivate.

https://bugzilla.gnome.org/show_bug.cgi?id=711755

11 years agotimeloop: Fix leaks in tests
Stef Walter [Sat, 9 Nov 2013 19:52:16 +0000 (20:52 +0100)]
timeloop: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711751

11 years agofile-test: Fix leaks in test
Stef Walter [Sat, 9 Nov 2013 19:29:56 +0000 (20:29 +0100)]
file-test: Fix leaks in test

https://bugzilla.gnome.org/show_bug.cgi?id=711751

11 years agogthreadpool: Don't pass bad data to GThreadPool sorter
Stef Walter [Sat, 9 Nov 2013 23:15:30 +0000 (00:15 +0100)]
gthreadpool: Don't pass bad data to GThreadPool sorter

This causes sorters to crash.

https://bugzilla.gnome.org/show_bug.cgi?id=711756

11 years agogmain: Fix use of uninitialized memory in sigaction structure
Stef Walter [Thu, 31 Oct 2013 10:43:14 +0000 (11:43 +0100)]
gmain: Fix use of uninitialized memory in sigaction structure

https://bugzilla.gnome.org/show_bug.cgi?id=711754

11 years agodefaultiface: Fix leak in test
Stef Walter [Sun, 10 Nov 2013 14:58:06 +0000 (15:58 +0100)]
defaultiface: Fix leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agotimeloop-closure: Fix leaks in test
Stef Walter [Sun, 10 Nov 2013 14:57:12 +0000 (15:57 +0100)]
timeloop-closure: Fix leaks in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agosignals: Fix leak in test
Stef Walter [Sun, 10 Nov 2013 14:56:59 +0000 (15:56 +0100)]
signals: Fix leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agoparamspec-test: Fix leaks in tests
Stef Walter [Sun, 10 Nov 2013 14:56:32 +0000 (15:56 +0100)]
paramspec-test: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agooverride: Fix leaks in test
Stef Walter [Sun, 10 Nov 2013 14:56:17 +0000 (15:56 +0100)]
override: Fix leaks in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agogvalue-test: Fix leaks in test
Stef Walter [Sun, 10 Nov 2013 14:55:56 +0000 (15:55 +0100)]
gvalue-test: Fix leaks in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agoaccumulator: Fix leak in test
Stef Walter [Sun, 10 Nov 2013 14:55:35 +0000 (15:55 +0100)]
accumulator: Fix leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agothreadtests: Fix leaks in tests
Stef Walter [Thu, 7 Nov 2013 21:57:27 +0000 (22:57 +0100)]
threadtests: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agoenums: Fix leaks in tests
Stef Walter [Thu, 7 Nov 2013 21:57:13 +0000 (22:57 +0100)]
enums: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711779

11 years agogiomodule: Fix leaks in module loading
Stef Walter [Thu, 7 Nov 2013 22:00:28 +0000 (23:00 +0100)]
giomodule: Fix leaks in module loading

https://bugzilla.gnome.org/show_bug.cgi?id=711798

11 years agoboxed: Fix double free in boxed unit tests
Stef Walter [Sun, 10 Nov 2013 13:48:36 +0000 (14:48 +0100)]
boxed: Fix double free in boxed unit tests

https://bugzilla.gnome.org/show_bug.cgi?id=711782

11 years agogdbus-connection: Fix leaks in tests
Stef Walter [Sat, 9 Nov 2013 19:21:44 +0000 (20:21 +0100)]
gdbus-connection: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogdbus-connection-slow: Fix leak in tests
Stef Walter [Sat, 9 Nov 2013 19:21:16 +0000 (20:21 +0100)]
gdbus-connection-slow: Fix leak in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogdbus-connection: Fix use after free in test
Stef Walter [Sat, 9 Nov 2013 19:28:41 +0000 (20:28 +0100)]
gdbus-connection: Fix use after free in test

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogsubprocess: Fix leaks in tests
Stef Walter [Sat, 9 Nov 2013 07:54:28 +0000 (08:54 +0100)]
gsubprocess: Fix leaks in tests

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogsubprocess: Fix error detection logic in tests
Stef Walter [Sat, 9 Nov 2013 07:53:13 +0000 (08:53 +0100)]
gsubprocess: Fix error detection logic in tests

Various tests were depending on local_error being set by a callback
when it could never have been the case. Simplify async error detection
logic in those cases, and fix leak of GError.

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agog-icon: Fix memory leak in test
Stef Walter [Fri, 8 Nov 2013 13:28:55 +0000 (14:28 +0100)]
g-icon: Fix memory leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agocontexts: Fix memory leak in test
Stef Walter [Fri, 8 Nov 2013 13:28:23 +0000 (14:28 +0100)]
contexts: Fix memory leak in test

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agodata-output-stream: Fix some access after free
Stef Walter [Sun, 10 Nov 2013 15:39:45 +0000 (16:39 +0100)]
data-output-stream: Fix some access after free

The memory pointed to by a GMemoryOutputStream can be realloc'd

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agobuffered-output-stream: Fix some access after free
Stef Walter [Sun, 10 Nov 2013 15:39:28 +0000 (16:39 +0100)]
buffered-output-stream: Fix some access after free

The memory pointed to by a GMemoryOutputStream can be realloc'd

https://bugzilla.gnome.org/show_bug.cgi?id=711802

11 years agogtestdbus: Fix leak of GMainLoop
Stef Walter [Sat, 9 Nov 2013 19:19:44 +0000 (20:19 +0100)]
gtestdbus: Fix leak of GMainLoop

https://bugzilla.gnome.org/show_bug.cgi?id=711808

11 years agomodule-test: Fix leaks in test
Stef Walter [Sun, 10 Nov 2013 09:54:47 +0000 (10:54 +0100)]
module-test: Fix leaks in test

https://bugzilla.gnome.org/show_bug.cgi?id=711768

11 years agoutils: Don't free memory owned by glib in test
Stef Walter [Sun, 10 Nov 2013 13:32:17 +0000 (14:32 +0100)]
utils: Don't free memory owned by glib in test

https://bugzilla.gnome.org/show_bug.cgi?id=711775