platform/upstream/glib.git
11 years agoUpdated Uyghur translation
Gheyret Kenji [Fri, 22 Feb 2013 13:52:26 +0000 (22:52 +0900)]
Updated Uyghur translation

Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
11 years agogsignal: improve warning output
Ryan Lortie [Thu, 21 Feb 2013 11:25:26 +0000 (11:25 +0000)]
gsignal: improve warning output

When looking up signals by name (to connect, for example) and the named
signal cannot be found on the given instance, report the type of the
instance.

This is quite a lot more useful as a diagnostic message than only a
memory address.

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

11 years agosignals: Ensure we ref handler in emission fast path
Alexander Larsson [Thu, 21 Feb 2013 15:10:36 +0000 (16:10 +0100)]
signals: Ensure we ref handler in emission fast path

We need to keep a reference to the handler in the fast path, just like
in the slow path, otherwise if another thread disconnects the handler
we may destroy the closure while we're using it without the lock held.

We also move the freeing of the instance to after the emission is totally
done as the handler_unref_R (and the tracepoint) reference it.

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

11 years agosignals: No need to use atomics for Handler refcount
Alexander Larsson [Thu, 21 Feb 2013 15:06:24 +0000 (16:06 +0100)]
signals: No need to use atomics for Handler refcount

handler_ref and handler_unref_R are always called with the signal
lock held. This is obvious for handler_unref_R as it even sometimes
drops this lock, and can be verified quickly for handler_ref by looking
at all call sites.

This improves the performace about 6% on the emit-handled and the
emit-handled-generic tests.

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

11 years agoGApplication: document IS_SERVICE timeout properly
Ryan Lortie [Thu, 21 Feb 2013 14:58:32 +0000 (14:58 +0000)]
GApplication: document IS_SERVICE timeout properly

The documentation was suggesting that using G_APPLICATION_IS_SERVICE
would automatically set an inactivity timeout (ie: app stays around for
a while after the use count drops to zero).

In reality, it only adds an initial 10 second wait for the first
activation message to arrive after which it uses the normal inactivity
timeout mechanism.

11 years agothreads: don't do rlimit test when running as root
Ryan Lortie [Thu, 21 Feb 2013 10:19:27 +0000 (10:19 +0000)]
threads: don't do rlimit test when running as root

Linux CAP_SYS_RESOURCE overrides RLIMIT_NPROC so we probably shouldn't
test thread creation failure when running the test as root...

11 years agoGNetworkMonitorBase: implement can_reach_async
Dan Winship [Tue, 19 Feb 2013 21:12:30 +0000 (16:12 -0500)]
GNetworkMonitorBase: implement can_reach_async

Implement the g_network_monitor_can_reach_async() rather than falling
back to the default implementation, which calls the sync version (not
in a thread).

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

11 years agog_network_monitor_base_can_reach: Check for default route after enumerating.
Matthew Barnes [Tue, 19 Feb 2013 16:18:11 +0000 (11:18 -0500)]
g_network_monitor_base_can_reach: Check for default route after enumerating.

Enumerate the GSocketConnectable before checking for a default route.
For some connectable types this will involve a DNS lookup.  This will
elminate false positives for hosts behind a VPN since DNS lookup will
fail if the VPN is not connected.

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

11 years agoGNetworkAddress: drop cached addresses on resolver reload
Dan Winship [Tue, 19 Feb 2013 20:19:22 +0000 (15:19 -0500)]
GNetworkAddress: drop cached addresses on resolver reload

If the resolver reloads (ie, if /etc/resolv.conf changes),
GNetworkAddress needs to re-resolve its addresses the next time it's
enumerated. Otherwise hosts that have different IP addresses inside
and outside a VPN won't work correctly if you hold on to a
GNetworkAddress for them for a long time.

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

11 years agogutils: stop g_get_home_dir() from reading passwd
Ryan Lortie [Mon, 4 Feb 2013 13:41:25 +0000 (14:41 +0100)]
gutils: stop g_get_home_dir() from reading passwd

