Dan Winship [Tue, 25 Mar 2014 17:52:45 +0000 (13:52 -0400)]
gio: move Winsock error mapping to g_io_error_from_win32_error()
Rather than having special code in gsocket.c, handle Winsock errors
along with other Win32 errors in gioerror.c
Also, reference g_win32_error_message() from the
g_io_error_from_win32_error() docs, and update the
g_win32_error_message() docs to clarify that it works with Winsock
error codes too.
Dan Winship [Fri, 21 Mar 2014 20:57:56 +0000 (16:57 -0400)]
gio/tests/socket: Update to check the error code
Only treat IPv6 as unsupported if the attempt to create a socket
returns G_IO_ERROR_NOT_SUPPORTED: any other error is a bug.
Dan Winship [Fri, 21 Mar 2014 20:54:04 +0000 (16:54 -0400)]
gioerror: map some more values to G_IO_ERROR_NOT_SUPPORTED
Map EPROTONOSUPPORT, ESOCKTNOSUPPORT, EPFNOSUPPORT and EAFNOSUPPORT to
G_IO_ERROR_NOT_SUPPORTED in g_io_error_from_errno(). (GSocket's
socket_io_error_from_errno() already did this with the corresponding
Winsock errors.)
Also map EOPNOTSUPP, which on Linux is the same as ENOTSUP, but may
not be on other platforms.
Also, rewrite the EAGAIN/EWOULDBLOCK section to use the simpler idiom
used by EEXIST/ENOTEMPTY and (now) ENOTSUP/EOPNOTSUPP.
Inaki Larranaga Murgoitio [Sun, 30 Mar 2014 13:09:59 +0000 (15:09 +0200)]
Updated Basque language
Volker Sobek [Sun, 30 Mar 2014 00:01:17 +0000 (01:01 +0100)]
docs: Remove escaping '\' from literals
commit
35066ed6c6b51317f49069f2564c547aa309f9f1 replaced entities, but
escaped the replacement text also inside literals, which resulted in the
escaping '\' to also appear in the documentation.
https://bugzilla.gnome.org/show_bug.cgi?id=727320
Dan Winship [Tue, 25 Mar 2014 17:20:13 +0000 (13:20 -0400)]
Bump version to 2.41.0, add GLIB_VERSION_2_42, etc
Bastien Nocera [Sat, 22 Mar 2014 12:15:45 +0000 (13:15 +0100)]
gio: Add names to idles and timeouts
This isn't too useful for some of the "return result in idle"
functions, but it's better than nothing.
https://bugzilla.gnome.org/show_bug.cgi?id=726872
Volker Sobek [Wed, 26 Mar 2014 22:10:00 +0000 (23:10 +0100)]
GNotification: Some small documentation fixes
Use #GVariant instead of GVariant.
g_notification_add_button_with_target,
g_notification_set_default_action_and_target:
Replace 'format_string' with 'target_format'.
g_notification_set_default_action_and_target_value:
Remove paragraph that apparently had been accidentally copied from
g_notification_set_default_action_and_target.
https://bugzilla.gnome.org/show_bug.cgi?id=727123
Olivier Crête [Fri, 14 Mar 2014 21:46:38 +0000 (17:46 -0400)]
GSocket: ignore timed out state when not relevant
Do this by separating the timeout check from the other socket checks.
https://bugzilla.gnome.org/show_bug.cgi?id=726375
Dan Winship [Tue, 18 Mar 2014 13:56:23 +0000 (09:56 -0400)]
gio: fix two more g_task_return_error_if_cancelled() leaks
https://bugzilla.gnome.org/show_bug.cgi?id=726611
Olivier Crête [Tue, 18 Mar 2014 03:50:30 +0000 (23:50 -0400)]
socketclient: Fix leak
https://bugzilla.gnome.org/show_bug.cgi?id=726611
Petr Kovar [Sun, 23 Mar 2014 15:12:50 +0000 (16:12 +0100)]
Update Czech translation
Gábor Kelemen [Fri, 21 Mar 2014 21:34:26 +0000 (21:34 +0000)]
Updated Hungarian translation
Dan Winship [Sat, 1 Feb 2014 17:13:50 +0000 (18:13 +0100)]
gio/tests/socket: skip IPv6 tests on IPv6-less machines
https://bugzilla.gnome.org/show_bug.cgi?id=667468
Dan Winship [Thu, 20 Mar 2014 13:25:19 +0000 (09:25 -0400)]
Clarify expectations with error codes like G_IO_ERROR_FAILED
If an error code enumeration is expected to be extended in the future,
people shouldn't compare explicitly against its generic "FAILED" value.
https://bugzilla.gnome.org/show_bug.cgi?id=726775
Ask H. Larsen [Wed, 19 Mar 2014 20:47:30 +0000 (21:47 +0100)]
Updated Danish translation
Мирослав Николић [Tue, 18 Mar 2014 20:13:19 +0000 (21:13 +0100)]
Updated Serbian translation
Dan Winship [Mon, 17 Mar 2014 19:11:31 +0000 (15:11 -0400)]
gbinding: warn on failed value transformation
GBinding warned if g_value_transform() returned FALSE, but it didn't
warn if there was no transformation available at all. Fix that and
test it.
https://bugzilla.gnome.org/show_bug.cgi?id=726574
A S Alam [Mon, 17 Mar 2014 21:39:21 +0000 (16:39 -0500)]
update Punjabi Translation 17March2014: Alam
Ryan Lortie [Mon, 17 Mar 2014 21:18:47 +0000 (17:18 -0400)]
GLib 2.39.92
Claude Paroz [Sat, 15 Mar 2014 19:45:27 +0000 (19:45 +0000)]
Updated French translation
Ryan Lortie [Wed, 12 Mar 2014 01:41:36 +0000 (21:41 -0400)]
GSettingsBackend: fix a nasty race condition
In the event that a GSettings object is being destroyed just as a change
signal is being delivered, the destroying thread will race with the
dconf worker thread for acquiring the lock on the GSettingsBackend.
If the signalling thread gets there first then the destroying thread
will block on the lock. The signalling thread adds a reference to the
GSettings object that is being destroyed and releases the lock. The
idea is that this should prevent the GSettings object from being
destroyed and thus maintain its entry in the list. Unfortunately, the
weak reference notify function is already running and as soon as we
release the lock, the list entry is removed.
The signalling thread crashes.
This bug is indicative of a serious problem encountered in many
situations where GObject instances are touched from multiple threads.
Ideally, we will move to a place where g_object_ref() is not called at
all on the GSettings object from the dconf worker thread and instead, a
dispatch will be done without holding a reference (similar to how
GAppInfoMonitor presently works). This would also prevent the
unfortunate case of someone dropping what they assume to be the last
reference on a GSettings object, only to have an already-pending signal
delivered once they return to the mainloop, crashing their program.
Making this change for GSettings (with multiple instances per thread,
the possibility of multiple backends and each instance being interested
in different events) is going to be extremely non-trivial, so it's not a
change that makes sense at this point in the cycle.
For now, we can do a relatively small and isolated tweak so that we
never access the list except under a lock. We still perform the bad
pattern of acquiring a ref in a foreign thread which means that we still
risk delivering a signal to a GSettings object that the user has assumed
is dead (unless they explicitly disconnect their signal handler). This
is a problem that we already had, however.
https://bugzilla.gnome.org/show_bug.cgi?id=710367
Ryan Lortie [Wed, 26 Feb 2014 22:09:59 +0000 (17:09 -0500)]
gsettingsbackend: a minor simplification
Change the order of the arguments on the (internal) keys_changed callback in
GSettingsListenerVTable.
This means that all functions in the table now fit the following signature:
void (* f) (GObject *target,
GSettingsBackend *backend,
const gchar *name_or_path,
gpointer origin_tag,
const gchar * const *names);
allowing the possibility of arguments ignored at the end.
This allows us to simplify our dispatch-to-thread code in GSettingsBackend,
making it a bit less generic.
So far, this should be a straight refactor.
https://bugzilla.gnome.org/show_bug.cgi?id=710367
Chun-wei Fan [Wed, 12 Mar 2014 09:26:45 +0000 (17:26 +0800)]
Update config.h.win32.in
Make the entries of config.h.win32.in match those that are being checked
in config.h.in.
Duarte Loreto [Wed, 12 Mar 2014 02:10:55 +0000 (02:10 +0000)]
Updated Portuguese translation
Ryan Lortie [Tue, 11 Mar 2014 16:19:19 +0000 (12:19 -0400)]
GUnixVolume: implement _finish functions
The _finish functions for GUnixVolume _mount and _eject functions were
never implemented, having been simply stubbed out as 'return TRUE;'.
Implement them.
https://bugzilla.gnome.org/show_bug.cgi?id=724916
Ryan Lortie [Mon, 3 Mar 2014 02:24:14 +0000 (21:24 -0500)]
GUnixVolume: port to GSubprocess
Do the same as we just did for GUnixMount, for GUnixVolume too.
https://bugzilla.gnome.org/show_bug.cgi?id=724916
Ryan Lortie [Sun, 2 Mar 2014 22:39:11 +0000 (17:39 -0500)]
GUnixMount: port unmount to GSubprocess
The existing code is buggy and now that we have GSubprocess, we should just use
it instead, allowing for some substantial reduction in complexity.
https://bugzilla.gnome.org/show_bug.cgi?id=724916
Yuri Myasoedov [Tue, 11 Mar 2014 17:21:57 +0000 (21:21 +0400)]
Updated Russian translation
Lars Uebernickel [Mon, 10 Mar 2014 18:46:23 +0000 (19:46 +0100)]
glocalfileinfo: don't special-case directory icons
As of e6af432, g_content_type_get_symbolic_icon() returns non-symbolic
fallbacks. Thus, we can't append another symbolic icon to the fallbacks.
The special case was a bit of a hack anyway. It was only applied to
themed icons and there was no generic fallback for mime types that are
not folders.
https://bugzilla.gnome.org/show_bug.cgi?id=726046
David King [Mon, 10 Mar 2014 19:16:28 +0000 (19:16 +0000)]
Add g_application_command_line_get_options_dict() to docs
Chao-Hsiung Liao [Sun, 9 Mar 2014 03:39:30 +0000 (11:39 +0800)]
Updated Traditional Chinese translation(Hong Kong and Taiwan)
Sebastian Dröge [Sun, 9 Feb 2014 22:08:21 +0000 (23:08 +0100)]
gtype – Mark _get_instance_private() function as G_GNUC_UNUSED
clang likes to complain about it being unused.
https://bugzilla.gnome.org/show_bug.cgi?id=723899
Rūdolfs Mazurs [Sat, 8 Mar 2014 13:58:53 +0000 (15:58 +0200)]
Updated Latvian translation
Wylmer Wang [Sat, 8 Mar 2014 12:26:07 +0000 (12:26 +0000)]
Updated Chinese (China) translation
Ryan Lortie [Fri, 7 Mar 2014 12:41:50 +0000 (07:41 -0500)]
gio tests: add codegen to BUILT_SOURCES
We need to have these in BUILT_SOURCES so that 'make' knows to generate them
before attempting to compile other .c files in the same directory (since some
of these files include the header).
Should fix up remaining issues about partial versions of this file being
included under parallel builds.
https://bugzilla.gnome.org/show_bug.cgi?id=725891
Matthias Clasen [Fri, 7 Mar 2014 11:10:36 +0000 (06:10 -0500)]
GObject: Remove more leftover markup from headers
Changwoo Ryu [Thu, 6 Mar 2014 17:02:27 +0000 (02:02 +0900)]
Updated Korean translation
Kjartan Maraas [Wed, 5 Mar 2014 18:24:18 +0000 (19:24 +0100)]
Updated Norwegian bokmål translation
Giovanni Campagna [Tue, 4 Mar 2014 14:30:12 +0000 (15:30 +0100)]
Unskip GVariantDict
There is no reason to (skip) GVariantDict, it's a boxed type
and perfectly usable from gobject-introspection.
https://bugzilla.gnome.org/show_bug.cgi?id=725656
Ryan Lortie [Wed, 5 Mar 2014 14:04:00 +0000 (09:04 -0500)]
cond test: remove alarm() usage
This means that the test can't build on Windows (and we do want it there).
This will be properly resolved with bug 725266, but let's not block the
build before then.
https://bugzilla.gnome.org/show_bug.cgi?id=724859
Matthias Clasen [Wed, 5 Mar 2014 01:20:52 +0000 (20:20 -0500)]
Work around gtk-doc problems
Returns shall never be at the beginning of a line.
Ryan Lortie [Tue, 4 Mar 2014 14:08:24 +0000 (09:08 -0500)]
gsubprocess: test environment a bit more
Add a test for GSubprocess to test setting, unsetting and inheritance of
environment variables. Use communicate() to give it a bit more of a
workout as well.
https://bugzilla.gnome.org/show_bug.cgi?id=725651
Ryan Lortie [Tue, 4 Mar 2014 13:55:00 +0000 (08:55 -0500)]
GSubprocessLauncher: don't get empty environment
Use g_get_environ() to get the environment variables with their values
instead of g_listenv() which only lists off the keys.
https://bugzilla.gnome.org/show_bug.cgi?id=725651
Ryan Lortie [Tue, 4 Mar 2014 02:25:16 +0000 (21:25 -0500)]
gsubprocess: test empty splices
Make sure we handle the case that our splice returns no data properly.
https://bugzilla.gnome.org/show_bug.cgi?id=724916
Ryan Lortie [Mon, 3 Mar 2014 02:01:12 +0000 (21:01 -0500)]
gsubprocess: fix communicate() with empty buffers
On the splice for stdout or stderr completing, GSubprocess calls
_slice_finish() to collect the result.
We assume that a zero return value here means failure, but in fact this
function returns a gssize -- the number of bytes transferred, or -1 for
an error.
This causes GSubprocess to mistakenly think that it has an error when it
actually just has an empty buffer (as would be the case when collecting
stderr from a successful command).
Check for -1 instead of FALSE to detect the error.
https://bugzilla.gnome.org/show_bug.cgi?id=724916
Ryan Lortie [Mon, 3 Mar 2014 03:18:14 +0000 (22:18 -0500)]
GLib 2.39.91
Ryan Lortie [Sun, 2 Mar 2014 14:38:51 +0000 (09:38 -0500)]
desktopappinfo: add Exec to searchable keys
Add the basename from the first component of the Exec line to the list of
strings to search for via g_desktop_app_info_search().
We treat Exec as a fairly strong match -- just below the visible name.
Add a testcase to make sure everything is working OK.
https://bugzilla.gnome.org/show_bug.cgi?id=725023
Theppitak Karoonboonyanan [Mon, 3 Mar 2014 10:27:09 +0000 (17:27 +0700)]
Updated Thai translation
Matthias Clasen [Mon, 3 Mar 2014 00:10:00 +0000 (19:10 -0500)]
Add a few tests for G_MARKUP_TREAT_CDATA_AS_TEXT
Related to
https://bugzilla.gnome.org/show_bug.cgi?id=725433
Matthias Clasen [Mon, 3 Mar 2014 00:02:23 +0000 (19:02 -0500)]
Add a way to test different markup parser flags
For now, we are mainly interested in G_MARKUP_TREAT_CDATA_AS_TEXT.
This commit makes markup-parse look for expected output files with
the extension .cdata-as-text in addition to .expected, and compares
the output of parsing with G_MARKUP_TREAT_CDATA_AS_TEXT against
them. markup-parse --cdata-as-text foo.gmarkup can be used to produce
such expected output.
Matthias Clasen [Sun, 2 Mar 2014 23:20:37 +0000 (18:20 -0500)]
docs: Ditch more markup
Some markup was hiding in docs in headers. Drop it there, too.
Piotr Drąg [Sun, 2 Mar 2014 18:24:01 +0000 (19:24 +0100)]
Updated Polish translation
Philip Withnall [Wed, 19 Feb 2014 18:03:37 +0000 (18:03 +0000)]
hmac: Make unit test const-correct
https://bugzilla.gnome.org/show_bug.cgi?id=724741
Ryan Lortie [Sat, 8 Feb 2014 12:23:46 +0000 (12:23 +0000)]
gmain: simplify g_main_context_find_source_by_id()
Since we now keep a hashtable of sources, we can implement this function
without iteration.
https://bugzilla.gnome.org/show_bug.cgi?id=724839
Ryan Lortie [Sat, 8 Feb 2014 12:17:10 +0000 (12:17 +0000)]
gmain: Simplify source id tracking
Simplify our tracking of issued source id integers and fix some bugs.
Previously the source's id was remove from the 'used' table from
source_remove_from_context() which was also called if the source
priority was changed (in which case it would never be added back to the
table). The source id could be reissued in that case.
In the new approach, we just always keep a hash table of sources, by
source id. This simplifies the logic and will also allow us to improve
performance of g_main_context_find_source_by_id() which is called in some
fairly common cases, such as g_source_remove(). These improvements will be in
the following commits.
https://bugzilla.gnome.org/show_bug.cgi?id=724839
Matthias Clasen [Sun, 23 Feb 2014 17:03:13 +0000 (12:03 -0500)]
Test content type icons more thoroughly
Check we actually get the right icon names, and check
that symbolic icons fall back to non-symbolic ones.
John Lindgren [Sun, 23 Feb 2014 05:52:31 +0000 (00:52 -0500)]
Add non-symbolic fallback icons in g_content_type_get_symbolic_icon().
This makes the behavior consistent with e.g. g_volume_get_symbolic_icon().
https://bugzilla.gnome.org/show_bug.cgi?id=724994
Ryan Lortie [Sun, 23 Feb 2014 06:11:50 +0000 (01:11 -0500)]
asyncqueue: fix timeout math on 32bit systems
88182d375e13ae6519a288d5295220c83ca27e73 caught this issue in
g_async_queue_timed_pop() but failed to fix the same bug in the _unlocked()
variant.
This is only a problem on 32bit systems. On 64bit systems, the tv_sec
in a timeval is already 64 bits, so no overflow occurs.
https://bugzilla.gnome.org/show_bug.cgi?id=722604
Ryan Lortie [Sun, 23 Feb 2014 05:47:29 +0000 (00:47 -0500)]
mappedfile test: permit ENODEV on /dev/null
mmap() on /dev/null returns ENODEV on old Linux versions and also on
Hurd, so accept that in the testcase.
https://bugzilla.gnome.org/show_bug.cgi?id=722360
Chun-wei Fan [Thu, 20 Feb 2014 00:47:54 +0000 (08:47 +0800)]
Fix build of gio/gapplication.c on Visual C++
Visual C++ is quite zealous about checking against the types used in the
initializing of array of structures, even up to Visual C++ 2013. Fix this
by splitting up the initializing steps.
https://bugzilla.gnome.org/show_bug.cgi?id=724609
Ryan Lortie [Thu, 13 Feb 2014 22:07:07 +0000 (17:07 -0500)]
gsocket: use check/prepare only on win32
There is no longer any code left in the check/prepare functions on UNIX,
so put %NULL in the GSourceFuncs vtable.
This also allows us to simplify some logic.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Thu, 13 Feb 2014 21:37:49 +0000 (16:37 -0500)]
gsocket: use _add_unix_fd() instead of _add_poll()
Use g_source_add_unix_fd() on UNIX instead of using a GPollFD.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Thu, 13 Feb 2014 21:59:28 +0000 (16:59 -0500)]
gsocket: make use of g_source_set_ready_time()
Drop our own hand-rolled version of the same functionality.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Fri, 21 Feb 2014 00:05:30 +0000 (19:05 -0500)]
GSource: mark some API as "implementation only"
Clarify that _add_poll() _remove_poll() _add_unix_fd(),
_modify_unix_fd(), _remove_unix_fd(), _query_unix_fd(),
_set_ready_time(), _add_child_source() and _remove_child_source() are only
intended to be used by the implementation of a particular GSource -- not its
consumers.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Thu, 13 Feb 2014 21:58:34 +0000 (16:58 -0500)]
gsocket: don't abuse GPollFD.revents field
We are reusing the GPollFD.revents field of the source to store a
temporary value. Use a local variable for that instead.
This is a refactor to make the next commit easier to understand.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Thu, 13 Feb 2014 21:34:29 +0000 (16:34 -0500)]
gsocket: use cancellable child source
Now that GCancellable's GSource is based on _set_ready_time() instead of
an fd, we should use it as a child source, instead of forcing the
creation of the fd and adding it as a poll.
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Thu, 13 Feb 2014 21:16:27 +0000 (16:16 -0500)]
gsocket: trivial typo fix
https://bugzilla.gnome.org/show_bug.cgi?id=724707
Ryan Lortie [Sat, 22 Feb 2014 14:22:27 +0000 (09:22 -0500)]
gmain: repeat preconditions for emphasis
g_main_context_acquire() mentions that you must have called it before
you make any calls to _prepare(), _query(), _check() or _dispatch().
For emphasis, add a note on each of those functions pointing back to the
fact that you must have called _acquire() before using them.
Ryan Lortie [Fri, 21 Feb 2014 21:25:09 +0000 (16:25 -0500)]
g_main_context_wait: add a critical to detect use
Due to its unusual interface, I suspect that nobody is using
g_main_context_wait() but there is no way to know.
Add a critical notice that will be displayed if anyone calls the
function, asking them to file a bug with us.
We'll let this go out with the 2.40 release and see if we get a response
before we proceed with actually breaking the functionality.
Ryan Lortie [Fri, 21 Feb 2014 21:40:16 +0000 (16:40 -0500)]
GCond: check result of pthread_condattr_setclock()
Make sure this call succeeds, aborting if it doesn't
This will prevent people from having to waste time chasing down the problems
that would otherwise be caused by this silent failure.
Ryan Lortie [Fri, 21 Feb 2014 15:20:11 +0000 (10:20 -0500)]
gmain: abort if monotonic time is unsupported
We now depend on CLOCK_MONOTONIC, but it's possible that people may
attempt to run GLib on systems where it isn't supported at runtime.
Check the return value of clock_gettime() and abort() if it fails in
order to save these people from wasting time on debugging a tricky
issue.
https://bugzilla.gnome.org/show_bug.cgi?id=670144
Xavier Claessens [Fri, 21 Feb 2014 20:35:36 +0000 (15:35 -0500)]
GHashTable: Explicitly document that _iter_remove() is safe while iterating
https://bugzilla.gnome.org/show_bug.cgi?id=723316
Aurimas Černius [Fri, 21 Feb 2014 20:16:16 +0000 (22:16 +0200)]
Updated Lithuanian translation
Chun-wei Fan [Fri, 21 Feb 2014 09:06:56 +0000 (17:06 +0800)]
glib/Makefile.am: Dist gtranslit-data.h
This header needs to be distributed as well, which was
inadvertently missed.
https://bugzilla.gnome.org/show_bug.cgi?id=724858
Ryan Lortie [Fri, 21 Feb 2014 12:56:06 +0000 (07:56 -0500)]
slow-motion post-release version bump
Ryan Lortie [Thu, 20 Feb 2014 23:49:37 +0000 (18:49 -0500)]
gconvert: add note to avoid transliteration
Add a note to the documentation of g_convert() advising to avoid using
it for transliteration. Link to g_str_to_ascii().
Ryan Lortie [Thu, 13 Feb 2014 15:18:03 +0000 (10:18 -0500)]
gsource: document priority of child sources
Add a note to the documentation that child sources cannot have their priority
changed independently from their parent. Add a g_return_if_fail() to the
public API in order to enforce this.
This was already a reality due to the check in
g_source_set_priority_unlocked(), but it was never explicitly documented.
https://bugzilla.gnome.org/show_bug.cgi?id=724706
Ryan Lortie [Thu, 20 Feb 2014 23:32:04 +0000 (18:32 -0500)]
g_str_to_ascii(): a couple of minor tweaks
Add a precondition guard and use g_string_sized_new() to avoid some
reallocations.
Ryan Lortie [Mon, 17 Feb 2014 18:15:55 +0000 (13:15 -0500)]
g_str_tokenize_and_fold: do proper transliteration
g_str_tokenize_and_fold() can now do proper locale-sensitive
transliteration for ascii alternatives.
https://bugzilla.gnome.org/show_bug.cgi?id=710142
Ryan Lortie [Mon, 17 Feb 2014 16:55:22 +0000 (11:55 -0500)]
tests: test transliteration API
Add some tests for the new transliteration API.
https://bugzilla.gnome.org/show_bug.cgi?id=710142
Ryan Lortie [Mon, 17 Feb 2014 16:54:18 +0000 (11:54 -0500)]
Add locale-sensitive ASCII transliteration API
Add a new function, g_str_to_ascii() that does locale-dependent ASCII
transliteration of UTF-8 strings.
This function works off of an internal database. We get the data out of
the localedata shipped with glibc, which seems to be just about the best
source of locale-sensitive transliteration information available
anywhere.
We include a update script with this commit that's not used by anything
at all -- it will just sit in git. It is intended to be run manually
from time to time.
https://bugzilla.gnome.org/show_bug.cgi?id=710142
Ryan Lortie [Wed, 19 Feb 2014 00:04:24 +0000 (19:04 -0500)]
tests: add a test for g_cond_wait_until()
https://bugzilla.gnome.org/show_bug.cgi?id=673607
Ryan Lortie [Tue, 18 Feb 2014 23:50:18 +0000 (18:50 -0500)]
Fix g_cond_wait_until() vs. monotonic time
We've had a relatively rocky path with g_cond_wait_until() on systems
that either don't support pthread_condattr_setclock() or where
g_get_monotonic_time() is not based on CLOCK_MONOTONIC (ie: Android and
Mac OS).
Fortunately, both of these platforms seem to share
pthread_cond_timedwait_relative_np() which allows us to implement
g_cond_wait_until() without races.
With this patch, we now require that one of pthread_condattr_setclock()
or pthread_cond_timedwait_relative_np() exists. A quick look around
suggests that this is true for all platforms that we care about.
This patch removes our use of pthread_cond_timedwait_monotonic() and
pthread_cond_timedwait_monotonic_np() which were Android-only APIs.
https://bugzilla.gnome.org/show_bug.cgi?id=673607
Ryan Lortie [Tue, 18 Feb 2014 19:09:49 +0000 (14:09 -0500)]
gmain: rework g_get_monotonic_time() a bit
We now assume the existence of clock_gettime() and CLOCK_MONOTONIC as
specified by POSIX.1-2001. This means that we always return truly
monotonic time, which will prevent problems in the case that the user
changes the time.
Mac OS doesn't have clock_gettime() but it does have
mach_absolute_time(), so we can use that there.
We keep our Windows case as well (although we should simplify it once XP
hits EOL later this year).
This patch removes the fallback to gettimeofday() in case of missing
clock_gettime(). We no longer have any way to test this codepath and
therefore it must go.
This patch also restructures the #ifdef a bit so that we repeat the
entire function definition inside of #ifdef instead of just the entire
body of one function.
https://bugzilla.gnome.org/show_bug.cgi?id=724687
William Jon McCann [Thu, 20 Feb 2014 00:35:23 +0000 (19:35 -0500)]
docs: use "Returns:" consistently
Instead of "Return value:".
Chun-wei Fan [Wed, 19 Feb 2014 05:57:18 +0000 (13:57 +0800)]
gio/gresolver.c: Fix build on Windows
Windows does not come with inet_aton(), and this check on IPv4 addresses
is actually not needed on Windows as the getaddrinfo() implementation on
Windows already rejects non-standard and non-real IPv4 numbers-and-dots
addresses.
https://bugzilla.gnome.org/show_bug.cgi?id=724609
Kjartan Maraas [Wed, 19 Feb 2014 22:57:40 +0000 (23:57 +0100)]
Updated Norwegian bokmål translation
Xavier Claessens [Wed, 19 Feb 2014 20:51:27 +0000 (15:51 -0500)]
Add G_ÂTYPE_VARIANT_DCT into the doc
Ryan Lortie [Mon, 17 Feb 2014 23:33:34 +0000 (18:33 -0500)]
GLib 2.39.90
Ryan Lortie [Mon, 17 Feb 2014 23:13:01 +0000 (18:13 -0500)]
Work around test failure in gdbus-names
This is caused by g_test_dbus_down() returning too soon.
Add a sleep for now.
https://bugzilla.gnome.org/show_bug.cgi?id=711807
Ryan Lortie [Mon, 17 Feb 2014 22:43:48 +0000 (17:43 -0500)]
GApplication: disable some more tests
Disable some racy GApplication testcases. We need some better non-hacky
GApplication tests...
https://bugzilla.gnome.org/show_bug.cgi?id=724126
Matthias Clasen [Mon, 17 Feb 2014 21:57:13 +0000 (16:57 -0500)]
Bump gtk-doc dep to 1.20
Dan Winship [Fri, 14 Feb 2014 20:35:11 +0000 (15:35 -0500)]
gsocket: fix g_socket_condition_timed_wait() recovery after EINTR
After getting an EINTR, g_socket_condition_timed_wait() has to adjust
its timeout, but it was trying to convert from nanoseconds to
microseconds by multiplying by 1000 rather than dividing... Oops.
https://bugzilla.gnome.org/show_bug.cgi?id=724239
Dan Winship [Fri, 14 Feb 2014 21:12:50 +0000 (16:12 -0500)]
gtestutils: make the new assert messages more detailed
g_assert_true(), g_assert_false(), g_assert_null(), and
g_assert_nonnull() simply printed out the expression they were
checking, without any further explanation of what went wrong. (In
particular, "g_assert_true(x)" and "g_assert_false(x)" would both
print the same thing on failure.) Add a little bit more context.
https://bugzilla.gnome.org/show_bug.cgi?id=724385
Ross Burton [Tue, 4 Feb 2014 13:15:08 +0000 (13:15 +0000)]
gio/tests: fix race when generating code
There is a race condition in the makefile that can result in build failures like this in parallel builds:
| ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef
| #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__
This is because a rule like this:
x.c x.h: prerequisites
@commands
doesn't consider x.c and x.h together. Instead, it expands to two rules, one to
generate x.c and one to generate x.h, which happen to run the same commands. In
the worst case they execute in parallel, overwriting each other's output.
Signed-off-by: Ross Burton <ross.burton@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=723616
Olivier Crête [Sat, 15 Feb 2014 07:23:29 +0000 (02:23 -0500)]
subprocess: Init and clear the mutex
Fixes the leak of the GMutexImpl allocated inside the first call to g_mutex_lock()
on an uninitialized GMutex.
https://bugzilla.gnome.org/show_bug.cgi?id=724401
Paolo Borelli [Sun, 16 Feb 2014 21:06:11 +0000 (22:06 +0100)]
Annotate g_application_add_main_option_entries
Dan Winship [Sun, 16 Feb 2014 14:24:04 +0000 (09:24 -0500)]
g_simple_async_result_is_valid: fix for NULL source tag
If a GSimpleAsyncResult has a NULL source tag, allow it to compare
valid to a non-NULL source tag in g_simple_async_result_is_valid(), to
simplify cases where, eg, g_simple_async_result_new() and
g_simple_async_result_report_error_in_idle() are both used.
https://bugzilla.gnome.org/show_bug.cgi?id=721458
Koop Mast [Sat, 15 Feb 2014 18:54:21 +0000 (19:54 +0100)]
Fix the build on FreeBSD by replacing EAI_NODATA with EAI_NONAME.
https://bugzilla.gnome.org/show_bug.cgi?id=724434