Commit Graph

12378 Commits

Author SHA1 Message Date
Michael Olbrich
a7a1a50d6a make sure configure fails if AC_CHECK_ALIGNOF cannot detect the alignment
When cross-compiling with gcc >= 4.5 AC_CHECK_ALIGNOF fails to detect the
correct alignment. Without a previous AC_CHECK_TYPE for the same type, the
alignment is silently set to '0'.
This makes sure that configure fails and reports the problem.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>

https://bugzilla.gnome.org/show_bug.cgi?id=674483
2012-04-25 09:38:02 -04:00
Alexander Larsson
8f2c2eef3c win32: Fix build with srcdir != builddir
Missed this part in the last commit
(cherry picked from commit 62905cda0b)
2012-04-24 14:55:08 +02:00
Alexander Larsson
9b588b3e46 win32: Fix build of gdbus-daemon-generated.[ch]
gdbus-daemon-generated.[ch] failed to build because it depended
on gdbus-2.0/codegen/gdbus-codegen which was build during the SUBDIRS part
of the build, however SUBDIRS are done *after* processing BUILT_SOURCES,
and these files are in BUILT_SOURCES.

The fix is simple, instead of running the gdbus-codegen code we
run the gdbus-codegen.in code, which works fine for uninstalled execution.

I also removed Makefile from the dependencies to avoid rebuilding the file
in tarballs, as Makefiles are written at configure time. We should be able to
ship the prebuilt files in the tarballs.
When running uninstalled
(cherry picked from commit 88bfc9b289)
2012-04-24 14:11:07 +02:00
Chun-wei Fan
d47f4c4ce6 Visual C++ projects: Clean/fix up
Clean/fix up the Preprocessor Definitions for the various projects, where
we purge out the unneeded macros and add _DEBUG to the Debug builds of
various projects that somehow lacked this.

This will also fix the GIO build under Visual C++ 2008, as the _DEBUG macro
in the release builds will cause a debug entry to appear in its manifest
file during the build, which will cause GIO-using applications to fail
to run on systems not running Visual C++/Studio 2008 due to its embedding
of a badly-generated manifest file.
2012-04-24 00:07:38 +08:00
Alexandre Rostovtsev
d161fcf385 Do not detect GNUstep as Cocoa
GNUstep also installs Foundation/Foundation.h

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

Signed-off-by: William Hua <william@attente.ca>
2012-04-20 15:49:27 -04:00
William Hua
76627dc7b6 Use Cocoa header for Cocoa test instead of Foundation. 2012-04-20 15:49:16 -04:00
Alexander Larsson
d58a42fd38 Fix build on win32
Some errnos don't exist on win32
(cherry picked from commit 2414d7d6a1)
2012-04-20 16:39:37 +02:00
Alexander Larsson
b5a846ca76 win32: Implement _g_dbus_get_machine_id using machine guid
This is what libdbus uses, so we're compatible.
(cherry picked from commit 5fb44f70dc)
2012-04-20 16:33:02 +02:00
Alexander Larsson
5d41a02125 win32: Support autolaunching dbus daemon
(cherry picked from commit dccce38367)
2012-04-20 16:32:49 +02:00
Alexander Larsson
cef54a9b82 Add _g_io_win32_get_module to get the gio HMODULE
(cherry picked from commit bd148e127a)
2012-04-20 16:32:37 +02:00
Alexander Larsson
9490d67f3c Add GDBusDAaemon, an implementation of a message bus
This is mostly complete, sans support for activation. However, its
not as picky as the libdbus implementation in terms like validation
and limits checking, nor is it as tested.

Its can be useful to test gdbus if dbus-daemon is not availible, but
its main reason for existance is to implement a default session bus
on win32 so that e.g. GApplication is guaranteed to work.
(cherry picked from commit 25581738a8)
2012-04-20 16:32:24 +02:00
Alexander Larsson
27352d96e2 gdbus: Escape nonce files in dbus addressess
Otherwise the colon in c:\blah made for trouble
(cherry picked from commit 82aecce301)
2012-04-20 16:31:41 +02:00
Alexander Larsson
5051aaca68 Support initial underscores in dbus codegen namespace
Before these were considered lowercase and thus got duplicated.
(cherry picked from commit ff92fe9593)
2012-04-20 16:31:23 +02:00
Benjamin Otte
ad35c6cae1 resourcefile: Set display name
Fixes resource filenames not being printed in CSS warnings for GTK.