In the case that the "HOME" environment variable is set (as it is under
normal circumstances), we don't really need to be opening /etc/passwd.

For historical reasons (ie: how we used to ignore $HOME) and due to the
grouping of many unrelated things together (reading username, hostname,
home directory, tmpdir, etc.) into one function we were still opening
/etc/passwd in g_get_home_dir(), even if $HOME was set.

Since earlier commits removed code from it, all that remains in
g_get_any_init_do() is the logic for dealing with $HOME and reading the
password database.

We now split the logic to deal with $HOME into g_get_home_dir().  With
only the password database functionality remaining, g_get_any_init_do()
is renamed to g_get_user_database_entry() and modified not to set global
variables but rather return a struct.  If g_get_home_dir() cannot find
$HOME, it falls back to calling g_get_user_database_entry() and using
the home directory from there.

Use of the 'g_utils_global' lock is further reduced by using
g_once_init_enter() to protect the critical sections in each of
g_get_user_database_entry() and g_get_home_dir().

Finally, the g_get_user_name() and g_get_real_name() functions are
modified to use the new regime.

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

11 years agogutils: replace direct references to g_home_dir
Ryan Lortie [Mon, 4 Feb 2013 13:40:03 +0000 (14:40 +0100)]
gutils: replace direct references to g_home_dir

Some code was directly calling g_get_any_init() and then expecting to be
able to use the static 'g_home_dir' variable directly.  Change these
over to g_get_home_dir() instead.

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

11 years agogutils: split out g_get_tmp_dir()
Ryan Lortie [Mon, 4 Feb 2013 13:17:08 +0000 (14:17 +0100)]
gutils: split out g_get_tmp_dir()

Remove the code for getting the tmpdir from g_get_any_init_do() and
outside of the g_utils_global lock.

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

11 years agogutils: split out g_get_host_name()
Ryan Lortie [Mon, 4 Feb 2013 12:49:06 +0000 (13:49 +0100)]
gutils: split out g_get_host_name()

Remove the code for getting the hostname from g_get_any_init_do() and
outside of the g_utils_global lock.

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

11 years agowin32: Drop old codepage ABI from gutils.c
Ryan Lortie [Mon, 4 Feb 2013 13:04:05 +0000 (14:04 +0100)]
win32: Drop old codepage ABI from gutils.c

This is a source-compatible change and only breaks ABI with respect to
truly ancient binaries (and those binaries are already broken for other
reasons).

Back in the day, functions like g_get_user_name() used to return strings
in the system codepage instead of utf8 (as they do today).

It was decided at some point to change these functions to return utf8,
breaking source compatibility but keeping ABI compatibility.  This was
done by exporting new symbols with names like g_get_user_name_utf8() and
using a #define of the old name over to the new name (so that newly
compiled code would link against the _utf8 version, but old binaries
would continue to use the non-utf8 variant).

Meanwhile, glib has undergone several ABI breaks on Windows since, so
those old binaries don't work anymore.

Start to clean up this mess by removing the #define renaming.  New
binaries calling g_get_user_name() will now link against
g_get_user_name() and it will return utf8.

We must keep the functions like g_get_user_name_utf8() for binary
compatibility with recently built programs (ie: ones built with the
renaming).  Nobody should have ever been calling these directly and of
course they can return utf8, so just add them as internal wrappers in the
.c file and declare them _GLIB_EXTERN there.

One day, if we feel like breaking Windows ABI again, we can finish the
cleanup by dropping the wrappers.  There is some talk of introducing
something like 'ABI compatible for two years' and this change would be
compatible with such a regime.

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

11 years agoGOutputStream: Remove unused SpliceUserData struct
Mike Ruprecht [Mon, 18 Feb 2013 13:56:05 +0000 (07:56 -0600)]
GOutputStream: Remove unused SpliceUserData struct

11 years agoUpdate Visual Studio property sheets
Chun-wei Fan [Tue, 19 Feb 2013 10:26:30 +0000 (18:26 +0800)]
Update Visual Studio property sheets

