Commit Graph

19883 Commits

Author SHA1 Message Date
Philip Withnall
49fe320909 docs: Add indexes for symbols added in 2.60
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 13:23:40 +00:00
Philip Withnall
93f3202a61 docs: Add various missing symbols to glib-sections.txt
As listed in glib-unused.txt.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:37:27 +00:00
Philip Withnall
e51ed49ac3 docs: Ignore some private header files
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:37:09 +00:00
Philip Withnall
1a46bf88bb docs: Add missing documentation for warnings and assertions
These symbols were listed in glib-undocumented.txt. Thanks gtk-doc.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-23 12:19:19 +00:00
Philip Withnall
a39b847ddf tests: Run appinfo tests with a temporary XDG_CONFIG_HOME
Otherwise they fill your real ~/.config/mimeapps.list with rubbish and
race for access to it. This is arguably not good.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1514
2018-11-23 11:27:50 +00:00
Philip Withnall
0c7492750a Merge branch 'wip/rishi/gdbus-codegen-deprecated' into 'master'
gdbus-codegen: Tag interfaces and properties so annotated with G_PARAM_DEPRECATED

See merge request GNOME/glib!485
2018-11-23 10:02:09 +00:00
Debarshi Ray
326a7fafe2 gio/tests/gdbus-test-codegen: Ensure that G_PARAM_DEPRECATED is present
https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:38:28 +01:00
Debarshi Ray
53573d98f5 gdbus-codegen: Tag interfaces so annotated with G_PARAM_DEPRECATED
If a D-Bus interface was annotated with o.fd.DBus.Deprecated, then the
corresponding GObject property, in the common GInterface implemented
by the generated GDBusObjectProxies and GDBusObjectSkeletons, to
access the generated code for the D-Bus interface was not being marked
with G_PARAM_DEPRECATED, even though the gtk-doc snippet had the
'Deprecated: ' tag.

G_PARAM_DEPRECATED is older than gdbus-codegen, 2.26 and 2.30
respectively, hence it can be used unconditionally.

https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:38:28 +01:00
Philip Withnall
10be7824a1 Merge branch 'zlib' into 'master'
Check for zlib header

See merge request GNOME/glib!486
2018-11-23 09:28:03 +00:00
Debarshi Ray
52ce05aaa7 gdbus-codegen: Tag properties so annotated with G_PARAM_DEPRECATED
If a D-Bus interface has a property that's annotated with
o.fd.DBus.Deprecated, then the corresponding GObject property was not
being marked with G_PARAM_DEPRECATED, even though the gtk-doc snippet
had the 'Deprecated: ' tag.

G_PARAM_DEPRECATED is older than gdbus-codegen, 2.26 and 2.30
respectively, hence it can be used unconditionally.

https://gitlab.gnome.org/GNOME/glib/merge_requests/485
2018-11-23 10:18:52 +01:00
Xavier Claessens
c49ed610ed Check for zlib header
It is not enough to check for the library, we also need zlib.h installed
to be able to use it. Autotools were also checking for the header.
2018-11-22 20:14:30 -05:00
Michael Catanzaro
1fb31a16c3 Merge branch 'wip/lantw/use-weak-symbols-in-gvdb' into 'master'
build: Use weak bindings in gvdb to fix linking with LLD

Closes dconf#47

See merge request GNOME/gvdb!2
2018-11-21 16:48:01 +00:00
Ting-Wei Lan
e1bcd7529e build: Use weak bindings in gvdb to fix linking with LLD
Since tests/dconf-mock-gvdb.c has functions conflicting with the real
gvdb and it is intended for the former to override the latter in tests,
we have to make functions in gvdb library have weak bindings instead of
the default strong bindings to avoid duplicate symbol errors.

Fixes https://gitlab.gnome.org/GNOME/dconf/issues/47
2018-11-22 00:38:09 +08:00
Philip Withnall
b660a67cb3 Merge branch 'mcatanzaro/tls1.3-handshake' into 'master'
Deprecate TLS rehandshaking

See merge request GNOME/glib!478
2018-11-21 12:09:22 +00:00
Michael Catanzaro
85f7d493d7 Deprecate TLS rehandshake APIs
Allowing unsafe rehandshakes used to be required for web compatibility,
but this is no longer a concern in 2018. So there should no longer be
compatibility benefits to calling this function. All it does is make
your TLS connection insecure.

Also, rehandshaking no longer exists at all in TLS 1.3.

