platform/upstream/glib.git
11 years agogmarshal.h: replace "extern" with GLIB_AVAILABLE_IN_ALL
Ryan Lortie [Thu, 6 Dec 2012 19:01:46 +0000 (14:01 -0500)]
gmarshal.h: replace "extern" with GLIB_AVAILABLE_IN_ALL

This was one of the few public header files that was properly declaring
functions as "extern".  Switch it to use GLIB_AVAILABLE_IN_ALL instead.

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

11 years agogbacktrace.c: special treatment for a weird symbol
Ryan Lortie [Thu, 6 Dec 2012 19:03:22 +0000 (14:03 -0500)]
gbacktrace.c: special treatment for a weird symbol

We have a public symbol 'glib_on_error_halt' that is exported from
gbacktrace.c without appearing in a header, presumably with the
intention that people will be able to hit it from their debugger.

Mark it as GLIB_AVAILABLE_IN_ALL from inside the .c file...

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

11 years agoAdd a new _GLIB_EXTERN macro for "extern"
Ryan Lortie [Thu, 6 Dec 2012 18:37:45 +0000 (13:37 -0500)]
Add a new _GLIB_EXTERN macro for "extern"

This macro simply evaluates the "extern" unless it has been explicitly
defined to something else.

All of the version macros (including the unversioned deprecation markers
and GLIB_AVAILABLE_IN_ALL) now include _GLIB_EXTERN as part of their
definition.

G_INLINE has also been modified to use _GLIB_EXTERN where appropriate.

This macro should never be used outside of the gmacros.h/gversonmacros.h
headers.

The effect of this patch is that "extern" has now been added to all
functions declared in installed headers.  Strictly speaking, this is
something we should have had all along...

GLIB_VAR and GOBJECT_VAR have also been modified to use _GLIB_EXTERN on
non-Windows, instead of "extern" which they were using before.  The
eventual goal is to use the normal version/deprecation macros on
exported variables and drop GLIB_VAR but we need to see how this will
work on Windows before we go ahead with that.

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

11 years agoadd a missing AVAILABLE_IN_2_36 annotation
Ryan Lortie [Sun, 13 Jan 2013 18:13:03 +0000 (13:13 -0500)]
add a missing AVAILABLE_IN_2_36 annotation

11 years agovarious: add GLIB_AVAILABLE_IN_ALL everywhere else
Ryan Lortie [Thu, 6 Dec 2012 19:04:59 +0000 (14:04 -0500)]
various: add GLIB_AVAILABLE_IN_ALL everywhere else

Add the GLIB_AVAILABLE_IN_ALL annotation to all old functions (that
haven't already been annotated with the GLIB_AVAILABLE_IN_* macros or a
deprecation macro).

If we discover in the future that we cannot use only one macro on
Windows, it will be an easy sed patch to fix that.

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

11 years agogioenumtypes.h.template: use GLIB_AVAILABLE_IN_ALL
Ryan Lortie [Thu, 6 Dec 2012 18:59:35 +0000 (13:59 -0500)]
gioenumtypes.h.template: use GLIB_AVAILABLE_IN_ALL

glib-mkenums is not currently clever enough to know which version an
enum type was added in, so just mark all the _get_type() functions as
available in all versions.

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

11 years agogversionmacros.h: add GLIB_AVAILABLE_IN_ALL
Ryan Lortie [Thu, 6 Dec 2012 18:34:55 +0000 (13:34 -0500)]
gversionmacros.h: add GLIB_AVAILABLE_IN_ALL

Add a macro to declare that a particular symbol is available in all
versions of GLib.

All newly-added symbols should have proper version macros (like
GLIB_AVAILABLE_IN_2_36) and this macro is less likely to get used 'by
accident' for those than one with a name like GLIB_EXTERN or
GLIB_PUBLIC.

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

11 years agoAdd G_GNUC_PRINTF on all functions with format strings
Henrique Dante de Almeida [Sun, 13 Jan 2013 16:05:14 +0000 (14:05 -0200)]
Add G_GNUC_PRINTF on all functions with format strings

This allows compilation with clang without errors, even when
-Wformat-nonliteral is active (as long as there are no real cases of
non literal formatting).

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