"install" gio/gsimpleproxyresolver.h...

11 years ago*bump*
Ryan Lortie [Tue, 19 Feb 2013 10:06:55 +0000 (10:06 +0000)]
*bump*

11 years agoGLib 2.35.8 2.35.8 upstream/2.35.8
Ryan Lortie [Tue, 19 Feb 2013 09:29:28 +0000 (09:29 +0000)]
GLib 2.35.8

11 years agoUpdated Serbian translation
Мирослав Николић [Mon, 18 Feb 2013 09:43:49 +0000 (10:43 +0100)]
Updated Serbian translation

11 years agoUpdated Serbian translation
Мирослав Николић [Mon, 18 Feb 2013 09:38:38 +0000 (10:38 +0100)]
Updated Serbian translation

11 years agoGNetworkAddress: Build if AI_NUMERICSERV not defined
Alexander Larsson [Mon, 18 Feb 2013 09:30:29 +0000 (10:30 +0100)]
GNetworkAddress: Build if AI_NUMERICSERV not defined

This is not defined on all Win32 SDKs and in some unixes.
If its not defined its safe to just ignore it though.

11 years agoUpdated Polish translation
Piotr Drąg [Sun, 17 Feb 2013 15:49:40 +0000 (16:49 +0100)]
Updated Polish translation

11 years agoGSimpleProxyResolver: add missing include
Dan Winship [Sun, 17 Feb 2013 14:54:11 +0000 (09:54 -0500)]
GSimpleProxyResolver: add missing include

string.h was getting pulled in by something else on Linux, but not
elsewhere

11 years agoGSocketClient: add missing NULL to g_object_set() call
Dan Winship [Fri, 15 Feb 2013 15:39:19 +0000 (10:39 -0500)]
GSocketClient: add missing NULL to g_object_set() call

11 years agodocs/reference/glib/cross.xml: Fix typo: yes/np -> yes/no
Thomas Perl [Sat, 9 Feb 2013 23:16:49 +0000 (00:16 +0100)]
docs/reference/glib/cross.xml: Fix typo: yes/np -> yes/no

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

11 years agognetworkaddress: preserve IPv6 scope ID in IP literals
Dan Winship [Wed, 12 Dec 2012 15:12:09 +0000 (16:12 +0100)]
gnetworkaddress: preserve IPv6 scope ID in IP literals

If a GNetworkAddress is created with a hostname like "fe80::xxx%em1",
make sure that the scope_id corresponding to "em1" is present in the
GSocketAddresses it returns when used as a GSocketConnectable.

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

11 years agoGSimpleProxyResolver: fix for the case where the default proxy is NULL
Dan Winship [Thu, 14 Feb 2013 23:06:41 +0000 (18:06 -0500)]
GSimpleProxyResolver: fix for the case where the default proxy is NULL

11 years agoUpdated POTFILES.in
Piotr Drąg [Fri, 15 Feb 2013 12:45:35 +0000 (13:45 +0100)]
Updated POTFILES.in

11 years agoMore doc fixes
Jasper St. Pierre [Fri, 15 Feb 2013 10:39:20 +0000 (05:39 -0500)]
More doc fixes

11 years agogmenumodel: Fix documentation
Jasper St. Pierre [Fri, 15 Feb 2013 10:35:05 +0000 (05:35 -0500)]
gmenumodel: Fix documentation

11 years agoGSimpleProxyResolver: new simple GProxyResolver class
Dan Winship [Sat, 26 Jan 2013 14:54:03 +0000 (09:54 -0500)]
GSimpleProxyResolver: new simple GProxyResolver class

Add GSimpleProxyResolver, for letting people do static proxy
resolution, and to use as a base class for other resolvers (such as
GProxyResolverGnome).

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

11 years agoGSocketClient: add proxy-resolver property
Dan Winship [Sun, 27 Jan 2013 18:53:36 +0000 (13:53 -0500)]
GSocketClient: add proxy-resolver property

Add a proxy-resolver property to GSocketClient, to allow overriding
proxy resolution in situations where you need to force a particular
proxy rather than using the system defaults.

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