At some point (maybe soon!) glib-networking will begin ignoring the
rehandshake mode, so let's deprecate it now.
2018-11-20 22:07:58 -06:00
Michael Catanzaro
2031e37dfc Update documentation of g_tls_connection_handshake() one last time
Let's entirely deprecate calling this function for rehandshaking. The
current documentation is OK, but guarantees defined behavior (to attempt
a rehandshake) when TLS 1.2 is in use. But there's no way to force TLS
1.2, and also no way to check which version of TLS is in use. I really
should have deprecated use of this function for rehandshaking entirely
last time I updated it.

Fortunately, there should be no compatibility risk for existing code,
because rehandshaking has no visible effects at the API level.
2018-11-20 22:04:50 -06:00
Xavier Claessens
f54b48b3e6 Merge branch 'master' into 'master'
meson: Turn selinux into a meson feature and make it auto by default

See merge request GNOME/glib!483
2018-11-20 19:14:52 +00:00
Thibault Saunier
8cc92bcca6 meson: Turn selinux into a meson feature and make it auto by default
Making it more user friendly when building on distro no deploying selinux
2018-11-20 15:58:58 -03:00
Xavier Claessens
7412011716 Meson: Add 'nls' option to disable translation
It is not always needed to generate and install gmo files, for example
when building for Android or Windows that often doesn't have libintl to
use them anyway.

At least all GStreamer modules have this same option.
2018-11-20 11:35:14 -05:00
Philip Withnall
23f286e040 Merge branch 'libz-fallback' into 'master'
Check for 'z' library before fallbacking to subproject

See merge request GNOME/glib!482
2018-11-19 22:38:57 +00:00
Xavier Claessens
e50f219462 Merge branch '1594-dbus-docs' into 'master'
gdbusconnection: Add missing (nullable) annotation to get_unique_name()

Closes #1594

See merge request GNOME/glib!475
2018-11-19 21:57:19 +00:00
Xavier Claessens
2ded434b40 Check for 'z' library before fallbacking to subproject 2018-11-19 15:22:16 -05:00
Philip Withnall
11847b831e Merge branch 'g-once-data-race' into 'master'
gthread: Remove unsynchronized access to g_once_init_list from assertion

See merge request GNOME/glib!477
2018-11-19 19:11:41 +00:00
Tomasz Miąsko
c2b22bd615 gthread: Synchronize access to g_once_init_list 2018-11-19 19:41:50 +01:00
Emmanuele Bassi
9874006e8f Merge branch 'patch-1' into 'master'
docs: add a missing semicolon

See merge request GNOME/glib!480
2018-11-18 12:29:56 +00:00
eyelash
fccce84d93 docs: add a missing semicolon 2018-11-18 08:05:28 +00:00
Philip Withnall
8a96fca390 Merge branch 'autolist-chainup' into 'master'
Add support for g_auto(s)list to G_DECLARE'd types

See merge request GNOME/glib!413
2018-11-15 10:25:41 +00:00
Philip Withnall
5cc6942eab gdbusconnection: Add missing (nullable) annotation to get_unique_name()
Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1594
2018-11-15 09:42:33 +00:00
Philip Withnall
c2607ab321 glib.supp: Make a suppression less specific
Sometimes valgrind doesn’t count the calloc() call at the innermost
stack frame, and counts it as g_type_create_instance() instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-15 09:27:24 +00:00
Philip Withnall
0ff5e5cd32 gdbusmessage: Gracefully handle message signatures with invalid types
With the changes to limit GVariant type nesting (commit 7c4e6e9fbe),
it’s now possible to have a valid type signature which is not a valid
GVariant type when enclosed in parentheses (to make it a tuple).

Check for that when parsing the signature field in a D-Bus message.

Includes a unit test.

oss-fuzz#11120

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-15 09:22:38 +00:00
Marco Trevisan (Treviño)
8d42b0246b gobject, tests: add tests for autoptr (and lists) with declared
Add tests using an object declared with G_DECLARE_FINAL_TYPE, that is derived
from another, declared using G_DECLARE_DERIVABLE_TYPE, and that
thus uses _GLIB_DEFINE_AUTOPTR_CHAINUP to define cleanup functions.

And verify that both g_autoptr(Type) and g_auto(s)list(Type) work
2018-11-14 22:47:39 -06:00
Marco Trevisan (Treviño)
86c073dba9 gmacros: remove duplication on autoptr cleanup definition
Define _GLIB_DEFINE_AUTOPTR_CLEANUP_FUNCS and reuse it for both
_GLIB_DEFINE_AUTOPTR_CHAINUP and G_DEFINE_AUTOPTR_CLEANUP_FUNC
2018-11-14 22:47:39 -06:00
Marco Trevisan (Treviño)
d58be1bda9 gmacros: make _GLIB_DEFINE_AUTOPTR_CHAINUP to define funcs for g_autolist
Also chainup to glib_(s)listautoptr_cleanup_* parent functions
to make g_autolist work with object defined in this way
2018-11-14 14:41:40 -06:00
Xavier Claessens
9534447eb0 Merge branch 'fix-gio-test-build' into 'master'
Meson: Fix build error in gdbus-example-objectmanager