11 years agoAPI: Constify g_get_prgname()
Benjamin Otte [Sun, 13 Jan 2013 17:14:11 +0000 (18:14 +0100)]
API: Constify g_get_prgname()

Found by Mike Gorse while via pygobject freeing the value.

Should have been const according to original commit message.

11 years agoUpdated Galician translations
Fran Diéguez [Sun, 13 Jan 2013 16:39:08 +0000 (17:39 +0100)]
Updated Galician translations

11 years agobuild: Ensure user-set CFLAGS override defaults
Henrique Dante de Almeida [Sun, 13 Jan 2013 14:58:12 +0000 (12:58 -0200)]
build: Ensure user-set CFLAGS override defaults

For example, the user should be able disable our default -Werror
settings.

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

11 years agoGInputStream: fix default g_input_stream_skip_async() logic
Dan Winship [Sat, 12 Jan 2013 22:39:37 +0000 (17:39 -0500)]
GInputStream: fix default g_input_stream_skip_async() logic

g_input_stream_real_skip_async() wants to use read_async() normally,
but will use skip() in a thread instead if it sees that read_async()
will end up using threads. Except that the test for "will read_async()
use threads" never got updated to know about the GPollableInputStream
support in read_async(), so it was doing the wrong thing in that case.
Fix.

Also remove a small bit of pre-GTask cruft noticed nearby.

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

11 years agoUpdated Slovenian translation
Matej Urbančič [Sun, 13 Jan 2013 11:02:42 +0000 (12:02 +0100)]
Updated Slovenian translation

11 years agoUpdated Bulgarian translation
Alexander Shopov [Sat, 12 Jan 2013 18:18:05 +0000 (20:18 +0200)]
Updated Bulgarian translation

11 years agoExpand g_type_init release notes
Matthias Clasen [Sat, 12 Jan 2013 18:02:31 +0000 (13:02 -0500)]
Expand g_type_init release notes

This is in the light of
https://bugzilla.gnome.org/show_bug.cgi?id=691077

11 years agoglocalfile: Only check for .hidden files if standard::is-hidden is requested
Colin Walters [Fri, 11 Jan 2013 16:10:15 +0000 (11:10 -0500)]
glocalfile: Only check for .hidden files if standard::is-hidden is requested

For OSTree, I use Gio and also really care about performance.  It's
disturbing to see open('.hidden') all over my straces and such.  At
the moment I have an explicit set of things to query, as opposed to
"standard::*", since even before this that also implies an lstat() of
the parent directory.

This matches up with what we do for all the other attributes.

See https://bugzilla.gnome.org/show_bug.cgi?id=587806
https://bugzilla.gnome.org/show_bug.cgi?id=691558

11 years agogio-querymodules: Ensure we're linked to GObject
Colin Walters [Thu, 10 Jan 2013 21:25:15 +0000 (16:25 -0500)]
gio-querymodules: Ensure we're linked to GObject

Since we're dynamically loading objects, after the g_type_init()
change, we now need to ensure people building with --as-needed don't
lose the DT_NEEDED on libgobject.

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

11 years agoG_IO_ERROR_INVALID_DATA: fix docstring typo
Will Thompson [Thu, 10 Jan 2013 11:16:47 +0000 (11:16 +0000)]
G_IO_ERROR_INVALID_DATA: fix docstring typo

11 years agoipv6_v4mapped: force pass even if we don't speak IPv4
Antoine Jacoutot [Wed, 9 Jan 2013 15:29:29 +0000 (16:29 +0100)]
ipv6_v4mapped: force pass even if we don't speak IPv4

Some OS (e.g. OpenBSD) do not implement IP v4-mapped addresses. When
this is the case, then we get a "Connection refused", so force the test
to pass to that further tests can run.

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

11 years agoglib-compile-resources: avoid warnings with -Wmissing-field-initializers
Dan Winship [Wed, 9 Jan 2013 15:06:53 +0000 (10:06 -0500)]
glib-compile-resources: avoid warnings with -Wmissing-field-initializers

Initialize all the fields of the generated GStaticResource, to avoid
warnings in packages that build with -Wmissing-field-initializers.

11 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 8 Jan 2013 13:43:21 +0000 (14:43 +0100)]
Updated Spanish translation