11 years agog_dbus_address_escape_value: add
Simon McVittie [Wed, 13 Feb 2013 20:42:58 +0000 (20:42 +0000)]
g_dbus_address_escape_value: add

This is a GLib reimplementation of dbus_address_escape_value().
It's useful if you want to construct a D-Bus address from pieces:
for instance, if you have a listening Unix socket whose path is known,
and you want to connect a D-Bus peer to it.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=693673
Reviewed-by: Colin Walters <walters@verbum.org>
[amended to add Since: 2.36 as per review]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
11 years agogio: Fix annotations on g_[async_]initable_new() and friends
Stef Walter [Wed, 13 Feb 2013 06:20:43 +0000 (07:20 +0100)]
gio: Fix annotations on g_[async_]initable_new() and friends

These return a GObject even though in C it's represented as a gpointer

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

11 years agoFix the build on Solaris
Matthias Clasen [Sun, 10 Feb 2013 16:42:58 +0000 (11:42 -0500)]
Fix the build on Solaris

Make the btrfs support explicitly linux-only, as that is what it
is. With this, there's no need anymore to check for sys/ioctl.h
either.
https://bugzilla.gnome.org/show_bug.cgi?id=692829

11 years agogdbusobjectmanagerclient: always connect to proxy's 'g-signal'
Aleksander Morgado [Thu, 7 Feb 2013 09:54:24 +0000 (10:54 +0100)]
gdbusobjectmanagerclient: always connect to proxy's 'g-signal'

If we don't connect to the control proxy's 'g-signal' signal, we won't have
'object-added' or 'object-removed' signals. So, connect to the 'g-signal' not
only when there already is a name-owner, but always.

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

11 years agoUpdated Dutch translation
Wouter Bolsterlee [Sat, 9 Feb 2013 16:50:16 +0000 (17:50 +0100)]
Updated Dutch translation

11 years agoUpdated Dutch translation
Rachid [Sat, 9 Feb 2013 16:41:59 +0000 (17:41 +0100)]
Updated Dutch translation

11 years agotests: comment out asserts in dynamic type tests
Ryan Lortie [Thu, 7 Feb 2013 19:05:28 +0000 (14:05 -0500)]
tests: comment out asserts in dynamic type tests

We have some testcases that assert that type modules are unloaded after
the last reference on them is dropped.  Comment out those asserts now
that we turned the last unref into a no-op.

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

11 years agodisable support for unloading of dynamic types
Ryan Lortie [Thu, 7 Feb 2013 18:50:16 +0000 (13:50 -0500)]
disable support for unloading of dynamic types

Experimentally disable the ability to unload dynamic types by refusing
to drop the last reference on types (effectively turning the type
unloading into dead code).

The plan is to leave things like this for a stable cycle and only
proceed with removing the code if we are sure that there are no
unforeseen problems.

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

11 years agobuild: fix configure arpa/nameser.h test for Solaris
Dan Winship [Thu, 7 Feb 2013 13:41:00 +0000 (08:41 -0500)]
build: fix configure arpa/nameser.h test for Solaris

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

11 years agoUpdated Galician translations
Fran Diéguez [Wed, 6 Feb 2013 17:20:41 +0000 (18:20 +0100)]
Updated Galician translations

11 years agoGLib 2.35.7 2.35.7 upstream/2.35.7
Ryan Lortie [Tue, 5 Feb 2013 17:48:37 +0000 (18:48 +0100)]
GLib 2.35.7

11 years ago[l10n] Updated Italian translation.
Milo Casagrande [Tue, 5 Feb 2013 18:22:03 +0000 (19:22 +0100)]
[l10n] Updated Italian translation.

11 years agoMake G_IO_FLAG_IS_WRITEABLE and enum value
Matthias Clasen [Tue, 5 Feb 2013 03:46:24 +0000 (22:46 -0500)]
Make G_IO_FLAG_IS_WRITEABLE and enum value

Having it as a define was causing some problems for bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=657045

