12967 Commits

Author SHA1 Message Date
Cédric Valmary
70227f30d3 Update Occitan translation 2016-10-12 08:24:22 +00:00
Stephan Bergmann
575a9694fe gmacros: Ensure GUINT32/64_SWAP_LE_BE macros parenthesize arguments
Like all macros, we need to parenthesize arguments to ensure the order
of operations is correct.

See the mail thread starting at
<http://lists.fedoraproject.org/pipermail/devel/2013-March/180302.html>
"GCC produced wrong code in gvfs-1.14.2-3.fc18.x86_64" for how this
caused trouble with GVFS (which in turn caused trouble with
LibreOffice, where running "soffice sftp://.../.../test.odt" to access
an .odt file via GVFS failed to properly type-detect that file as a
Writer document and produced bogus error messages about the file being
broken).

https://bugzilla.gnome.org/show_bug.cgi?id=695925
2013-03-26 13:51:00 +01:00
Chun-wei Fan
bcb1ece652 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:13:23 +08:00
Ryan Lortie
116561f229 GVariant: fix normal-form checking for tuples
GVariant has the concept of fixed-sized types (ie: types for which all
values of the type will have the same size).  Examples are booleans,
integers, doubles, etc.  Tuples containing only these types are also
fixed size.

When GVariant is trying to deal with a fixed-sized value for which it
doesn't have a sufficient backing store (eg: the case where a
fixed-sized value was created with g_variant_new_data() with an
incorrect number of bytes) it denotes this by setting the size of the
value to the correct fixed size but using a NULL data pointer.

This is well-documented in several code comments and also in the public
API documentation for g_variant_get_data() which describes the situation
number which NULL could be returned.

The decision to deal with this case in this way was changed at the last
minute around the time that GVariant was merged -- originally we had an
elaborate setup involving allocating an internal buffer of sufficient
size to be shared between all invalid values.

Unfortunately, when making this change a small detail was missed.
gvs_tuple_get_child() (the function responsible for deserialising
tuples) was updated to properly check for this case (and it contains a
comment about why it must).  gvs_tuple_is_normal() (the function
responsible for verifying if a tuple is in normal form) was not.

We add the check now.

Note that this problem does not exist with any other container type
because tuples are the only container capable of being fixed-sized.  All
other container types (arrays, maybes, variants) can contain a variable
number of items or items of variable types (note: we consider dictionary
entries to be two-tuples).  The code for validating non-container values
also contains a check for the case of NULL data.

The problem also does not occur in the only other function dealing with
serialised tuples: gvs_tuple_n_children().  Whereas other container
types would have to inspect the serialised data to determine the number
of children, for tuples it can be determined directly from the type.
2013-01-18 16:43:50 -05:00
Gheyret Kenji
18f3060329 Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-01-06 16:28:39 +09:00
Gheyret Kenji
1f2dc252d4 Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
2013-01-06 16:26:00 +09:00
John Ralls
8d28cde2aa Bug 633117: glib fails tests if /etc/localtime is not properly set 2012-12-19 00:41:24 +00:00
ManojKumar Giri
c2d32d3f55 Updated Odia Translation with FUEL implementation. 2012-11-27 19:19:20 +05:30
Dan Winship
fd0a91a454 bump version 2012-11-26 14:52:09 -05:00
Dan Winship
32fb4ca618 2.34.3 NEWS 2.34.3 2012-11-26 14:07:26 -05:00
Dan Winship
2fc0687bcb g_test_expect_message: fix two bugs in example code 2012-11-26 12:15:38 -05:00
Ryan Lortie
ff358f1054 gdatetime: Fix some docs sed damage 2012-11-26 12:14:02 -05:00
Aleksander Morgado
1b1c132d98 gdbus: improve documentation of the GDBusError section
https://bugzilla.gnome.org/show_bug.cgi?id=688370
2012-11-26 12:12:16 -05:00
Olivier Blin
b458cff5b2 configure: add missing square bracket in AS_IF for memmove
This has been broken in commit 54e31ab4f172bbb28434eafc34c9345a93c9ccf5
It seems to be the only hunk that was incorrectly converted.

https://bugzilla.gnome.org/show_bug.cgi?id=688377
2012-11-26 12:10:04 -05:00
Kjell Ahlstedt
8919e10c7f GObject: Fix code snippet in description of floating reference.
https://bugzilla.gnome.org/show_bug.cgi?id=688180
2012-11-26 12:09:08 -05:00
Will Thompson
cf63e32fa2 gthread: add AVAILABLE_IN_2_32 annotations
https://bugzilla.gnome.org/show_bug.cgi?id=688319
2012-11-26 12:08:14 -05:00
Sébastien Wilmet
658131f44d Improve i18n documentation
Clearly explain which gettext functions must be called. It depends
whether the program is an application or a library.

https://bugzilla.gnome.org/show_bug.cgi?id=688886
2012-11-26 12:07:17 -05:00
John Ralls
0e3839211b Bug 681685: Transcoding fails on OSX
Add aliases for codesets supported by iconv and included in locales.
Ifdef-out tests in glib/tests/gdatetime.c which fail because on OSX only
ASCII numbers or symbols are returned for the format.