11 years agoconfigure.ac: replace obsolete AC_CONFIG_HEADER with with AC_CONFIG_HEADERS
Javier Jardón [Mon, 7 Jan 2013 15:41:19 +0000 (15:41 +0000)]
configure.ac: replace obsolete AC_CONFIG_HEADER with with AC_CONFIG_HEADERS

The former is an obsolete alias to the latter.
It may get removed in the future.

11 years agoAssamese translation updated
Nilamdyuti Goswami [Mon, 7 Jan 2013 12:14:23 +0000 (17:44 +0530)]
Assamese translation updated

11 years agotests/gdatetime: add a missing ; on windows
Dan Winship [Sun, 6 Jan 2013 23:56:39 +0000 (18:56 -0500)]
tests/gdatetime: add a missing ; on windows

11 years agogio/tests: fix a few more gdbus-testserver.py references
Dan Winship [Sun, 6 Jan 2013 22:12:15 +0000 (17:12 -0500)]
gio/tests: fix a few more gdbus-testserver.py references

that got missed in Matthias's earlier patch

11 years agoGFile: Add Btrfs clone ioctl support
Nirbheek Chauhan [Sat, 5 Jan 2013 07:22:31 +0000 (12:52 +0530)]
GFile: Add Btrfs clone ioctl support

The attached patch adds support for the btrfs "clone" ioctl which
makes Copy-on-Write reflinks, resulting in cheap O(1) copies when
source/destination are on the same filesystem. The ioctl itself is
quite straightforward, and GNU coreutils has had support since 7.5
(--reflink=auto --sparse=auto).

The ioctl only operates on regular files and symlinks, and always
follows symlinks; checks have been added accordingly.

This patch would be very useful for everyone who uses btrfs
filesystems (Meego folks for instance). On systems that don't have
btrfs, or if the the source is not on a btrfs filesystem, the ioctl
returns EINVAL, and the fallback code is triggered. Hence this will
cause no problems for non-btrfs users.

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

11 years agoGMemoryInputStream: fix skip_async()
Dan Winship [Sat, 5 Jan 2013 18:26:23 +0000 (13:26 -0500)]
GMemoryInputStream: fix skip_async()

a5876e5f made GMemoryInputStream subclassable, but accidentally broke
read_async() and skip_async() in the process. The immediately
following e7983495 fixed read_async() (and added a test for it), but
skip_async() accidentally got... skipped.

Fix it now and add a test for it.

Also, GMemoryInputStream's skip_async() was assuming that skip() could
never fail, which is true of its own implementation, but might not be
true of a subclass's, so do proper GError handling too.

11 years agogio/tests: Drop superfluous dbus-1 dependencies of gdbus-auth
Rico Tzschichholz [Fri, 4 Jan 2013 20:36:37 +0000 (21:36 +0100)]
gio/tests: Drop superfluous dbus-1 dependencies of gdbus-auth

11 years agogtype: disallow adding interfaces after the fact
Ryan Lortie [Mon, 5 Nov 2012 16:07:16 +0000 (11:07 -0500)]
gtype: disallow adding interfaces after the fact

Add a check to prevent adding an interface to a class that has already
had its class_init done.

This is an incompatible change but it is suspected that there are not
many users of this functionality.  Two known exceptions are pygobject
(fixed in bug 686149) and our own testsuite (affected tests have been
temporarily disabled by this patch).

Once we confirm that nobody else is using this functionality we can
remove a rather large amount of code for dealing with this case.

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

11 years agogio/tests: Fix make dist
Rico Tzschichholz [Fri, 4 Jan 2013 19:37:27 +0000 (20:37 +0100)]
gio/tests: Fix make dist

Missing bit of 32c925427785895ce156f4bb428082e1952d2407

11 years agoRevert "gtype: disallow adding interfaces after the fact"
Rico Tzschichholz [Fri, 4 Jan 2013 19:25:46 +0000 (20:25 +0100)]
Revert "gtype: disallow adding interfaces after the fact"

This reverts commit d6a075b0d8dfe4e4a41f6624ad7032d2163d420c.

11 years agoImprove g_cond_wait docs
Matthias Clasen [Fri, 4 Jan 2013 13:27:00 +0000 (08:27 -0500)]
Improve g_cond_wait docs