https://bugzilla.gnome.org/show_bug.cgi?id=674345
2012-04-20 14:41:29 +02:00
Hannes Mueller
153cad8974 avoid warning in gutils.h when using gcc with -Wconversion
Old solution to avoid warning with gcc flag -Wconversion does not
work with gcc >=4.3 since the behaviour for that flag has been
changed, ref. http://gcc.gnu.org/wiki/NewWconversion. Now cast for
__builtin_clzl is required, which itself is declared to return int.

https://bugzilla.gnome.org/show_bug.cgi?id=619026
2012-04-17 18:26:20 +02:00
Christian Persch
437b831c76 resources: compiler: Fix resources on big endian architectures
Resources are always little endian, so the gvdb is byteswapped. When looking
up the value, it would return a new byteswapped variant, making the data
returned from do_lookup() invalid once that variant is unref'd. Since
byteswapping doesn't matter for the "ay" data anyway, just use
gvdb_table_get_raw_value() instead and only byteswap the length and flag
values.

https://bugzilla.gnome.org/show_bug.cgi?id=673409
(cherry picked from commit 5ef34e5f11)
2012-04-16 22:40:13 +02:00
Colin Walters
c7db8d989b tests/mainloop: Add a test for recursive child sources
https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 15:49:35 -04:00
Dan Winship
a6822b46db tests/mainloop: add a test for child sources
https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 15:49:35 -04:00
Dan Winship
b1d447bd66 gmain: block child sources when blocking the parent
When blocking a source that has child sources, we need to consider the
children blocked as well. Otherwise they will still trigger repeatedly
in an inner loop started from the parent source's callback.

https://bugzilla.gnome.org/show_bug.cgi?id=669260
2012-04-16 15:49:35 -04:00
Piotr Drąg
c18ef42c45 Updated Polish translation 2012-04-16 21:19:23 +02:00
Kalev Lember
6b4c907cc7 Only build gmenumodel test on unix
It depends on gdbus-sessionbus.c which only builds on unix.
2012-04-16 18:47:07 +03:00
Kalev Lember
274940b247 tests/fileutils: Fix Windows build 2012-04-16 18:47:05 +03:00
Yinghua Wang
c88c1639a3 update Simplified Chinese (zh_CN) translation 2012-04-16 14:07:27 +08:00
David Zeuthen
9b1a9ed4ce GSocketControlMessage: Don't warn about unknown messages
If we do this, the tests added in bug 673943 will cause warnings.

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-15 11:54:30 -04:00
Matthias Clasen
55bbb9fc69 Bump version 2012-04-13 19:54:42 -04:00
Matthias Clasen
2b6cf583d2 2.32.1 2.32.1 2012-04-13 19:53:42 -04:00
Matthias Clasen
c1a83a4ac8 Fix distcheck
I forgot to dist a test script, and forgot to look for it
in srcdir instead of builddir.
2012-04-13 19:53:07 -04:00
Christian Kirbach
9375212311 [l10n] Updated German translation 2012-04-13 19:39:19 +02:00
Dan Winship
baf0ebf7b2 tests/mainloop: fix a race condition
Rather than depending on the machine's speed/load, just interlock
between the two threads properly.
2012-04-13 12:15:15 -04:00
Dan Winship
e0aa0ae8a2 tests/mainloop: use g_assert_cmpint(), for better error messages 2012-04-13 12:15:11 -04:00
Matthias Clasen
50aed1cc8f Make the markup-parse test independent of the locale
I added a setlocale call, because we need it for Unicode to
come out right; but I forgot to fix the locale, so we now
fail when comparing error messages to the expected (English)
result. Correct this by setting LANG explicitly to en_US.utf-8.

https://bugzilla.gnome.org/show_bug.cgi?id=669285
2012-04-13 09:39:48 -04:00
Bruce Cowan
5e0be9e9e2 Updated British English translation 2012-04-13 13:27:39 +01:00
Kalev Lember
e13fc58535 GResource docs: fix typo 2012-04-13 13:22:46 +03:00
Ryan Lortie
192892b52c GSettings docs: clarify what is a good path
Add an explicit note to the docs about choosing paths based on domain
names, not ones like "/apps/", "/desktop/" or "/system/".
2012-04-12 20:04:32 -04:00
Ryan Lortie
6560b37450 glib-compile-schemas: warn about bad dconf paths
For quite some time the recommended usage of GSettings and dconf has
been to use paths like /org/gnome/example/.  Use of /apps/ has spilled
over from GConf and is continuing to make its way into a number of
applications as they port.

glib-compile-schemas will now warn about these types of paths being
used.  This generates a lot of noise, but hopefully it will reduce the
number of ported applications making this mistake.
2012-04-12 19:55:34 -04:00
Alexander Larsson
386f0f29fd Fall back to SO_PEERCRED if credentials passing fails
Turns out libdbus doesn't send struct ucred credentials on linux, but
just relies on the SO_PEERCRED support. However, gdbus does send, and
expect to recieve a ucred credential. So, when libdbus talks to a
gdbus server the authentication fails to send the credentials.

