Commit Graph

13460 Commits

Author SHA1 Message Date
Colin Walters
27b19cee1b base64: Add tests for incremental decoding with very small block size
At the moment, sizes 1-3 are commented out since they fail, but
a future patch will fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=694843
2013-03-05 10:55:21 -05:00
Cosimo Cecchi
f641699299 desktopappinfo: check whether the specified executable is valid
Before declaring the desktop file as valid, make sure the referenced
application actually exists in path and the commandline is not
malformed.

https://bugzilla.gnome.org/show_bug.cgi?id=675333
2013-03-04 14:40:36 -05:00
Mario Blättermann
fd04d6860f [l10n] Updated German translation 2013-03-03 22:11:21 +01:00
Matthias Clasen
a9a6c4ae81 Update for 2.37.9 2013-03-02 09:30:41 -05:00
Nguyễn Thái Ngọc Duy
7be9de786a Updated Vietnamese translation 2013-03-02 20:42:13 +07:00
Nguyễn Thái Ngọc Duy
773297519e po/vi: import from Damned Lies 2013-03-02 20:37:35 +07:00
Matthias Clasen
14768e97f8 Make GList more robust
g_list_delete_link was silently ignoring a NULL link before
the last change. Make it do so again, since we've found callers
that rely on this.
2013-03-01 19:11:11 -05:00
Chao-Hsiung Liao
10630eed30 Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-03-01 22:23:13 +08:00
Rafael Ferreira
fe10e86471 Updated Brazilian Portuguese translation 2013-03-01 06:35:30 -03:00
Chun-wei Fan
c7996825ce Fix gspawn-win32-helper.c with newer Microsoft CRTs
The newer Microsoft CRTs (8.0/2005 and later) impose much stricter
(paranoid) checks on close() being doubly called and the use of
invalid file descriptors.  This makes the calls on the file descriptors
use more caution when using them and only call close() when necessary.

This also adds an (empty) invalid parameter handler* as required by the
newer Microsoft CRTs to prevent the system from aborting the process
when we are checking whether a file descriptor is valid.

[*]: http://msdn.microsoft.com/en-us/library/a9yf33zb.aspx

https://bugzilla.gnome.org/show_bug.cgi?id=693646
2013-03-01 16:12:37 +08:00
Chun-wei Fan
872d3634a7 Update config.h.win32.in
Add entry for __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, to better reflect the
entries of items in config.h.in.  We are not currently defining this here
as the pre-configured config.h.win32.in is primarily meant for Visual
Studio builds of GLib-the MinGW/GCC/Clang builds of GLib will normally
use the autotools builds, which should give the correct config.h entries
upon running ./configure.
2013-03-01 16:12:36 +08:00
Wylmer Wang
3f678afa05 Update Simplified Chinese translation 2013-02-28 21:07:02 +08:00
Colin Walters
156b14cde5 build: Add --disable-compile-warnings
Some (broken) toolchains for example trip up
-Werror=missing-prototypes in system headers.  This patch allows
people to skip the formerly hardcoded "baseline" warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=694757
2013-02-27 08:34:01 -05:00
Behdad Esfahbod
e3582c617c Minor 2013-02-25 23:08:43 -05:00
Behdad Esfahbod
547221b486 [win32] Fix atomic ops on mingw*
Bug 682896 - glib doesn't build on mingw32
2013-02-25 22:48:03 -05:00
Behdad Esfahbod
e1ccae8416 [win32] Add fallback implementations for gatomic.c on mingw32
Bug 682896 - glib doesn't build on mingw32
2013-02-25 22:11:30 -05:00
A S Alam
8efe198d2e Punjabi: Translation updated (aalam) 2013-02-26 07:18:28 +05:30
Matthias Clasen
921593b022 GList: be more robust
We can detect list corruption in some cases. The new test case
demonstrates a case where we can warn instead of silently corrupt
the list. This was pointed out by Steve Grubb.