11 years agodocs: Add 2 missing :
Matthias Clasen [Tue, 5 Feb 2013 03:35:29 +0000 (22:35 -0500)]
docs: Add 2 missing :

The file attribute names go by namespace::keyname, not
namespace:keyname.

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

11 years agoconfigure: fix check for atomic operations
Andoni Morales Alastruey [Sat, 10 Nov 2012 15:27:56 +0000 (16:27 +0100)]
configure: fix check for atomic operations

Some compilers have support for atomic operations, but do not
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4. Instead of checking
for this define, we check for __sync_bool_compare_and_swap and
define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 if the compiler doesn't
define it.

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

11 years agoCompile private test with -pthread on UNIX
Víctor Manuel Jáquez Leal [Sun, 3 Feb 2013 18:52:58 +0000 (19:52 +0100)]
Compile private test with -pthread on UNIX

The commit f5f151cb removed this linkage, which is needed,
at least for the toolchain gcc version 4.7.2 (Debian 4.7.2-5)

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

11 years agoPost-release version bump
Matthias Clasen [Sun, 3 Feb 2013 20:14:57 +0000 (15:14 -0500)]
Post-release version bump

11 years ago2.35.6 2.35.6
Matthias Clasen [Sun, 3 Feb 2013 19:25:09 +0000 (14:25 -0500)]
2.35.6

11 years agoDocument GIO_USE_FILE_MONITOR
Matthias Clasen [Sun, 3 Feb 2013 19:08:02 +0000 (14:08 -0500)]
Document GIO_USE_FILE_MONITOR

11 years agoFix a doc comment mismatch
Matthias Clasen [Sun, 3 Feb 2013 18:50:36 +0000 (13:50 -0500)]
Fix a doc comment mismatch

11 years agoTrivial doc comment formatting fix
Matthias Clasen [Sun, 3 Feb 2013 18:46:50 +0000 (13:46 -0500)]
Trivial doc comment formatting fix

11 years agoadd 2.36 index to gobject docs
Matthias Clasen [Sun, 3 Feb 2013 18:26:36 +0000 (13:26 -0500)]
add 2.36 index to gobject docs

11 years agoAdd 2.36 index to glib docs
Matthias Clasen [Sun, 3 Feb 2013 18:25:56 +0000 (13:25 -0500)]
Add 2.36 index to glib docs

11 years agoAdd a 2.36 index to gio docs
Matthias Clasen [Sun, 3 Feb 2013 18:24:59 +0000 (13:24 -0500)]
Add a 2.36 index to gio docs

11 years agoMinor doc build cleanups
Matthias Clasen [Sun, 3 Feb 2013 18:22:28 +0000 (13:22 -0500)]
Minor doc build cleanups

11 years agoMake GUnixFDSourceFunc show up in the docs
Matthias Clasen [Sun, 3 Feb 2013 18:17:59 +0000 (13:17 -0500)]
Make GUnixFDSourceFunc show up in the docs

11 years agoUse g_timeout_add_seconds for some long timeouts
Matthias Clasen [Sun, 3 Feb 2013 15:21:20 +0000 (10:21 -0500)]
Use g_timeout_add_seconds for some long timeouts

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

11 years agogmenumodel: add G_MENU_ATTRIBUTE_ACTION_NAMESPACE
Lars Uebernickel [Thu, 31 Jan 2013 10:44:32 +0000 (11:44 +0100)]
gmenumodel: add G_MENU_ATTRIBUTE_ACTION_NAMESPACE

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

11 years agogmenumodel: document G_MENU_{ATTRIBUTE,LINK}_*
Lars Uebernickel [Thu, 31 Jan 2013 10:35:49 +0000 (11:35 +0100)]
gmenumodel: document G_MENU_{ATTRIBUTE,LINK}_*

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

11 years agogmenuexporter: fix typo in docstring
Lars Uebernickel [Thu, 31 Jan 2013 10:03:14 +0000 (11:03 +0100)]
gmenuexporter: fix typo in docstring

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