Document that the mutex is locked upon return.
https://bugzilla.gnome.org/show_bug.cgi?id=691110

11 years agoRemove deprecated AM_PROG_CC_STDC
Marko Lindqvist [Fri, 4 Jan 2013 00:21:35 +0000 (19:21 -0500)]
Remove deprecated AM_PROG_CC_STDC

Fixes automake 1.13 build.

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

11 years agoIn gdbus-auth test, use g_unsetenv(), not g_setenv() with a NULL value
David Zeuthen [Thu, 3 Jan 2013 18:34:21 +0000 (13:34 -0500)]
In gdbus-auth test, use g_unsetenv(), not g_setenv() with a NULL value

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoDrop gdbus-testserver.py
Matthias Clasen [Thu, 3 Jan 2013 18:13:50 +0000 (13:13 -0500)]
Drop gdbus-testserver.py

The tests are using the C version of gdbus-testserver now.
This means we no longer rely on dbus-python for 'make check'.
https://bugzilla.gnome.org/show_bug.cgi?id=675856

11 years agoUse the C gdbus-testserver in tests
Matthias Clasen [Thu, 3 Jan 2013 18:12:58 +0000 (13:12 -0500)]
Use the C gdbus-testserver in tests

11 years agoAdd a C version of gdbus-testserver.py
Matthias Clasen [Thu, 3 Jan 2013 18:11:58 +0000 (13:11 -0500)]
Add a C version of gdbus-testserver.py

This will let us drop the dbus-python dependency.
The C version does not 100% reproduce all the hash table
and array manipulation of the python version, but the tests
do not rely on it anyway.

11 years agoGDBus: Avoid use of libdbus-1 in authentication tests
David Zeuthen [Thu, 3 Jan 2013 16:57:21 +0000 (11:57 -0500)]
GDBus: Avoid use of libdbus-1 in authentication tests

This greatly simplifies the test since everything is now in a single
process and possible bugs / quirks in libdbus-1 will not interfere
with the tests. On the other hand, we no longer test interoperability
with libdbus-1. This is somewhat moot, however, since other tests that
involve a message bus (e.g. GTestDBus users which include most of the
GDBus test suite itself) will test this.

Also ensure that we don't pollute existing D-Bus keyrings for the
DBUS_COOKIE_SHA1 authentication method (e.g. files in the
~/.dbus-keyrings directory) by setting the environment variables
G_DBUS_COOKIE_SHA1_KEYRING_DIR and
G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION.

All in all, this change avoids some thorny issues where the GDBus and
libdbus-1 implementations disagree on whether an item in the D-Bus
keyring is still valid (items have an age etc.). In reality, since the
DBUS_COOKIE_SHA1 authentication method is never used in production,
this is never hit in production. This bug was, however, frequently hit
if you just ran the test suite repeatedly for 15 minutes or so.

Also add TODO items to mention that we currently don't test corner
cases involving

 - DBUS_COOKIE_SHA1 timeouts
 - libdbus-1 interoperability

Signed-off-by: David Zeuthen <zeuthen@gmail.com>
11 years agoGValueArray: clarify the deprecation warnings
Dan Winship [Wed, 2 Jan 2013 18:00:48 +0000 (13:00 -0500)]
GValueArray: clarify the deprecation warnings

GValueArray as a whole is deprecated in favor of GArray (with GValue
elements); warnings like "'g_value_array_get_nth' is deprecated: Use
'g_array_index' instead" are confusing because they suggest that the
GArray functions can be used with GValueArrays. Make them say "Use
'GArray' instead" instead.

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

11 years agoFix build with --enable-gtk-doc
Dieter Verfaillie [Wed, 2 Jan 2013 12:10:31 +0000 (13:10 +0100)]
Fix build with --enable-gtk-doc

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

11 years agoAdd a --with-python option
Matthias Clasen [Tue, 1 Jan 2013 20:49:06 +0000 (15:49 -0500)]
Add a --with-python option

The effect is the same as specifying PYTHON=python3, but a
configure option works better in jhbuild.
https://bugzilla.gnome.org/show_bug.cgi?id=684103

