Commit Graph

20476 Commits

Author SHA1 Message Date
Philip Withnall
1888deecfc Merge branch 'glib.fixtools.i18n' into 'master'
Tools: Correctly show translated messages on more recent Visual Studio builds

Closes #1169

See merge request GNOME/glib!895
2019-06-18 10:18:31 +00:00
Philip Withnall
b9e27b77ad Merge branch 'wip/chergert/marshall-matters' into 'master'
gio: specify proper c_marshaller and va_marshallers

See merge request GNOME/glib!877
2019-06-18 10:07:59 +00:00
Chun-wei Fan
3046f7b3bb gio-tool.c: Don't hardcode localedir on Windows
We ought to construct the localedir based on the location of the GLib
DLL, like what the other tools do.
2019-06-18 17:29:41 +08:00
Chun-wei Fan
9f709fe1e9 gio tools: Use the proper string for default locale for setlocale()
This makes use of the string we now have from glib-private.h in the
last commit so that setlocale() sets the default system locale
correctly and therefore show the translated messages properly.

Fixes issue #1169.
2019-06-18 17:29:41 +08:00
Chun-wei Fan
3e5d1bd6ff glib-private.h: Set the appropriate string for setlocale()
On Windows, in particular the CRTs on and after Visual Studio 2012, it
is not enough just to do setlocale (LC_ALL, "") to set the default
system locale, which results in the tools that use the translated
messages to show unreadable messages when running the commmand line
tools.

This adds an entry in glib-private.h.in which denotes the appropriate
string to use for setlocale() to set the default system locale by
setting it to ".ACP" if we are building on Windows and "" for
other systems (as we are doing now).

The tools in gio/ will be updated in the next commit to make use of this
entry so that the translated messages can be shown correctly.
2019-06-18 17:29:36 +08:00
Philip Withnall
8c990d9889 Merge branch 'fix-refcount-macro-non-gcc' into 'master'
glib/tests/refcount.c: Fix tests on non-GCC-isque compilers

See merge request GNOME/glib!919
2019-06-18 09:03:12 +00:00
Emmanuel Fleury
ca7a29e8e0 gdbus: proxy : Strip remote error on activation failure
Original patch proposed by Christian Persch

Related to issue #804
2019-06-18 10:54:09 +02:00
Chun-wei Fan
bf40b7c746 glib/tests/refcount.c: Only expect saturation tests to pass on GCC
From grefcount.h, in order to disable warnings when G_DISABLE_CHECKS is
defined, we need to make use of the GCC-isque-only __extension__ for it
to work.  This means that in the saturation tests, we can only expect no
warnings to show if we are building on GCC-isque compilers with
G_DISABLE_CHECKS defined.

This will fix the refcount-macro test on Visual Studio builds at least.
2019-06-18 16:42:51 +08:00
Christian Hergert
22ba4411cc gio: remove use of generic marshaller from GIO objects
Using the generic marshaller has drawbacks beyond performance. One such
drawback is that it breaks the stack unwinding from the Linux kernel due
to having unsufficient data to walk past ffi_call_unixt64. That means that
performance profiling by application developers looks grouped among
seemingly unrelated code paths.

While we can't fix the kernel unwinding here, we can provide proper
c_marshallers and va_marshallers for objects within Gio so that
performance profiling of applications is more reliable.

Related to GNOME/Initiatives#10
2019-06-17 16:29:09 -07:00
Christian Hergert
273c00f620 gio: ensure default va_marshaller is used
If c_marshaller is provided during g_signal_new() registration, the
automatic va_marshaller will not be set. If we leave the c_marshaller as
NULL in the simple cases, both a c_marshaller and va_marshaller will be
set for us.

This is particularly helpful when dealing with stack traces from Linux
perf, which often cannot unwind the stack beyond the ffi_call_unix64
stack-frame on x86_64.

Related to GNOME/Initiatives#10
2019-06-17 16:13:53 -07:00
Christian Hergert
2a4b5caac2 gobject: remove use of generic marshaller from GObject
Using the generic marshaller has drawbacks beyond performance. One such
drawback is that it breaks the stack unwinding from the Linux kernel due
to having unsufficient data to walk past ffi_call_unixt64. That means that
performance profiling by application developers looks grouped among
seemingly unrelated code paths.

Related to GNOME/Initiatives#10
2019-06-17 16:13:53 -07:00
Christian Hergert
d7c1d477bc gdbusobjectmanager: store signal ids for re-use
Having access to the signal-id is useful when we want to specify additional
signal related settings (such as va_marshaller).
2019-06-17 16:13:53 -07:00
Christian Hergert
266a292a35 gsignal: update documentation about va_marshaller
If we specify a c_marshaller, g_signal_newv() will never assign an
va_marshaller automatically. So either use NULL (for simple cases), or
specify both to avoid the generic performance penalty.
2019-06-17 14:07:26 -07:00
Simon McVittie
833d38b40f Merge branch 'mcatanzaro/gdbus-dir-addresses' into 'master'
gdbus: support unix:dir= addresses, and related cleanups