We fix this by falling back to g_socket_get_credentials() if we don't
get any credential messages.
2012-04-12 16:50:20 +02:00
Alexander Larsson
ec91ed00f1 Detect "empty" socket credentials on Linux
Linux uses struct ucred to pass over socket credentials. Historically
this has always worked in recievemsg, if SO_PASSCRED was set on the socket,
even if the remote side didn't pass any credits. But this change broke that:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=16e5726269611b71c930054ffe9b858c1cea88eb;hp=a9e9fd7182332d0cf5f3e601df3e71dd431b70d7

However, it doesn't actually fail getting the credentials, it just returns
an "empty" one, as initialized by cred_to_ucred() at:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=net/core/sock.c;h=b29ab61b029cf7f76fda992ecfcb8dcaa06b0483;#l756

So, we detect this and fail the credentials reading.

This actually happened in real life with gdbus acting as a server, as
gdbus expected an ucred but libdbus didn't send one.
2012-04-12 16:43:49 +02:00
William Hua
69d929e67f Be more precise about Carbon v. Cocoa. 2012-04-11 23:25:09 -04:00
OKANO Takayoshi
ebe30ef463 [l10n] Update Japanese translation 2012-04-12 09:31:51 +09:00
Kalev Lember
47692845c0 gio-2.0.pc: Avoid full path to executables
Instead of using full path in glib_compile_schemas and
glib_compile_resources variables, rely on having the executables in
PATH.

This fixes the cross-compiling case where we cannot execute the binaries
for target system. Instead of executing the target system's binaries, we
need to use the native versions installed on the build host. The easiest
way to find the native executables is to just pick them up from PATH.

In addition, this brings gio-2.0.pc in line with glib-2.0.pc -- the
latter has historically only listed the executable name and not the full
path.

https://bugzilla.gnome.org/show_bug.cgi?id=673911
2012-04-11 20:01:44 +03:00
Jeremy Huddleston
5739d896f8 Don't use fast enumeration in old version of Mac OS.
Signed-off-by: William Hua <william@attente.ca>
2012-04-11 10:31:59 -04:00
Jeremy Huddleston
51a2661da6 Link with Foundation framework on OSX.
Signed-off-by: William Hua <william@attente.ca>
2012-04-11 10:31:59 -04:00
Bruno Brouard
92654b5035 Updated French translation 2012-04-11 14:53:22 +02:00
Chandan Kumar (ciypro)
708f82735d Updated HINDI translation 2012-04-11 16:27:42 +05:30
Kjartan Maraas
53accb95c0 Updated Norwegian bokmål translation 2012-04-11 12:41:51 +02:00
Matthias Clasen
e1cabfd3f2 Updates 2012-04-10 23:52:30 -04:00
Carles Ferrando
e448f206e6 [l10n]Updated Catalan (Valencian) translation 2012-04-10 23:12:29 +02:00
Jordi Serratosa
1083b28fb9 [l10n] Fixes on Catalan translation 2012-04-10 23:12:23 +02:00
Will Thompson
c037879bd1 gdbus: test case for 673612
When presented with an array of empty arrays of 8-byte-aligned types,
GDBus would incorrectly apply the 8-byte alignment when reading back.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-10 16:39:49 -04:00
Will Thompson
113f4abb67 GDBusMessage: do not align for grandchildren of empty arrays.
D-Bus arrays are serialized as follows:

1. align to a 4-byte boundary (for the length)
2. uint32: the length of the serialized body in bytes
3. padding for the alignment of the body type (not included in the length)
4. the body.

Note that 3. is a no-op unless the body type is an 8-byte aligned type
(uint64, int64, double, struct, dict_entry), since you are always on a
4-byte boundary from aligning and writing the length.

So, an empty aax (that is, an array containing zero arrays of int64)
is serialized as follows:

1. align to a 4-byte boundary
2. length of the contents of this (empty) array, in bytes (0)
3. align to a 4-byte boundary (the child array's alignment requirement)
4. there is no body.

But previously, GDBus would recurse in step three to align not just for
the type of the child array, but for the nonexistent child array's
contents. This only affects the algorithm when the grandchild type has
8-byte alignment and the reader happened to not already be on an 8-byte
boundary, in which case 4 bytes were spuriously skipped.

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

Signed-off-by: David Zeuthen <davidz@redhat.com>
2012-04-10 16:39:47 -04:00