11 years agoMove testgobject to tests/
Matthias Clasen [Tue, 1 Jan 2013 19:06:20 +0000 (14:06 -0500)]
Move testgobject to tests/

And fix it to actually check the right things.

11 years agoImprovde #include order consistency
Matthias Clasen [Tue, 1 Jan 2013 18:54:54 +0000 (13:54 -0500)]
Improvde #include order consistency

This was mostly fixed already, just re-fix a few details here.
https://bugzilla.gnome.org/show_bug.cgi?id=71704

11 years agoAnnotate GApplication::local_command_line
Paolo Borelli [Thu, 27 Dec 2012 19:55:30 +0000 (20:55 +0100)]
Annotate GApplication::local_command_line

Also add some documentation.
https://bugzilla.gnome.org/show_bug.cgi?id=690670

11 years agogmarkup: Make GMarkupParseContext a boxed type
Jasper St. Pierre [Tue, 3 Jul 2012 19:14:18 +0000 (15:14 -0400)]
gmarkup: Make GMarkupParseContext a boxed type

At the same time, add a refcount and public ref/unref methods.
This makes it usable from introspectable.

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

11 years agoDrop a broken link
Matthias Clasen [Tue, 1 Jan 2013 15:25:07 +0000 (10:25 -0500)]
Drop a broken link

The GSettings migration docs had a link to the no-longer existing
gsettings-tutorial branch of gnome-utils. Remove it.
https://bugzilla.gnome.org/show_bug.cgi?id=690043

11 years agogutils: move G_END_DECLS to the end of gutils.h
Michael Henning [Sun, 30 Dec 2012 04:57:23 +0000 (23:57 -0500)]
gutils: move G_END_DECLS to the end of gutils.h

Previously, some declarations near the bottom came after the
G_END_DECLS, causing linker errors for C++ users that called those
functions.

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

11 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 31 Dec 2012 11:20:07 +0000 (12:20 +0100)]
Updated Spanish translation

11 years agoFix up the gschema.dtd
Matthias Clasen [Sat, 29 Dec 2012 05:22:34 +0000 (00:22 -0500)]
Fix up the gschema.dtd

This DTD wasn't syntactically correct, and didn't actually
describe keys correctly. This change makes it a bit too lax,
but at least it can be used now.
https://bugzilla.gnome.org/show_bug.cgi?id=690538

11 years agoRemove a failing test
Matthias Clasen [Sat, 29 Dec 2012 05:03:09 +0000 (00:03 -0500)]
Remove a failing test

Since we stripped g_credentials_set_pid(), the test for
g_credentials_get_pid() can't succeed anymore, so remove it.

11 years agoAdding test coverage for GTestDBus activating in-tree services.
Tristan Van Berkom [Thu, 20 Dec 2012 06:34:22 +0000 (15:34 +0900)]
Adding test coverage for GTestDBus activating in-tree services.

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

11 years agoMove single-include guards inside include guards
Matthias Clasen [Fri, 28 Dec 2012 04:43:14 +0000 (23:43 -0500)]
Move single-include guards inside include guards

gcc has optimizations for include guards that only work
if they are outermost in the the header.
https://bugzilla.gnome.org/show_bug.cgi?id=689810

11 years agoAdd g_application_command_line_get_stdin()
Ryan Lortie [Wed, 18 Jan 2012 19:37:37 +0000 (14:37 -0500)]
Add g_application_command_line_get_stdin()

This returns a GInputStream corresponding to the stdin on the
commandline that caused this invocation.

The local case works on both UNIX (GUnixInputStream on stdin) and
Windows (GWin32InputStream on GetStdHandle(STD_INPUT_HANDLE)).  The
remote case works only on UNIX (by fd passing over D-Bus).

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

11 years ago[l10n] Updated Estonian translation
Mattias Põldaru [Thu, 27 Dec 2012 14:37:24 +0000 (16:37 +0200)]
[l10n] Updated Estonian translation

11 years agoUpdated Galician translations
Fran Diéguez [Mon, 24 Dec 2012 21:53:03 +0000 (22:53 +0100)]
Updated Galician translations

11 years agoUpdated Greek translation
Dimitris Spingos [Mon, 24 Dec 2012 15:23:17 +0000 (17:23 +0200)]
Updated Greek translation