Even though nl_langinfo does weird things on Darwin in some cases, it
still acts correctly when LANG/LC_ALL is set to a supported
locale.codeset.
2012-11-25 16:45:46 +09:00
Sweta Kothari
e866f431a7 Updated gujarati file 2012-11-23 13:29:24 +05:30
Sweta Kothari
bb36bbd09b Updated gujarati file 2012-11-23 12:21:13 +05:30
ManojKumar Giri
10f8f10a29 Updated Odia Translation with FUEL implementation. 2012-11-22 20:23:57 +05:30
Dan Winship
c1609942ea 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 49ad4e9494e4497cffcf145d3515231bcf05de29.
2012-11-19 23:13:29 -05:00
Kjartan Maraas
0560866156 Updated Norwegian bokmål translation 2012-11-17 11:31:07 +01:00
Michael Natterer
42be40a1f8 Bug 673047 - gunicollate is broken on OS X
Apply slightly modified patch from Camillo Lugaresi which fixes
gunicollate for OSX >= 10.6. It was totally hilariously broken
for anyone on 10.6 and later, I dont know if it's now broken
on 10.5, but better fix it for the vast majority of users.
(cherry picked from commit ef8510be09a746dcbc8d470376688820b225c40f)
2012-11-16 18:52:22 +01:00
Kalev Lember
0116bf44dd Fix a broken link in GConf migration guide
gnome-utils git repo was moved to archive/ and this broke the link.
2012-11-16 17:40:55 +01:00
Paul Menzel
c1cb664182 docs: Fix spelling of "exceed" in gobject/gtype.c
https://bugzilla.gnome.org/show_bug.cgi?id=688338
2012-11-16 08:32:06 +00:00
Sweta Kothari
7839faac84 Updated gujarati file 2012-11-15 11:32:47 +05:30
Paul Menzel
2bcfabd001 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
2012-11-13 13:54:01 +00:00
Matthias Clasen
cc837d9d18 Bump version 2012-11-09 23:03:50 -05:00
Matthias Clasen
47d70243fd Updates 2.34.2 2012-11-09 22:32:22 -05:00
Sebastian Dröge
49ad4e9494 Return correct value for g_socket_get_available_bytes() on Windows and OSX
https://bugzilla.gnome.org/show_bug.cgi?id=686786
2012-11-09 22:27:29 -05:00
Timothy Arceri
6589d35391 Use url encoding for trash fileinfo path as per freedesktop trash specification
https://bugzilla.gnome.org/show_bug.cgi?id=687540
2012-11-09 22:27:08 -05:00
Emmanuel Pacaud
46274f6d5a Check for PR_GET_NAME
PR_GET_NAME may not be defined when using an old kernel. Deal with it.
2012-11-09 22:26:34 -05:00
Colin Walters
8195be761c 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
2012-11-09 22:26:28 -05:00
Ryan Lortie
545cda4fef 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
2012-11-09 22:26:01 -05:00
Colin Walters
9aa447b13a 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
2012-11-09 22:24:06 -05:00
Colin Walters
759fb92905 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
2012-11-09 22:23:49 -05:00
Will Thompson
27aca91587 GNetworkMonitor: add missing apostrophe to docstring 2012-11-09 22:23:38 -05:00
Vincent Untz
f51231838b Add annotations for g_filename_from_uri()
https://bugzilla.gnome.org/show_bug.cgi?id=672924
2012-11-09 22:23:29 -05:00
John Ralls
30bb8e187a Fix pollable 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.
2012-11-09 09:33:03 -08:00
John Ralls
6d6d18ae53 Fix compile error about missing prototype
For g_nextstep_settings_backend_get_type()
2012-11-09 09:33:03 -08:00
John Ralls
d27d366397 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.
2012-11-09 09:32:44 -08:00
Martin Pitt
1743c8460e 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.

Cherry-picked from trunk commit a07a5f82aaf.
2012-11-09 09:34:10 +01:00
Martin Pitt
e10e97fa9d 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.
2012-11-09 09:10:11 +01:00
Chun-wei Fan
b600ca001d 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.
2012-11-05 12:33:02 +08:00
Simon Feltman
8ffa4b6338 Add array length annotation to GSignalQuery param_types field
https://bugzilla.gnome.org/show_bug.cgi?id=687541
2012-11-04 13:52:20 +01:00
Martin Pitt
1061b0ddbc 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.
2012-11-03 14:01:59 +01:00
Simon McVittie
11f26aafc2 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>
2012-11-02 13:05:59 +00:00
Ryan Lortie
e8080750a7 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
2012-10-30 14:43:06 +01:00
Matthew Barnes
ce3c5fe747 Fix typo in G_TEST_DBUS.
(cherry picked from commit 7db2ac7b88a4d2211894153212e92ea9db5cacbb)
2012-10-26 13:21:14 -04:00