11 years agoAvoid a portability problem in the checksum test
Matthias Clasen [Sun, 3 Feb 2013 14:50:48 +0000 (09:50 -0500)]
Avoid a portability problem in the checksum test

String literals are not guaranteed to work like this.
https://bugzilla.gnome.org/show_bug.cgi?id=570572

11 years agoFix deprecation note for g_static_mutex_free
Matthias Clasen [Sun, 3 Feb 2013 06:28:50 +0000 (01:28 -0500)]
Fix deprecation note for g_static_mutex_free

It should point at g_mutex_clear, not g_mutex_free.
https://bugzilla.gnome.org/show_bug.cgi?id=678223

11 years agoMake G_DISABLE_DEPRECATED work again for wholly deprecated headers
Matthias Clasen [Sun, 3 Feb 2013 06:11:02 +0000 (01:11 -0500)]
Make G_DISABLE_DEPRECATED work again for wholly deprecated headers

Patch by Milan Crha,

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

11 years agog_option_context_help: don't modify the input data
Dan Winship [Thu, 23 Aug 2012 16:39:26 +0000 (12:39 -0400)]
g_option_context_help: don't modify the input data

If there are options that need their names to be aliased, keep track
of that internally rather than modifying the passed-in GOptionGroup
(and leaking strings in the process).

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

11 years agoSilence automake
Matthias Clasen [Sun, 3 Feb 2013 03:54:15 +0000 (22:54 -0500)]
Silence automake

automake doesn't like INCLUDES anymore.

11 years agoLog errors the same way as messages
Matthias Clasen [Sat, 2 Feb 2013 21:53:45 +0000 (16:53 -0500)]
Log errors the same way as messages

This will make sense if we keep going past
the assertions that cause the error to be logged.

11 years agoSimplify glib/glib/tests setup
Matthias Clasen [Sat, 2 Feb 2013 21:26:17 +0000 (16:26 -0500)]
Simplify glib/glib/tests setup

The Makefile.am was setting a ton of unnecessary things

11 years agoMake the logging test more robust
Matthias Clasen [Sat, 2 Feb 2013 21:23:03 +0000 (16:23 -0500)]
Make the logging test more robust

The default handler test was not unsetting the log handler that
gets installed by GTest, which causes the log messages to be duplicated
on stdout if --verbose or --tap are passed. This in turn can make some
of the non-match checks fail. Since we are already using g_test_trap_fork,
we can just unset the handler in the child.

11 years agoUpdated Polish translation
Piotr Drąg [Sat, 2 Feb 2013 23:24:14 +0000 (00:24 +0100)]
Updated Polish translation

11 years agoUpdated Hebrew translation.
Yaron Shahrabani [Sat, 2 Feb 2013 09:23:56 +0000 (11:23 +0200)]
Updated Hebrew translation.

11 years agoTest for g_hash_table_insert() corrupting sets
Will Thompson [Tue, 29 Jan 2013 16:09:40 +0000 (16:09 +0000)]
Test for g_hash_table_insert() corrupting sets

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

11 years agohashtable: properly handle insert() de-set-ifying
Ryan Lortie [Wed, 30 Jan 2013 00:23:48 +0000 (01:23 +0100)]
hashtable: properly handle insert() de-set-ifying

GHashTable remains a set for as long as all of the keys are exactly
equal (in pointer value) to all of the values.  We check this by
comparing keys to values when we do inserts.

Unfortunately, when doing g_hash_table_insert() when a key is already in
the table, the old key pointer value is kept, but the new value pointer
is used.  Now we have a situation where a key pointer is unequal to a
value pointer, but we were not treating this case properly.

Fix that.

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

11 years agoFix gio tests makefile for W32
Руслан Ижбулатов [Sat, 19 Jan 2013 07:50:28 +0000 (11:50 +0400)]
Fix gio tests makefile for W32

While compiling, libtool will say that undefined symbols are not allowed, and
will refuse to make you a dll. This is only one line, easy to miss. And it
doesn't prevent `make' from completing successfully.