11 years agoUpdated Norwegian bokmål translation
Kjartan Maraas [Sun, 23 Dec 2012 16:38:45 +0000 (17:38 +0100)]
Updated Norwegian bokmål translation

11 years agoUpdated Slovak translation
Peter Mráz [Sun, 23 Dec 2012 13:32:58 +0000 (14:32 +0100)]
Updated Slovak translation

11 years agoUpdated Polish translation
Piotr Drąg [Sun, 23 Dec 2012 03:28:23 +0000 (04:28 +0100)]
Updated Polish translation

11 years agoUpdated Hebrew translation.
Yaron Shahrabani [Thu, 20 Dec 2012 12:24:17 +0000 (14:24 +0200)]
Updated Hebrew translation.

11 years agoUpdated Spanish translation
Daniel Mustieles [Thu, 20 Dec 2012 10:08:39 +0000 (11:08 +0100)]
Updated Spanish translation

11 years agoAssamese translation updated
Nilamdyuti Goswami [Thu, 20 Dec 2012 08:18:11 +0000 (13:48 +0530)]
Assamese translation updated

11 years agoRevert "gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()"
Matthias Clasen [Wed, 19 Dec 2012 20:20:45 +0000 (15:20 -0500)]
Revert "gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()"

This reverts commit e3a29184d56b3a65664eb8859e61afbc804497c8.

11 years agoRevert "tests: port from g_test_trap_subprocess() to g_test_trap_fork()"
Matthias Clasen [Wed, 19 Dec 2012 20:20:37 +0000 (15:20 -0500)]
Revert "tests: port from g_test_trap_subprocess() to g_test_trap_fork()"

This reverts commit ea06ec80634ff8f22882f3bc92effb10ac294e41.

11 years agoRevert "gtestutils: fix "-p" logic"
Matthias Clasen [Wed, 19 Dec 2012 20:20:31 +0000 (15:20 -0500)]
Revert "gtestutils: fix "-p" logic"

This reverts commit 723a8f55880f1e7bf1b475901ce40e6cd443b72d.

11 years agoRevert "tests/option-context: fix under --verbose"
Matthias Clasen [Wed, 19 Dec 2012 20:20:20 +0000 (15:20 -0500)]
Revert "tests/option-context: fix under --verbose"

This reverts commit 80253cd71007975946a084697ccec9891102a3e7.

11 years agoRevert "tests/protocol: redo a bit"
Matthias Clasen [Wed, 19 Dec 2012 20:20:13 +0000 (15:20 -0500)]
Revert "tests/protocol: redo a bit"

This reverts commit 8d9969fe15f2afc0c13b5d20a3103df666d68934.

11 years agoRevert "tests/spawn-*.c: fix on Windows"
Matthias Clasen [Wed, 19 Dec 2012 20:20:05 +0000 (15:20 -0500)]
Revert "tests/spawn-*.c: fix on Windows"

This reverts commit 602714a8dae08e395c8834aa059375de7dd877c0.

11 years agoCheck that credentials pass through D-Bus on supported platforms
Simon McVittie [Thu, 8 Nov 2012 14:09:23 +0000 (14:09 +0000)]
Check that credentials pass through D-Bus on supported platforms

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

11 years agoGCredentials: add a regression test
Simon McVittie [Thu, 8 Nov 2012 14:08:44 +0000 (14:08 +0000)]
GCredentials: add a regression test

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

11 years agoGCredentials: add getter/setter for the Unix process ID
Simon McVittie [Thu, 8 Nov 2012 14:08:24 +0000 (14:08 +0000)]
GCredentials: add getter/setter for the Unix process ID

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

11 years agotests/spawn-*.c: fix on Windows
Dan Winship [Sun, 25 Nov 2012 18:52:20 +0000 (13:52 -0500)]
tests/spawn-*.c: fix on Windows

Need to append ".exe" to the spawned binary name on Windows

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

11 years agotests/protocol: redo a bit
Dan Winship [Sun, 25 Nov 2012 16:50:09 +0000 (11:50 -0500)]
tests/protocol: redo a bit