See merge request GNOME/glib!461
2018-11-14 15:37:05 +00:00
Xavier Claessens
ba2c519819 Meson: Rename test_c_args to avoid confusion with gio tests c_args 2018-11-14 09:38:33 -05:00
Xavier Claessens
a72766bb9c Merge branch 'master' into 'master'
meson: add aarch64 memory barrier handling

See merge request GNOME/glib!462
2018-11-13 18:47:29 +00:00
Philip Withnall
6375476743 Merge branch 'gmain-tsan' into 'master'
gmain: Fix data races in GUnixSignalWatchSource and GChildWatchSource

See merge request GNOME/glib!446
2018-11-13 16:04:12 +00:00
Niclas Moeslund Overby
704522c5fd meson: add aarch64 memory barrier handling
memory barriers for aarch64 ref: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/CJAIAJFI.html
2018-11-13 17:00:09 +01:00
Philip Withnall
9e5a8ba22e Merge branch 'gdate-parse-month' into 'master'
gdate: Use longest matching month name in g_date_set_parse

Closes #1343

See merge request GNOME/glib!433
2018-11-13 15:00:36 +00:00
Tomasz Miąsko
dd36cf3a8b gmain: Indicate atomic fields with a comment 2018-11-13 14:57:45 +01:00
Tomasz Miąsko
969b0e00b3 gmain: Guarantee handler dispatch after receiving UNIX signal
Guarantee that user signal callback is dispatched _after_ receiving a
signal as long as the handler expresses continued interest in receiving
such a notification.

Previously if a signal has been received during user callback dispatch
but before pending flag had been cleared then the signal would be
irrevocably lost.

This is a very useful guarantee to have in cases where signals are used
to signify a need for synchronization with external resources. For
example: reloading configuration file after SIGUSR1 or retrieving a
terminal size after SIGWINCH.
2018-11-13 14:57:27 +01:00
Tomasz Miąsko
9e652f94d2 gmain: Make GUnixSignalWatchSource pending field atomic
Ensure synchronization between prepare / check /dispatch of
GUnixSignalWatchSource and UNIX signal dispatcher by making operations
on `pending` field atomic.

Issue #1312.
2018-11-13 14:57:22 +01:00
Philip Withnall
6f84f6823b Merge branch 'mr285-subscription-docs' into 'master'
docs: Clarify return/error behaviour of D-Bus signal subscriptions

See merge request GNOME/glib!470
2018-11-13 13:57:02 +00:00
Tomasz Miąsko
d2fd53df03 gmain: Make GChildWatchSource child_exited field atomic
Ensure synchronization between prepare / check of GChildWatchsource and
UNIX signal dispatcher by making operations on `child_exited` field
atomic. Use `child_exited` as publication flag for `child_status`.

Issue #1312.
2018-11-13 14:52:50 +01:00
Tomasz Miąsko
1c8f3c67c3 gmain: Remove redundant volatile from unix_signal_refcount
Acesss to unix_signal_refcount is protected by unix_signal_lock.
2018-11-13 14:52:50 +01:00
Tomasz Miąsko
ba18822f35 gdate: Use longest matching month name in g_date_set_parse
There are languages where a name of one month is a substring of another.
Instead of stopping search on the first match use the month that
constitutes the longest match.

Fixes #1343.
2018-11-13 14:43:34 +01:00
Philip Withnall
e0148985f3 Merge branch 'tests-tsan' into 'master'
tests: Fix some data races in tests

See merge request GNOME/glib!453
2018-11-13 13:12:38 +00:00
Philip Withnall
2a52ff1c7c Merge branch 'settings-list-does-not-exist' into 'master'
Clarify docs for g_settings_list_children

Closes #1362

See merge request GNOME/glib!465
2018-11-13 12:54:41 +00:00
Philip Withnall
c63d37fdc2 docs: Clarify return/error behaviour of D-Bus signal subscriptions
Based on a patch by David Sommerseth, from
https://gitlab.gnome.org/GNOME/glib/merge_requests/285/.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2018-11-13 12:44:34 +00:00
Philip Withnall
b323635d79 Merge branch 'wjt/g-file-info-filesystem-readonly-fails' into 'master'
Improve tests/g-file-info-filesystem-readonly, and run it in CI.

Closes #1590

See merge request GNOME/glib!466
2018-11-13 12:38:18 +00:00