Closes #1808

See merge request GNOME/glib!911
2019-06-17 18:06:11 +00:00
Michael Catanzaro
30524fbdb5 gdbusserver: properly escape all components of server address
https://gitlab.gnome.org/GNOME/glib/merge_requests/911#note_530668
2019-06-17 12:08:06 -05:00
Michael Catanzaro
16cdda5d35 gdbus: run peer test multiple times with different addresses
This ensures that D-Bus connections established with unix:dir and
unix:path addresses actually work properly. Previously, we only tested
unix:tmpdir and TCP addresses.
2019-06-17 12:08:06 -05:00
Michael Catanzaro
eca16677c0 gdbus: Fix minor leak in peer test
This has to be freed even on Windows.
2019-06-17 12:08:06 -05:00
Michael Catanzaro
beac9fe211 gdbus: Clean up sockets and nonces from filesystem
When we close the GDBusServer, it should remove any non-abstract Unix
sockets or TCP nonce files it created from the filesystem.

Fixes #1808
2019-06-17 12:08:06 -05:00
Michael Catanzaro
f5631ecb94 gdbus: improve an error message
Namespace is one word.
2019-06-17 12:08:06 -05:00
Michael Catanzaro
99b580a0b2 gdbus: Stop server on dispose
This is not going to have much any effect currently since stop() just
disconnects a signal handler (that is going to be disconnected in
finalize anyway) and stops the socket service (that is going to be
destroyed in finalize), but it makes sense to do here for robustness.
2019-06-17 12:08:06 -05:00
Michael Catanzaro
fc597fa5f9 gdbus: support unix:dir= addresses
unix:dir= addresses are exactly the same as unix:tmpdir= addresses,
already supported by GDBus, except they forbid use of abstract sockets.
This is convenient for situations where abstract sockets are
impermissible, such as when a D-Bus client inside a network namespace
needs to connect to a server running in a different network namespace.
An abstract socket cannot be shared between two processes in different
network namespaces.

Applications could use unix:path= addresses instead, so this is only a
convenience, but there's no good reason not to support unix:dir=.
Currently it is not supported simply because unix:dir= is a relatively
recent addition to the D-Bus spec.
2019-06-17 12:07:10 -05:00
Michael Catanzaro
6a5c4252cd Merge branch '940-socket-listener-docs' into 'master'
gsocketlistener: Clarify when g_socket_listener_set_backlog() works

Closes #940

See merge request GNOME/glib!921
2019-06-17 17:05:42 +00:00
Simon McVittie
bc167c09c1 Merge branch '887-dbus-message-int-comparisons' into 'master'
gdbusmessage: Fix comparisons out of range for enum types

Closes #887

See merge request GNOME/glib!922
2019-06-17 17:01:12 +00:00
Philip Withnall
db5bee12ea Merge branch 'compiler-define-check' into 'master'
Check if compiler symbols are defined before using them

See merge request GNOME/glib!923
2019-06-17 16:09:35 +00:00
Emmanuele Bassi
23d33b7630 Check if compiler symbols are defined before using them
If we don't do this, projects using `-Werror=undef` will break.
2019-06-17 16:39:57 +01:00
Philip Withnall
063722ef80 gsocketlistener: Clarify when g_socket_listener_set_backlog() works
Spotted by Paolo Borelli.

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

Fixes: #940
2019-06-17 16:26:48 +01:00
Philip Withnall
25636e50e0 gdbusmessage: Fix comparisons out of range for enum types
This was warning on macOS.

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

Fixes: #887
2019-06-17 15:45:30 +01:00
Philip Withnall
3addc38ca2 Merge branch 'deprecated-enumerators-old-gcc' into 'master'
gmacros: Only use deprecated attributes on enumerators with GCC ≥ 6.5

See merge request GNOME/glib!920
2019-06-14 13:08:39 +00:00
Philip Withnall
dddcf90dda gmacros: Only use deprecated attributes on enumerators with GCC ≥ 6.1
The reference I found online which said they were supported by GCC ≥ 5.2
was obviously lying.

The GCC 6.1.0 documentation says they’re supported:
https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Enumerator-Attributes.html.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-14 13:51:44 +01:00
Philip Withnall
fa5996927f Merge branch 'drop-g-disable-deprecated' into 'master'
Drop G_DISABLE_DEPRECATED

Closes #1060 and #638

See merge request GNOME/glib!871
2019-06-14 11:24:25 +00:00
Emmanuele Bassi
d2450c8124 Merge branch 'contributing-irc' into 'master'
docs: Fix name of IRC channel in CONTRIBUTING.md