Rather than overloading --verbose, just skip the tests that aren't
supposed to be run in the parent process (so that if you do run the
toplevel test with --verbose, it doesn't immediately error out).

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

11 years agotests/option-context: fix under --verbose
Dan Winship [Sun, 25 Nov 2012 16:42:59 +0000 (11:42 -0500)]
tests/option-context: fix under --verbose

We need to always pass G_TEST_TRAP_SILENCE_STDERR/STDOUT, or else
we can't check that they contained the right text later.

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

11 years agogtestutils: fix "-p" logic
Dan Winship [Sat, 25 Aug 2012 15:54:31 +0000 (11:54 -0400)]
gtestutils: fix "-p" logic

If you had two tests "/foo/bar" and "/foo/bar/baz", and ran the test
program with "-p /foo/bar/baz", it would run "/foo/bar" too. Fix that.
And add a test to tests/testing for it.

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

11 years agotests: port from g_test_trap_subprocess() to g_test_trap_fork()
Dan Winship [Sat, 24 Nov 2012 21:34:13 +0000 (16:34 -0500)]
tests: port from g_test_trap_subprocess() to g_test_trap_fork()

(or, in a few cases, to g_test_expect_message())

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

11 years agogtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()
Dan Winship [Sat, 24 Nov 2012 20:58:27 +0000 (15:58 -0500)]
gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()

g_test_trap_fork() doesn't work on Windows and is potentially flaky on
unix anyway given the fork-but-don't-exec. Replace it with
g_test_trap_subprocess(), which re-spawns the same program with
arguments telling it to run a specific (otherwise-ignored) test case.

Make the existing g_test_trap_fork() unit tests be unix-only (they
never passed on Windows anyway), and add a parallel set of
g_test_trap_subprocess() tests.

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

11 years agoAdd missing autoconf test for sysctlbyname()
Daniel Macks [Sat, 1 Dec 2012 19:23:01 +0000 (14:23 -0500)]
Add missing autoconf test for sysctlbyname()

uses specific mib[] tokens iff it is available, but configure wasn't
testing for it to be available.

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

11 years agoFix constant type to match assigned variable type
Daniel Macks [Thu, 29 Nov 2012 15:33:47 +0000 (10:33 -0500)]
Fix constant type to match assigned variable type

Some compilers assume a literal value is a certain byte-length without
checking the type to which it is being assigned, giving a compile-time
warning: a default of 'long' is a mismatch when assigning to a guint64
when the latter is a 'long long'. Use one of glib's standard macros to
specify the type of the constant to match the variable type.

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

11 years agoinotify: fix compile
Dan Winship [Wed, 19 Dec 2012 14:10:01 +0000 (09:10 -0500)]
inotify: fix compile

11 years agotimezone: Fix byte arithmetic
Emmanuele Bassi [Wed, 19 Dec 2012 11:03:24 +0000 (11:03 +0000)]
timezone: Fix byte arithmetic

Use guint8* instead of gpointer, to avoid warnings and side effects.

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

11 years agotests: multiple fixes to run-assert-msg-test.sh
Dan Winship [Mon, 19 Nov 2012 21:18:55 +0000 (16:18 -0500)]
tests: multiple fixes to run-assert-msg-test.sh

1) use "../libtool" rather than "libtool" to avoid problems
with wacky OS X not-actually-libtool

2) Use libtool on the libtool script, not the binary, so that it
actually does anything

3) Don't use "gdb --ex" since it's apparently new-ish/non-portable.

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

11 years agoAdd "Since 2.36" to G_FILE_MONITOR_WATCH_HARD_LINKS doc
Dan Winship [Wed, 19 Dec 2012 13:22:23 +0000 (08:22 -0500)]
Add "Since 2.36" to G_FILE_MONITOR_WATCH_HARD_LINKS doc

11 years agogio + inotify support for hard links
Ryan Lortie [Wed, 18 Nov 2009 23:59:14 +0000 (17:59 -0600)]
gio + inotify support for hard links

Add a new GFileMonitorFlag: G_FILE_MONITOR_WATCH_HARD_LINKS.  When set,
changes made to the file via another hard link will be detected.

Implement the new flag for the inotify backend.

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

11 years agoBug 633117: glib fails tests if /etc/localtime is not properly set
John Ralls [Wed, 19 Dec 2012 00:40:08 +0000 (00:40 +0000)]
Bug 633117: glib fails tests if /etc/localtime is not properly set