Also, use the same auxiliary routine in all places where we unlink
a list element.
2013-02-24 22:56:35 +01:00
Dan Winship
6833267a07 gtestutils: fix two GLIB_AVAILABLE flags
g_test_expect_message() and g_test_assert_expected_messages() appeared
in 2.34
2013-02-24 15:02:57 +01:00
Ján Kyselica
cbd070d8b8 Updated Slovak translation 2013-02-22 22:27:10 +00:00
Gheyret Kenji
0a39acc057 Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-02-22 22:52:26 +09:00
Ryan Lortie
f5d40bd813 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
2013-02-22 00:54:50 +00:00
Alexander Larsson
aede774642 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
2013-02-21 16:54:44 +01:00
Alexander Larsson
3e274423ba 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
2013-02-21 16:54:44 +01:00
Ryan Lortie
5bbca5fa0c 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.
2013-02-21 14:59:53 +00:00
Ryan Lortie
ce0ff7c9da 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...
2013-02-21 10:19:27 +00:00
Dan Winship
9670d06a66 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
2013-02-20 07:33:58 -05:00
Matthew Barnes
4ca3d80ff3 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
2013-02-20 07:33:58 -05:00
Dan Winship
c6c1166566 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
2013-02-20 07:33:58 -05:00
Ryan Lortie
cfafad5aef 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
2013-02-20 11:09:30 +00:00
Ryan Lortie
167c73faf4 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
2013-02-20 11:09:29 +00:00
Ryan Lortie
9879c7f5fa 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
2013-02-20 11:09:29 +00:00
Ryan Lortie
3c9691f7f8 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
2013-02-20 11:09:29 +00:00
Ryan Lortie
8c42a663f8 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
2013-02-20 11:09:29 +00:00
Mike Ruprecht
b029135ed4 GOutputStream: Remove unused SpliceUserData struct 2013-02-19 08:47:45 -06:00
Chun-wei Fan
90f726f6b9 Update Visual Studio property sheets
"install" gio/gsimpleproxyresolver.h...
2013-02-19 18:26:30 +08:00
Ryan Lortie
d21699a272 *bump* 2013-02-19 10:06:55 +00:00
Ryan Lortie
766dec9670 GLib 2.35.8 2013-02-19 09:29:28 +00:00
Мирослав Николић
4e975bfc9e Updated Serbian translation 2013-02-18 10:43:49 +01:00
Мирослав Николић
7c3b4617cf Updated Serbian translation 2013-02-18 10:38:38 +01:00
Alexander Larsson
c910c3e7a3 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.
2013-02-18 10:30:29 +01:00
Piotr Drąg
d175fae8d5 Updated Polish translation 2013-02-17 16:49:40 +01:00
Dan Winship
4061a96cc1 GSimpleProxyResolver: add missing include
string.h was getting pulled in by something else on Linux, but not
elsewhere
2013-02-17 09:54:58 -05:00
Dan Winship
c78d0e9ac4 GSocketClient: add missing NULL to g_object_set() call 2013-02-15 10:39:19 -05:00
Thomas Perl
e4695bd6f5 docs/reference/glib/cross.xml: Fix typo: yes/np -> yes/no
https://bugzilla.gnome.org/show_bug.cgi?id=693502
2013-02-15 10:12:36 -05:00
Dan Winship
8a77f7bb18 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
2013-02-15 09:10:00 -05:00
Dan Winship
a44a3cc150 GSimpleProxyResolver: fix for the case where the default proxy is NULL 2013-02-15 09:03:48 -05:00
Piotr Drąg
afc0a72575 Updated POTFILES.in 2013-02-15 13:45:35 +01:00
Jasper St. Pierre
cb40853eae More doc fixes 2013-02-15 05:39:20 -05:00
Jasper St. Pierre
3522567519 gmenumodel: Fix documentation 2013-02-15 05:35:29 -05:00