See merge request GNOME/glib!917
2019-06-13 11:49:40 +00:00
Philip Withnall
88f2010f1a docs: Fix name of IRC channel in CONTRIBUTING.md
It’s been renamed from `#gtk+` to `#gtk`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-13 12:24:09 +01:00
Simon McVittie
5ca6ea0937 Merge branch 'fix-scan-build' into 'master'
ci: Run scan-build in a different build directory

See merge request GNOME/glib!914
2019-06-13 10:03:12 +00:00
Philip Withnall
e8a4f34952 Merge branch 'gvariant_text_typo_arrays' into 'master'
docs: fix typo on arrays examples in gvariant-text

See merge request GNOME/glib!915
2019-06-12 16:19:32 +00:00
Simental Magana, Marcos
51e7ce2c20 docs: fix typo on arrays examples in gvariant-text
example lists [(1, 2), (3, 4.0)], but mentions numbers
1 and 4 being parsed as integrers, this seems wrong as
4.0 its explicitly parsed as double.

Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
2019-06-12 10:56:07 -05:00
Philip Withnall
82906e5d5d ci: Run scan-build in a different build directory
The build artifacts from earlier jobs in the pipeline all use the
`_build` directory. When they are copied in to the scan-build job, they
are probably marked as read-only. This means that the `meson scan-build`
run can’t write to `_build/meson-logs/meson-log.txt` and fails.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-06-12 14:31:42 +01:00
Emmanuele Bassi
94a56ae4f5 Merge branch '1807-dbus-server-docs' into 'master'
gdbusserver: Drop reference to non-existing function from documentation

Closes #1807

See merge request GNOME/glib!913
2019-06-12 12:05:56 +00:00
Philip Withnall
b1fbb36ba3 Merge branch 'prop-action-state-hints' into 'master'
property action: Add state hints

See merge request GNOME/glib!906
2019-06-12 11:59:58 +00:00
Philip Withnall
6e25d936fa gdbusserver: Drop reference to non-existing function from documentation
Spotted by Michael Catanzaro.

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

Fixes: #1807
2019-06-12 12:48:49 +01:00
Sebastian Dröge
c11f5321dd Merge branch 'ci-scan-build' into 'master'
ci: Add scan-build job in a new ‘analysis’ pipeline stage

See merge request GNOME/glib!563
2019-06-11 11:59:46 +00:00
Sebastian Dröge
03ce878736 Merge branch '1729-mime-result-prio' into 'master'
Resolve "g_content_type_guess segfaults when passed an empty data buffer on Mac OS"

Closes #1729

See merge request GNOME/glib!733
2019-06-11 11:38:33 +00:00
Philip Withnall
9740b58814 Merge branch '77-wrap-on-linux' into 'master'
glib: Rename G_STDIO_NO_WRAP_ON_UNIX → G_STDIO_WRAP_ON_UNIX

Closes #77

See merge request GNOME/glib!830
2019-06-11 11:37:35 +00:00
Sebastian Dröge
f78194e8d0 Merge branch 'settings-list-order' into 'master'
gsettings: Document that lists are returned in no defined order

See merge request GNOME/glib!851
2019-06-11 11:35:58 +00:00
Sebastian Dröge
e85f1ced5f Merge branch 'compile-schemas-strings' into 'master'
glib-compile-schemas: Improve translatable strings

See merge request GNOME/glib!678
2019-06-11 11:34:05 +00:00
Sebastian Dröge
65c80701ca Merge branch '1438-deprecate-gtime' into 'master'
gdate: Officially mark GTime as deprecated

See merge request GNOME/glib!817
2019-06-11 11:29:35 +00:00
Sebastian Dröge
db27933236 Merge branch 'docs-typo-fix' into 'master'
gobject: Fix apostrophe usage in a few small bits of documentation

See merge request GNOME/glib!853
2019-06-11 11:21:52 +00:00
Sebastian Dröge
5fb5641de2 Merge branch 'post-release-version-bump' into 'master'
Post-release version bump

See merge request GNOME/glib!867
2019-06-11 11:20:29 +00:00
Sebastian Dröge
943de74113 Merge branch 'source-destroy-docs' into 'master'
gmain: Clarify that g_source_destroy() doesn’t drop a reference

See merge request GNOME/glib!901
2019-06-11 11:16:44 +00:00
Philip Withnall
155d4c66c7 Merge branch 'dbus-security-master' into 'master'
D-Bus auth mechanism improvements

See merge request GNOME/glib!909
2019-06-11 10:30:45 +00:00
Simon McVittie
11233f572d gdbusdaemon: Only authorize anonymous users on Windows, not Unix
On Unix, we expect EXTERNAL authentication to work.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-06-11 11:06:36 +01:00