platform/upstream/glib.git
12 years agowin32: various fixes to test programs
Dan Winship [Sat, 10 Nov 2012 16:06:57 +0000 (11:06 -0500)]
win32: various fixes to test programs

Fix a few win32-specific bugs in various tests, and #ifdef out code
that is UNIX- or Linux-specific that wouldn't be expected to pass on
Windows.

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

12 years agowin32: misc warning fixes
Dan Winship [Sat, 10 Nov 2012 15:58:19 +0000 (10:58 -0500)]
win32: misc warning fixes

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

12 years agowin32: move some code into #ifdef G_OS_UNIX
Dan Winship [Sun, 11 Nov 2012 16:32:40 +0000 (11:32 -0500)]
win32: move some code into #ifdef G_OS_UNIX

Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

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

12 years agowin32: define _WIN32_WINNT globally
Dan Winship [Sat, 10 Nov 2012 15:54:43 +0000 (10:54 -0500)]
win32: define _WIN32_WINNT globally

Rather than defining _WIN32_WINNT only in a handful of files, define
it in config.h, like we do with _GNU_SOURCE.

(Also remove a "#define WIN32_LEAN_AND_MEAN" that isn't really all
that useful.)

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

12 years agowin32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()
Dan Winship [Sat, 10 Nov 2012 15:51:18 +0000 (10:51 -0500)]
win32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()