The code this patch adds is from other Makefile.am files that use
$(no_undefined). It's absence in gio is, most likely, an oversight.

Fixes #692058

11 years agoDon't try to find nfs mounts on Windows
Matthias Clasen [Sat, 2 Feb 2013 05:19:15 +0000 (00:19 -0500)]
Don't try to find nfs mounts on Windows

This should fix the build there.
https://bugzilla.gnome.org/show_bug.cgi?id=592211

11 years agogmain: equivocate a bit on _set_ready_time()
Ryan Lortie [Fri, 1 Feb 2013 03:56:23 +0000 (04:56 +0100)]
gmain: equivocate a bit on _set_ready_time()

Since this is a new API this cycle it's a good time to add a doc comment
explicitly declaring that a confusing issue that could be resolved
either way has no specific defined behaviour.

This may allow us some additional freedom in future GMainContext work or
we may decide that one behaviour is more desirable than the other.

11 years agogdbus: Don't output invalid nested <para> docbook tags
Stef Walter [Wed, 30 Jan 2013 10:13:38 +0000 (11:13 +0100)]
gdbus: Don't output invalid nested <para> docbook tags

Fix gdbus-codegen so it no longer outputs tags like
<para><para>Text</para></para>

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

11 years agogdbus: Don't output invalid empty <variablelist> tags
Stef Walter [Wed, 30 Jan 2013 10:07:52 +0000 (11:07 +0100)]
gdbus: Don't output invalid empty <variablelist> tags

Docbook doesn't allow an empty <variablelist> and so the docbook
output from gdbus-codegen is invalid when a method/signal has
no arguments.

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

11 years agoGInetSocketAddress: fix the byte order of flowinfo and scope_id
Dan Winship [Wed, 12 Dec 2012 15:00:26 +0000 (16:00 +0100)]
GInetSocketAddress: fix the byte order of flowinfo and scope_id

The flowinfo and scope_id fields of struct sockaddr_in6 are in host
byte order, but the code previously assumed they were in network byte
order. Fix that.

This is an ABI-breaking change (since before you would have had to use
g_ntohl() and g_htonl() with them to get the correct values, and now
that would give the wrong values), but the previous behavior was
clearly wrong, and no one ever reported it, so it is likely that no
one was actually using it.

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

11 years agogmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
Cosimo Cecchi [Wed, 30 Jan 2013 16:59:09 +0000 (17:59 +0100)]
gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT

Silence some warnings seen with GCC 4.8.

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Tue, 29 Jan 2013 18:36:58 +0000 (19:36 +0100)]
Updated Norwegian bokmål translation

11 years agoAdd g_close(), use it
Colin Walters [Fri, 25 Jan 2013 17:05:26 +0000 (12:05 -0500)]
Add g_close(), use it

There are two benefits to this:

1) We can centralize any operating system specific knowledge of
   close-vs-EINTR handling.  For example, while on Linux we should never
   retry, if someone cared enough later about HP-UX, they could come by
   and change this one spot.
2) For places that do care about the return value and want to provide
   the caller with a GError, this function makes it convenient to do so.

Note that gspawn.c had an incorrect EINTR loop-retry around close().

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

11 years agog_atomic_int_get, g_atomic_pointer_get: accept const arguments
Simon McVittie [Sat, 26 Jan 2013 17:37:33 +0000 (17:37 +0000)]
g_atomic_int_get, g_atomic_pointer_get: accept const arguments

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=692583

11 years agoUpdated Slovenian translation
Matej Urbančič [Sun, 27 Jan 2013 21:03:12 +0000 (22:03 +0100)]
Updated Slovenian translation

11 years agoGFile: Clean up file_copy_fallback to fix SEGV with btrfs
Colin Walters [Fri, 25 Jan 2013 15:40:45 +0000 (10:40 -0500)]
GFile: Clean up file_copy_fallback to fix SEGV with btrfs

Ok, this function was just an awful mess before.  Now the problem
domain is not trivial, and I won't claim this new code is *beautiful*,
but it should fix the bug at hand, and be somewhat less prone to
failure for the next person who tries to modify it.  There's only one
unref call for each object now.

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