11 years agoGTimeZone interval_info: Fix interval 0 per IANA tzfile instructions
John Ralls [Tue, 18 Dec 2012 23:41:09 +0000 (15:41 -0800)]
GTimeZone interval_info: Fix interval 0 per IANA tzfile instructions

IANA tzfiles don't always put standard time in the 0th t_info. Follow
their instructions to use the first standard time t_info for interval 0.

11 years agotest_posix_parse: PST8PDT passes on Unix because it names an IANA zone.
John Ralls [Tue, 18 Dec 2012 23:40:43 +0000 (15:40 -0800)]
test_posix_parse: PST8PDT passes on Unix because it names an IANA zone.

11 years agoMSWindows TimeZone Support: Refactor and rewrite TZ variable parsing
John Ralls [Mon, 17 Dec 2012 21:35:10 +0000 (13:35 -0800)]
MSWindows TimeZone Support: Refactor and rewrite TZ variable parsing

11 years agoTest the TZ-variable parsing functions
John Ralls [Tue, 11 Dec 2012 21:42:05 +0000 (13:42 -0800)]
Test the TZ-variable parsing functions

11 years agoImplement and test time zone name/abbrev setting for Windows.
John Ralls [Fri, 7 Dec 2012 01:16:50 +0000 (17:16 -0800)]
Implement and test time zone name/abbrev setting for Windows.

11 years agoWin32 TimeZone Support: General refactoring
John Ralls [Tue, 4 Dec 2012 18:51:48 +0000 (10:51 -0800)]
Win32 TimeZone Support: General refactoring

For code clarity and to pass tests

11 years agoAdd MSWindows timezone names to test new windows support.
John Ralls [Tue, 4 Dec 2012 19:13:04 +0000 (11:13 -0800)]
Add MSWindows timezone names to test new windows support.

11 years agoGTimeZone: Fix time zones in Windows
Arnel A. Borja [Sat, 20 Oct 2012 03:06:28 +0000 (11:06 +0800)]
GTimeZone: Fix time zones in Windows

Get time zone information from registry. Use GetTimeZoneInformation()
instead to get the local time zone if Dynamic DST is not available.

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

11 years agoGTimeZone: Parse Windows format for TZ
Arnel A. Borja [Mon, 15 Oct 2012 03:07:16 +0000 (11:07 +0800)]
GTimeZone: Parse Windows format for TZ

Parse the "tzn[+|-]hh[:mm[:ss]][dzn]" format used in Windows for
environment variable TZ.

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

11 years agoGTimeZone: Parse POSIX format for TZ
Arnel A. Borja [Sat, 20 Oct 2012 06:10:43 +0000 (14:10 +0800)]
GTimeZone: Parse POSIX format for TZ

Parse the "std offset [dst [offset],start[/time],end[/time]]" (POSIX)
format used in Unix for environment variable TZ.

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

11 years agoGTimeZone: Add initialization functions for rules
Arnel A. Borja [Sun, 21 Oct 2012 03:26:21 +0000 (11:26 +0800)]
GTimeZone: Add initialization functions for rules

Add functions to initialize a GTimeZone from rules.

11 years agoGTimeZone: Parse more offset formats
Arnel A. Borja [Mon, 15 Oct 2012 02:57:09 +0000 (10:57 +0800)]
GTimeZone: Parse more offset formats

Allow more formats for offset. Parse seconds in offsets too. Make offset
signs optional.

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

11 years agoReplace zoneinfo pointers with structs
John Ralls [Mon, 15 Oct 2012 21:32:58 +0000 (14:32 -0700)]
Replace zoneinfo pointers with structs

The approach of sucking a zoneinfo file into a GBytes and working with
pointers into it might be fast, but it's obtuse and not compatible with
Microsoft Windows.

11 years agoExtract function init_zone_from_iana_info
John Ralls [Mon, 15 Oct 2012 21:19:53 +0000 (14:19 -0700)]
Extract function init_zone_from_iana_info

11 years agoExtract function zone_info_unix
John Ralls [Mon, 15 Oct 2012 21:11:14 +0000 (14:11 -0700)]
Extract function zone_info_unix