Rather than using "extern" declarations of these win32 functions
everywhere they're needed, just prototype them in glib-private.h.
(Which also fixes the fact that they weren't prototyped in the files
where they're defined.)

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

12 years agowin32: add gwin32compat.h, for utf8-renaming compatibility defines
Dan Winship [Thu, 15 Nov 2012 17:24:57 +0000 (12:24 -0500)]
win32: add gwin32compat.h, for utf8-renaming compatibility defines

To avoid -Wmissing-prototype warnings, we need to prototype both the
original and the _utf8 versions of all of the functions that have had
_utf8-renaming on Windows. But duplicating all the prototypes is ugly,
so rather than doing them "in-place", move them all to a new header
file just for that.

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

12 years agogsocket: fix joining/leaving multicast groups
Wim Taymans [Thu, 15 Nov 2012 10:37:20 +0000 (11:37 +0100)]
gsocket: fix joining/leaving multicast groups

Initialize the structure passed to setsockopt to 0 to avoid random
errors when joining or leaving a multicast group.

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

12 years agoRevert "gmain: Add private API to create Unix child watch that uses waitid()"
Michael Natterer [Thu, 15 Nov 2012 14:23:07 +0000 (15:23 +0100)]
Revert "gmain: Add private API to create Unix child watch that uses waitid()"

This reverts commit 93bf37ce1507380f74d4cb4cab6640fc7d2eb7d1.

12 years agoRevert "gio: Add private API to create win32 streams from fds"
Michael Natterer [Thu, 15 Nov 2012 14:22:52 +0000 (15:22 +0100)]
Revert "gio: Add private API to create win32 streams from fds"

This reverts commit 292de8cc5259eb66c40d9a74d85389650ef67747.

12 years agoRevert "gspawn: support creating pipes with O_CLOEXEC"
Michael Natterer [Thu, 15 Nov 2012 14:22:37 +0000 (15:22 +0100)]
Revert "gspawn: support creating pipes with O_CLOEXEC"

This reverts commit 2054ccad95cfdcf5eccd2ef6847c12039c9678e8.

12 years agogdbus: Fix some compiler warnings
Colin Walters [Thu, 15 Nov 2012 13:42:36 +0000 (08:42 -0500)]
gdbus: Fix some compiler warnings

Code appears to have been copy/pasted from a bit which used _object,
but I think it's clearer to always use the "self" parameter anyways.

12 years agoGFileMonitor: Add kqueue(3) support to GIO
Antoine Jacoutot [Wed, 14 Nov 2012 11:57:42 +0000 (12:57 +0100)]
GFileMonitor: Add kqueue(3) support to GIO

Written by Dmitry Matveev as part of GSoC 2011:
http://netbsd-soc.sourceforge.net/projects/kqueue4gio/

This brings native file monitoring support on systems supporting kqueue(3)
(all BSDs) and remove the need to rely on the unmaintained gamin software.
The backend adds GKqueueDirectoryMonitor and GKqueueFileMonitor.

Some parts rewritten by myself (to prevent needing a configuration file).
Helpful inputs from Colin Walters and Simon McVittie.

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

12 years agogspawn: support creating pipes with O_CLOEXEC
Ryan Lortie [Sat, 10 Nov 2012 18:16:29 +0000 (13:16 -0500)]
gspawn: support creating pipes with O_CLOEXEC

Add a new flag, G_SPAWN_CLOEXEC_PIPES, for creating the stdin/out/err
pipes with O_CLOEXEC (for the usual reasons).

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

12 years agogio: Add private API to create win32 streams from fds
Colin Walters [Tue, 22 May 2012 20:06:10 +0000 (16:06 -0400)]
gio: Add private API to create win32 streams from fds

This will be used by GSubprocess.

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

12 years agogmain: Add private API to create Unix child watch that uses waitid()
Colin Walters [Mon, 21 May 2012 21:09:06 +0000 (17:09 -0400)]
gmain: Add private API to create Unix child watch that uses waitid()

This avoids collecting the zombie child, which means that the PID
can't be reused.  This prevents possible race conditions that might
occur were one to send e.g. SIGTERM to a child.

This race condition has always existed due to the way we called
waitpid() for the app, but the window was widened when we moved the
waitpid() calls into a separate thread.

If waitid() isn't available, we return NULL, and consumers of this
private API (namely, GSubprocess) will need to handle that.

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

12 years agoRemove trailing spaces from expected GMarkup error messages
Simon McVittie [Tue, 13 Nov 2012 14:25:21 +0000 (14:25 +0000)]
Remove trailing spaces from expected GMarkup error messages

Commit 138f4c1 broke the relevant part of 'make check' by changing the
error messages away from the ones we previously expected. This commit
updates the expected output to catch up.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=688255
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
12 years agogmain: Handle case where source id overflows
Colin Walters [Thu, 8 Nov 2012 14:12:25 +0000 (09:12 -0500)]
gmain: Handle case where source id overflows

0 is not a valid source id, but for long-lived programs that rapidly
create/destroy sources, it's possible for the source id to overflow.
We should handle this, because the documentation implies we will.

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

12 years agogio/*: Fix spelling of determining
Paul Menzel [Sun, 11 Nov 2012 13:48:15 +0000 (14:48 +0100)]
gio/*: Fix spelling of determining

$ sed -i s,determing,determining,g gio/gdrive.c
$ sed -i s,determing,determining,g gio/gdbusprivate.c

http://www.merriam-webster.com/dictionary/determining

For some reason according to `git log --follow` the whole file was created during some translation update.

    commit c45b8135046790e13b0d486f605dc62c9a783b16
    Author: Timo Jyrinki <timo@debian.org>
    Date:   Mon Mar 12 11:02:04 2012 +0200

        Finnish translation update from http://l10n.laxstrom.name/wiki/Gnome_3.4 translation sprint

12 years agoRevert "Return correct value for g_socket_get_available_bytes() on Windows and OSX"
Dan Winship [Sun, 11 Nov 2012 19:14:04 +0000 (14:14 -0500)]
Revert "Return correct value for g_socket_get_available_bytes() on Windows and OSX"

This neither compiles nor does what it's supposed to on Windows.

This reverts commit 1e598600a16d885a3ca859fe951a5bdd198fd6e7.

12 years ago.gitignore: ignore .def files (win32 build)
Dan Winship [Sat, 10 Nov 2012 15:37:00 +0000 (10:37 -0500)]
.gitignore: ignore .def files (win32 build)

12 years agoAdd caching for the receiver addresses for g_socket_receive_from()
Sebastian Dröge [Fri, 9 Nov 2012 14:28:36 +0000 (15:28 +0100)]
Add caching for the receiver addresses for g_socket_receive_from()

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

12 years agoUpdated Serbian translation
Мирослав Николић [Sun, 11 Nov 2012 10:36:03 +0000 (11:36 +0100)]
Updated Serbian translation

12 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 10 Nov 2012 12:12:30 +0000 (14:12 +0200)]
Updated Lithuanian translation

12 years agoUpdated Galician translations
Fran Diéguez [Sat, 10 Nov 2012 09:56:26 +0000 (10:56 +0100)]
Updated Galician translations

12 years agoUpdated Slovenian translation
Matej Urbančič [Sat, 10 Nov 2012 07:58:41 +0000 (08:58 +0100)]
Updated Slovenian translation

12 years agoUpdated Slovenian translation
Matej Urbančič [Sat, 10 Nov 2012 07:56:38 +0000 (08:56 +0100)]
Updated Slovenian translation

12 years agoAdd an option to make glib-compile-resources use G_GNUC_INTERNAL
Matthias Clasen [Sat, 10 Nov 2012 03:14:39 +0000 (22:14 -0500)]
Add an option to make glib-compile-resources use G_GNUC_INTERNAL

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

12 years agoRemove trailing space from some translated strings
Matthias Clasen [Sat, 10 Nov 2012 03:12:57 +0000 (22:12 -0500)]
Remove trailing space from some translated strings

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

12 years agoAdd plural forms for some translations
Matthias Clasen [Sat, 10 Nov 2012 03:10:10 +0000 (22:10 -0500)]
Add plural forms for some translations

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

12 years agoReturn correct value for g_socket_get_available_bytes() on Windows and OSX
Sebastian Dröge [Wed, 24 Oct 2012 12:25:01 +0000 (14:25 +0200)]
Return correct value for g_socket_get_available_bytes() on Windows and OSX

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

12 years agoFix poll able streams for Darwin (and probably BSD)
John Ralls [Fri, 9 Nov 2012 17:22:19 +0000 (09:22 -0800)]
Fix poll able streams for Darwin (and probably BSD)

Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes.

That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.

12 years agoFix compile error about missing prototype
John Ralls [Thu, 8 Nov 2012 17:52:28 +0000 (09:52 -0800)]
Fix compile error about missing prototype

For g_nextstep_settings_backend_get_type()

12 years agogthreadedresolver: fix a bug in the GTask porting of lookup_records
Dan Winship [Fri, 9 Nov 2012 16:38:08 +0000 (11:38 -0500)]
gthreadedresolver: fix a bug in the GTask porting of lookup_records

We were passing the wrong destroy notify when returning the list of
records, so it would crash if it got called (ie, if you didn't call
g_resolver_lookup_records_finish()).

(Also fix s/targets/records/ throughout the records functions.)

12 years agoUse url encoding for trash fileinfo path as per freedesktop trash specification
Timothy Arceri [Fri, 9 Nov 2012 12:48:38 +0000 (23:48 +1100)]
Use url encoding for trash fileinfo path as per freedesktop trash specification

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

12 years agoGByteArray: Add missing transfer annotations
Martin Pitt [Fri, 9 Nov 2012 08:32:03 +0000 (09:32 +0100)]
GByteArray: Add missing transfer annotations

Make g_byte_array_new() and g_byte_array_new_take() introspectable by adding
missing transfer annotations to return value.

Covered by tests in PyGObject.

12 years agoGBytes: Add missing annotations
Martin Pitt [Fri, 9 Nov 2012 08:02:22 +0000 (09:02 +0100)]
GBytes: Add missing annotations

Annotate g_bytes_new*()'s data argument to be a guint8 array, as
introspection clients cannot deal with raw gconstpointers. This makes
GBytes' behaviour similar to GByteArray whose API already uses guint8.

Add missing transfer annotation to g_bytes_get_data() to make it
introspectable.

This is covered by test cases in PyGObject.

12 years agoBug 686185: GDateTime Transcoding fails on OSX
John Ralls [Thu, 8 Nov 2012 16:35:23 +0000 (08:35 -0800)]
Bug 686185: GDateTime Transcoding fails on OSX

Better fix than d5df0a10f. Thanks to Christian Persch for pointing this
out.

12 years agoCheck for PR_GET_NAME
Emmanuel Pacaud [Wed, 7 Nov 2012 08:58:45 +0000 (09:58 +0100)]
Check for PR_GET_NAME

PR_GET_NAME may not be defined when using an old kernel. Deal with it.

12 years agotests/buffered-input-stream: Fix size of parameter passed
Colin Walters [Tue, 6 Nov 2012 20:04:47 +0000 (15:04 -0500)]
tests/buffered-input-stream: Fix size of parameter passed

buffer-size is guint, but the public API is gsize for some reason.

Tested-By: gustavold@linux.vnet.ibm.com
https://bugzilla.gnome.org/show_bug.cgi?id=687801

12 years agoSkip test_non_utf8_printf() if EUC-JP is aliased to UTF-8
John Ralls [Thu, 18 Oct 2012 17:47:18 +0000 (10:47 -0700)]
Skip test_non_utf8_printf() if EUC-JP is aliased to UTF-8

See https://bugzilla.gnome.org/show_bug.cgi?id=686185
This skips the test on those systems, like Darwin, which provide the
ja_JP.eucjp locale but which glib doesn't know how to transcode and
aliases JIS to UTF-8.

12 years agoDon't call varargs open() through non-varargs type
Ryan Lortie [Mon, 5 Nov 2012 17:22:49 +0000 (12:22 -0500)]
Don't call varargs open() through non-varargs type

open() is probably defined varargs.  Casting a varargs function to an
equivalent non-varargs type and then calling it is undefined, but
gfileutils.c was doing exactly that.

Add some non-varargs wrappers to avoid the problem.

Problem reported by John Spencer.

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

12 years agobelated version bump
Ryan Lortie [Tue, 6 Nov 2012 12:41:13 +0000 (07:41 -0500)]
belated version bump

12 years agogtype: disallow adding interfaces after the fact
Ryan Lortie [Mon, 5 Nov 2012 16:07:16 +0000 (11:07 -0500)]
gtype: disallow adding interfaces after the fact

Add a check to prevent adding an interface to a class that has already
had its class_init done.

This is an incompatible change but it is suspected that there are not
many users of this functionality.  Two known exceptions are pygobject
(fixed in bug 686149) and our own testsuite (affected tests have been
temporarily disabled by this patch).

Once we confirm that nobody else is using this functionality we can
remove a rather large amount of code for dealing with this case.

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

12 years agoBox GPollFD to make it introspectable
Martin Pitt [Wed, 24 Oct 2012 14:30:37 +0000 (16:30 +0200)]
Box GPollFD to make it introspectable

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

12 years agoAdd a translator comment about 'KB'
Ryan Lortie [Mon, 5 Nov 2012 13:24:30 +0000 (08:24 -0500)]
Add a translator comment about 'KB'

The GLib units policy used to be that 'KB' means 1024 bytes, 'MB' means
1024 KB, 'GB' means 1024 MB, etc.

Those days are over, but we have a deprecated function that still works
that way.  It contains the string "KB", marked for translation, which
has been a source of confusion for translators on multiple occasions.

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

12 years agogio/gthreadedresolver.c: Fix non-UNIX build
Chun-wei Fan [Mon, 5 Nov 2012 09:22:38 +0000 (17:22 +0800)]
gio/gthreadedresolver.c: Fix non-UNIX build

Move the GError *error declaration up, as that variable is also used for
non-Unix builds.

12 years agoUpdated gujarati file
Sweta Kothari [Mon, 5 Nov 2012 06:03:04 +0000 (11:33 +0530)]
Updated gujarati file

12 years agoVisual C++ 2010 projects: Prepare support for VS2012
Chun-wei Fan [Mon, 5 Nov 2012 04:31:44 +0000 (12:31 +0800)]
Visual C++ 2010 projects: Prepare support for VS2012

Add the PlatformToolset tag to the project configs so that we can use add a
simple script later to the autotools files to copy the projects and change
the value (v100 -> v110) of that tag (and other simple changes) in order
that we can quickly provide and maintain support for Visual Studio 2012
with minimal effort.

Note that at the moment GLib does not yet support the API/SDK requirements
for Windows 8 Modern UI (formerly known as Metro), but this paves the very
initial step.

12 years agoAdd array length annotation to GSignalQuery param_types field
Simon Feltman [Sun, 4 Nov 2012 01:59:25 +0000 (18:59 -0700)]
Add array length annotation to GSignalQuery param_types field

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

12 years agoUpdated Slovak translation
Peter Mráz [Sat, 3 Nov 2012 15:53:48 +0000 (15:53 +0000)]
Updated Slovak translation

12 years agoUpdated Slovak translation
Peter Mráz [Sat, 3 Nov 2012 15:52:03 +0000 (15:52 +0000)]
Updated Slovak translation

12 years agoAnnotate g_filename_to_utf8()
Martin Pitt [Sat, 3 Nov 2012 12:52:29 +0000 (13:52 +0100)]
Annotate g_filename_to_utf8()

bytes_read and bytes_written are (out) arguments, and the return value must be
a byte array instead of utf8, as otherwise the function would only support
UTF-8 locales/file names.

12 years agoFix more warning-addition fallout
Simon McVittie [Fri, 2 Nov 2012 15:45:14 +0000 (15:45 +0000)]
Fix more warning-addition fallout

I'm normally a big fan of small atomic commits, but I also want to get
things done this afternoon...

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agoFix more void prototypes in tests
Simon McVittie [Fri, 2 Nov 2012 15:19:32 +0000 (15:19 +0000)]
Fix more void prototypes in tests

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agoPredeclare more things in tests
Simon McVittie [Fri, 2 Nov 2012 15:19:20 +0000 (15:19 +0000)]
Predeclare more things in tests

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agoBring back a couple of private-but-extern symbols
Simon McVittie [Fri, 2 Nov 2012 14:54:19 +0000 (14:54 +0000)]
Bring back a couple of private-but-extern symbols

These both existed in 2.34.1, but are not exposed in headers, and were
meant to be private. Making them static (in commit 84475e43) was
technically an ABI break, and in particular it causes abicheck.sh to fail.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
12 years agogtask: bump the max thread pool size up to 100 to avoid stalls/deadlocks
Dan Winship [Tue, 30 Oct 2012 19:10:40 +0000 (15:10 -0400)]
gtask: bump the max thread pool size up to 100 to avoid stalls/deadlocks

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686810 for now.
https://bugzilla.gnome.org/show_bug.cgi?id=687223 discusses a nicer
fix for later.

12 years agoUse the FreeBSD credentials-passing code on Debian GNU/kFreeBSD
Simon McVittie [Sun, 21 Oct 2012 22:38:31 +0000 (23:38 +0100)]
Use the FreeBSD credentials-passing code on Debian GNU/kFreeBSD

The __FreeBSD__ macro means we have both a FreeBSD kernel and FreeBSD
libc, which isn't the case on GNU/kFreeBSD (GNU libc and userland on
the FreeBSD kernel), so it predefines a different macro. The kernel
is what actually matters for credentials-passing, though.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Tested-by: Steven Chamberlain <steven@pyro.eu.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=649302
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581750
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631968
Reviewed-by: Dan Winship <danw@gnome.org>
12 years agoMerge waitpid() from g_spawn_sync into gmain()
Colin Walters [Mon, 29 Oct 2012 19:44:16 +0000 (15:44 -0400)]
Merge waitpid() from g_spawn_sync into gmain()

This is preparatory work for a future commit which will add a
"catchall" waitpid API.  If we don't synchronize here with the worker
thread, race conditions are possible.

This also ensures we have an error message if someone adds a child
watch for a nonexistent pid, etc.  Previously, we'd simply keep
calling waitpid() getting ECHILD, and ignoring it until the source was
removed. Now, we g_warning() and fire the source.

Thirdly, this ensures that the waitpid() call in gmain handles EINTR,
like the g_spawn_sync() one did.

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

12 years agotests: fix compiler warning in gvariant test
Tim-Philipp Müller [Fri, 2 Nov 2012 13:14:58 +0000 (13:14 +0000)]
tests: fix compiler warning in gvariant test

gvariant.c:3555:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

12 years agoconfigure: Enable set of standard -Werror=foo flags
Colin Walters [Thu, 1 Nov 2012 23:39:20 +0000 (19:39 -0400)]
configure: Enable set of standard -Werror=foo flags

We're not going to depend on gnome-common (I assume) so this patch
nicks the systemd macro to test for compiler flags, and uses it to set
a similar set of -Werror=foo as the gnome-common one does.

See https://bugzilla.gnome.org/show_bug.cgi?id=608953
See https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html

If we're going to be setting more strict compiler flags for GNOME, we
should really ensure GLib builds with them first, as it's kind of the
model citizen.

In particular, you can see several times that downstreams such as
Debian have come in and fixed -Wformat-security bugs.  We should never
let those get into tarballs, or even commits.

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

12 years agogdateparser: Delete unused debug print function
Colin Walters [Fri, 2 Nov 2012 00:10:46 +0000 (20:10 -0400)]
gdateparser: Delete unused debug print function

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

12 years agogdbusactiongroup: Add prototype for g_dbus_action_group_sync()
Colin Walters [Thu, 1 Nov 2012 23:43:02 +0000 (19:43 -0400)]
gdbusactiongroup: Add prototype for g_dbus_action_group_sync()

Even private functions that are actually called across compilation
units should have prototypes.  For g_dbus_action_group_sync(), create
one in gdbusactiongroup-private.h

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

12 years agotest-pipe-unix: Add missing include
Colin Walters [Thu, 1 Nov 2012 23:40:07 +0000 (19:40 -0400)]
test-pipe-unix: Add missing include

Fixes the build with -Werror=missing-prototypes.

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

12 years agogettext: Add missing include
Colin Walters [Thu, 1 Nov 2012 23:39:09 +0000 (19:39 -0400)]
gettext: Add missing include

Fixes the build with -Werror=missing-prototypes.

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

12 years agogcharset: Add header file for private API
Colin Walters [Thu, 1 Nov 2012 23:38:44 +0000 (19:38 -0400)]
gcharset: Add header file for private API

This fixes the build with -Werror=missing-prototypes.

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

12 years agogslice: Prototype G_ENABLE_DEBUG function that's part of ABI
Colin Walters [Thu, 1 Nov 2012 23:38:09 +0000 (19:38 -0400)]
gslice: Prototype G_ENABLE_DEBUG function that's part of ABI

Sadly, g_slice_debug_tree_statistics is conditionally part of the
public ABI.  We might as well make it conditionally part of the API as
well, even though this will require people actually using it to

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

12 years agog_check_setuid: Include glib-private.h
Colin Walters [Thu, 1 Nov 2012 23:37:57 +0000 (19:37 -0400)]
g_check_setuid: Include glib-private.h

Otherwise we fail to build with -Werror=missing-prototypes.

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

12 years agotests/1bitmutex: Hack to build with -Werror=missing-prototypes
Colin Walters [Thu, 1 Nov 2012 23:37:38 +0000 (19:37 -0400)]
tests/1bitmutex: Hack to build with -Werror=missing-prototypes

Admittedly, this could probably be better, but it builds.

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

12 years agoUse (void) for no parameters, not ()
Colin Walters [Thu, 1 Nov 2012 23:36:52 +0000 (19:36 -0400)]
Use (void) for no parameters, not ()

This ensures we build with -Werror=missing-parameter-type.

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

12 years agobuild: Prototype GType accessors for private classes
Colin Walters [Thu, 1 Nov 2012 23:36:15 +0000 (19:36 -0400)]
build: Prototype GType accessors for private classes

Otherwise we fail to build with -Werror=missing-prototypes.

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

12 years agobuild: Add missing "static" keyword where it should be used
Colin Walters [Thu, 1 Nov 2012 23:35:38 +0000 (19:35 -0400)]
build: Add missing "static" keyword where it should be used

Otherwise we fail to build with -Werror=missing-prototypes.

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

12 years agobuild: Ensure we #include header files for glib-genmarshal code
Colin Walters [Thu, 1 Nov 2012 23:36:41 +0000 (19:36 -0400)]
build: Ensure we #include header files for glib-genmarshal code

Otherwise we fail with -Werror=missing-prototypes.

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

12 years agobuild: Don't use C99 declarations
Colin Walters [Thu, 1 Nov 2012 23:40:41 +0000 (19:40 -0400)]
build: Don't use C99 declarations

Since GLib needs to compile with MSVC, we can't use them.  This fixes
compilation when using -Werror=declaration-after-statement.

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

12 years agoUse "Returns:" instead of the invalid "@returns" for annotating return values.
Robert Ancell [Wed, 31 Oct 2012 01:56:00 +0000 (14:56 +1300)]
Use "Returns:" instead of the invalid "@returns" for annotating return values.

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

12 years agotests/signals: Disable large enumeration value test that is failing on PPC64
Colin Walters [Thu, 25 Oct 2012 19:34:29 +0000 (15:34 -0400)]
tests/signals: Disable large enumeration value test that is failing on PPC64

Basically due to a combination of va_args semantics around
signed/unsigned ints, this test case fails on ppc64.  At the moment,
we have as yet to find any real-world consumer with such a large
enumeration value.

Unfortunately, the possible fixes for this are extremely invasive;
we would have to define a new enum API.

Given both of these facts, we believe it makes the most sense at the
current time to simply not test this. If we at a later time determine
there is such a real-world consumer, we can look at doing the
necessary fixes.

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

12 years agopo: Fix Makefile.in.in syntax
Rico Tzschichholz [Wed, 31 Oct 2012 12:14:06 +0000 (13:14 +0100)]
po: Fix Makefile.in.in syntax

Introduced by cff536c99ed22f83a09a1030c720f1555240390b

12 years agoGNetworkMonitor: add missing apostrophe to docstring
Will Thompson [Tue, 30 Oct 2012 17:16:33 +0000 (17:16 +0000)]
GNetworkMonitor: add missing apostrophe to docstring

12 years agoAdd annotations for g_filename_from_uri()
Vincent Untz [Tue, 27 Mar 2012 14:52:24 +0000 (16:52 +0200)]
Add annotations for g_filename_from_uri()

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

12 years agogmessages: fix minor typo in documentation
Aleksander Morgado [Tue, 30 Oct 2012 12:15:23 +0000 (13:15 +0100)]
gmessages: fix minor typo in documentation

12 years agoUpdated gujarati file
Sweta Kothari [Tue, 30 Oct 2012 10:51:42 +0000 (16:21 +0530)]
Updated gujarati file

12 years agogthread-posix: always use atomic pointer ops
Ryan Lortie [Mon, 29 Oct 2012 09:13:40 +0000 (10:13 +0100)]
gthread-posix: always use atomic pointer ops

On platforms where dependent loads can be reordered (alpha) and we have
exotic implementation of pthread_mutex_lock() it could be possible that
our implementation of g_mutex_lock() is unsafe.

Always use atomic operations to avoid this possibility.

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

12 years agog_dbus_connection_export_menu_model(): fix a crash
Ryan Lortie [Mon, 29 Oct 2012 08:09:49 +0000 (09:09 +0100)]
g_dbus_connection_export_menu_model(): fix a crash

Add some extra protection when 'preparing' a group that doesn't yet
contain any menus.  This can happen if you subscribe to a group that
doesn't yet exist.

It was possible to crash any application using
g_dbus_connection_export_menu_model() by requesting a non-existent
subscription group over the bus.

In practice this only happened in races -- where the proxy sees a group
that exists and queries it, but by the time it does, it's already gone.

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

12 years agogmain: Document constraints on waitpid
Paul Eggert [Mon, 29 Oct 2012 14:19:20 +0000 (10:19 -0400)]
gmain: Document constraints on waitpid

Applications that use glib should not invoke waitpid with a first
argument that is nonpositive, because when such a waitpid is run in
one thread and glib waits for a subprocess in another, there is a race
condition, and the former waitpid can reap a process that was intended
for the latter.  Mention this in the documentation for
g_child_watch_source_new, and in the diagnostic generated by
g_spawn_sync when its waitpid fails with errno equal to ECHILD.

Signed-off-by: Colin Walters <walters@verbum.org>
http://bugzilla.gnome.org/show_bug.cgi?id=687075

12 years agomkinstalldirs: Delete from version control
Colin Walters [Sun, 28 Oct 2012 13:46:35 +0000 (09:46 -0400)]
mkinstalldirs: Delete from version control

This is installed by automake.  By maintaining it in git, we create
merge conflicts as people build with different versions of automake.

Just use 'mkdir -p' instead in gettext.  Should be portable enough.

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

12 years agoREADME.in: Note undefined behavior with new g_type_init() -> ctor change
Colin Walters [Sat, 27 Oct 2012 16:28:14 +0000 (12:28 -0400)]
README.in: Note undefined behavior with new g_type_init() -> ctor change

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

12 years agogio/tests: Fix build with -Werror=format-security
Rico Tzschichholz [Sat, 27 Oct 2012 10:12:29 +0000 (12:12 +0200)]
gio/tests: Fix build with -Werror=format-security

12 years agogio/tests: Fix linker failure
Rico Tzschichholz [Sat, 27 Oct 2012 10:10:44 +0000 (12:10 +0200)]
gio/tests: Fix linker failure

Fixes 8c320d0c34ad5b3a31ac4f9024dba358a46ac725

12 years agogio: No need to specify SOURCES when name matches executable
Stef Walter [Fri, 26 Oct 2012 09:12:46 +0000 (11:12 +0200)]
gio: No need to specify SOURCES when name matches executable

Removes some of the duplication from Makefile.am

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

12 years agogio: Remove LDADD repetition from gio/tests Makefile
Stef Walter [Fri, 26 Oct 2012 08:42:17 +0000 (10:42 +0200)]
gio: Remove LDADD repetition from gio/tests Makefile

Using a global LDADD for the basic libraries to link.

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

12 years agogdbus: Allow GDBusObjectManagerClient to work on peer connections
Stef Walter [Fri, 26 Oct 2012 08:30:29 +0000 (10:30 +0200)]
gdbus: Allow GDBusObjectManagerClient to work on peer connections

Allow GDBusObjectManagerClient to work on peer to peer DBus
connections. Don't require that a unique bus name is available
for the object manager, if the owned bus name is NULL.

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

12 years agoFix typo in G_TEST_DBUS.
Matthew Barnes [Fri, 26 Oct 2012 17:20:29 +0000 (13:20 -0400)]
Fix typo in G_TEST_DBUS.

12 years agofile-info: catch thumbnail files in large directory as well
Cosimo Cecchi [Tue, 1 May 2012 02:39:57 +0000 (22:39 -0400)]
file-info: catch thumbnail files in large directory as well

When building the file attribute table info for local files, use
thumbnail paths in $XDG_CACHE_DIR/thumbnails/large in addition to
$XDG_CACHE_DIR/thumbnails/normal.

Failing to do this would cause an application that creates large
thumbnails by default to never find any value for
G_FILE_ATTRIBUTE_THUMBNAIL_PATH, with no
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED set, which might cause the
application to either think thumbnailing is still in progress, or
blindly requeue thumbnail operations in a loop.

Large thumbnails are generally preferred, so we now default to the path
of a large thumbnail (in case both are present).

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

12 years agog_unix_signal_source_new: Allow SIGUSR1 and SIGUSR2
Colin Walters [Thu, 25 Oct 2012 22:21:59 +0000 (18:21 -0400)]
g_unix_signal_source_new: Allow SIGUSR1 and SIGUSR2

These are user defined, it makes sense to allow watching them.  This
is needed to port gnome-session and gdm over.

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

12 years agoGIOChannel: Add missing annotations
Martin Pitt [Thu, 25 Oct 2012 12:55:30 +0000 (14:55 +0200)]
GIOChannel: Add missing annotations

The various read and write methods have several out arguments which were not
previously marked as such. Also, as GIOChannel supports binary data with a NULL
encoding, the buffers need to be uint8 arrays instead of utf8 strings.

12 years agoRevert "Box GPollFD to make it introspectable"
Martin Pitt [Thu, 25 Oct 2012 09:27:39 +0000 (11:27 +0200)]
Revert "Box GPollFD to make it introspectable"

This reverts commit 932f4250b88a50059330a9df8224feeab6b0ffd7.

This got pushed accidentally and has not been accepted yet. It's also not clear
whether we want this in the first place.

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

12 years agoBox GPollFD to make it introspectable
Martin Pitt [Wed, 24 Oct 2012 14:30:37 +0000 (16:30 +0200)]
Box GPollFD to make it introspectable

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

12 years agoGIOChannel: Add missing (allow-none) annotations
Martin Pitt [Thu, 25 Oct 2012 05:51:40 +0000 (07:51 +0200)]
GIOChannel: Add missing (allow-none) annotations

g_io_channel_set_line_term() and g_io_channel_set_encoding() can get NULL
arguments, mark them as such.

12 years agogvariant: Make g_variant_new_from_bytes() public
Colin Walters [Tue, 23 Oct 2012 14:11:33 +0000 (16:11 +0200)]
gvariant: Make g_variant_new_from_bytes() public

Now that GBytes has been made public, we should make
g_variant_new_from_bytes() public too.

Add g_variant_get_data_as_bytes() to match.

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

12 years agoRelease GLib 2.35.1 2.35.1
Ryan Lortie [Mon, 22 Oct 2012 20:20:47 +0000 (22:20 +0200)]
Release GLib 2.35.1