11 years agoUpdated Lithuanian translation
Aurimas Černius [Sat, 26 Jan 2013 18:24:32 +0000 (20:24 +0200)]
Updated Lithuanian translation

11 years agogsequence: Fix g_sequence_lookup() return value documentation
Rui Matos [Sat, 26 Jan 2013 18:08:08 +0000 (19:08 +0100)]
gsequence: Fix g_sequence_lookup() return value documentation

Mention that we return NULL if the item we are looking up isn't
found.

11 years ago.gitignore updates
Dan Winship [Sat, 26 Jan 2013 15:09:33 +0000 (10:09 -0500)]
.gitignore updates

11 years agoPlug a small memleak in gdbus-export test
Matthias Clasen [Sat, 26 Jan 2013 01:09:26 +0000 (20:09 -0500)]
Plug a small memleak in gdbus-export test

11 years agogfile: Ensure we create internal pipe with FD_CLOEXEC
Colin Walters [Fri, 25 Jan 2013 17:32:39 +0000 (12:32 -0500)]
gfile: Ensure we create internal pipe with FD_CLOEXEC

That way the descriptors aren't leaked to child processes.

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

11 years agogwakeup: Fix uninitialized variable from previous commit
Colin Walters [Fri, 25 Jan 2013 17:06:04 +0000 (12:06 -0500)]
gwakeup: Fix uninitialized variable from previous commit

We really don't want to infloop here...

11 years agoHandle EINTR for a few more write() calls
Colin Walters [Wed, 29 Aug 2012 15:44:01 +0000 (11:44 -0400)]
Handle EINTR for a few more write() calls

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

11 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 25 Jan 2013 11:54:09 +0000 (12:54 +0100)]
Updated Spanish translation

11 years agogcontenttype: Duplicate the string inside Mutex lock for thread-safety
Akira TAGOH [Thu, 24 Jan 2013 03:33:39 +0000 (12:33 +0900)]
gcontenttype: Duplicate the string inside Mutex lock for thread-safety

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

11 years agoIncorrect string formatters, fixes #692229
Gil Forcada [Thu, 24 Jan 2013 23:17:18 +0000 (00:17 +0100)]
Incorrect string formatters, fixes #692229

11 years agoIgnore fstab entries that are bind mounts
Alexander Larsson [Wed, 23 Jan 2013 11:07:10 +0000 (12:07 +0100)]
Ignore fstab entries that are bind mounts

We don't show the bind mounts anyway, so it only leads to
problems when we show the fstab entries, like being unable
to mount them.

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

11 years agobuild: fix a srcdir != builddir problem with gnetworking.h
Dan Winship [Mon, 21 Jan 2013 16:25:26 +0000 (11:25 -0500)]
build: fix a srcdir != builddir problem with gnetworking.h

gio's glib-mkenums call needs to get gnetworking.h out of $(builddir),
not $(srcdir). Fix/simplify it by using $(filter) on $^ and letting
make find everything.

Also add -Wno-portability to AM_INIT_AUTOMAKE in configure.ac, so that
it doesn't warn about this (or about the gmake-specific features we
were already using in gio/tests/)

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

11 years agogtester: Use FD_CLOEXEC when creating pipes
Colin Walters [Wed, 23 Jan 2013 16:51:48 +0000 (11:51 -0500)]
gtester: Use FD_CLOEXEC when creating pipes

We were already unsetting the cloexec flag for the child later,
just not actually starting with it.

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

11 years agoGNetworkMonitorNetlink: make the netlink socket cloexec
Dan Winship [Tue, 22 Jan 2013 21:39:49 +0000 (16:39 -0500)]
GNetworkMonitorNetlink: make the netlink socket cloexec

Use the same code GSocket does, to try SOCK_CLOEXEC first, and then
fall back to FD_CLOEXEC if it fails. (And fix that code to not call
fcntl if SOCK_CLOEXEC worked.)

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