Commit Graph

24026 Commits

Author SHA1 Message Date
Anders Jonsson
e045675d80 Update Swedish translation 2021-11-01 20:49:52 +00:00
Philip Withnall
e4288ef9d7 Merge branch 'pcre' into 'main'
Rename libpcre.wrap to pcre.wrap

See merge request GNOME/glib!2309
2021-11-01 19:07:37 +00:00
Philip Withnall
48af1cbddc Merge branch 'source-attach-trigger-wakeup' into 'main'
Add g_main_context_new_with_flags() and ownerless polling option

See merge request GNOME/glib!1960
2021-11-01 18:39:56 +00:00
Philip Withnall
726c44c348 Merge branch '2400-dbus-race' into 'main'
gdbusconnection: Fix race between method calls and object unregistration

Closes #2400

See merge request GNOME/glib!2265
2021-11-01 18:37:17 +00:00
Philip Withnall
40f995e0aa Merge branch 'editorconfig' into 'main'
docs: Add .editorconfig file

See merge request GNOME/glib!2191
2021-11-01 18:36:38 +00:00
Xavier Claessens
9a9f6b5a4b Rename libpcre.wrap to pcre.wrap
It is exactly the same wrap as the one in WrapDB but with a different
name. That fix error when multiple projects uses pcre and they don't
have the same wrap name:

meson.build:1:0: ERROR: Multiple wrap files provide 'libpcre' dependency: pcre.wrap and libpcre.wrap
2021-11-01 18:22:26 +00:00
Yuri Chornoivan
f6b86790e3 Update Ukrainian translation 2021-11-01 17:52:22 +00:00
Philip Withnall
32b034a0aa Merge branch 'setuid-wording' into 'main'
gdbusaddress: setuid error message references AT_SECURE

Closes #2518

See merge request GNOME/glib!2315
2021-11-01 17:23:22 +00:00
Pablo Correa Gómez
14c5589ed6
gdbusaddress: setuid error message references AT_SECURE
g_check_setuid does more than setuid checks when using AT_SECURE.
Make sure that it is referenced in the error message to help
users debug in case or errors

Closes #2518
2021-11-01 15:54:55 +01:00
Philip Withnall
e4bb09d8ec Merge branch 'fix-win32-app-info-registry-key-assert' into 'main'
GWin32AppInfo: Do not assert about successful open'ing of registry keys

See merge request GNOME/glib!2260
2021-11-01 10:41:31 +00:00
Philip Withnall
34ce204fd7 tests: Add D-Bus object/subtree unregistration tests
These tests cover the fixes from the previous two commits.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2400
2021-10-28 14:53:48 +01:00
Philip Withnall
117b748e44 gdbusconnection: Fix race between subtree method call and unregistration
Fix another variant of the previous commit, this time specific to the
idle callback of a method call on a subtree object, racing with
unregistration of that subtree.

In this case, the `process_subtree_vtable_message_in_idle_cb()` idle
callback already has a pointer to the right `ExportedSubtree` struct,
but again doesn’t have a strong reference to it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2400
2021-10-28 14:53:48 +01:00
Philip Withnall
50fbf05d61 gdbusconnection: Fix race between method calls and object unregistration
If `g_dbus_connection_unregister_object()` (or `unregister_subtree()`)
was called from one thread, while an idle callback for a method call (or
a property get or set) was being invoked in another, it was possible for
the two to race after the idle callback had checked that the
object/subtree was registered, but before it had finished dereferencing
all the data related to that object/subtree.

Unregistering the object/subtree would immediately free the data,
leading the idle callback to cause a use-after-free error.

Fix that by giving the idle callback a strong reference to the data from
inside the locked section where it checks whether the object/subtree is
still registered.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2400
2021-10-28 14:53:48 +01:00
Philip Withnall
c8c2ed4af5 gdbusconnection: Make ExportedInterface/ExportedSubtree refcounted
This is needed for an upcoming change which decouples their lifecycle
from their presence in the `map_id_to_ei` and `map_id_to_es` hash
tables.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2400
2021-10-28 14:53:48 +01:00
Philip Withnall
a497fdf302 gdbusconnection: Add some ownership annotations
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-28 14:53:48 +01:00
Philip Withnall
310f2c1632 gdbusconnection: Move ExportedSubtree definition
Move it further up the file, but make no changes to it. This will help
with a subsequent commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2400
2021-10-28 14:53:48 +01:00
Philip Withnall
e4b3a88b0e docs: Add .editorconfig file
This should ensure that all editors which support
https://editorconfig.org/ use 2-space indentation with spaces (not tabs)
by default.

This isn’t a full specification of the GLib coding style (see
https://gitlab.gnome.org/GNOME/gtk/blob/HEAD/docs/CODING-STYLE.md for
that), but is a correct subset of it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-28 14:47:53 +01:00
Michael Catanzaro
98e0789fea Merge branch 'weak-refs-docs' into 'main'
gobject: Clarify behaviour of adding weak refs during disposal

See merge request GNOME/glib!2255
2021-10-27 23:37:22 +00:00
Goran Vidović
2f4e911afd Update Croatian translation 2021-10-27 17:14:32 +00:00
Goran Vidović
bff13ab0ef Update Croatian translation 2021-10-27 17:11:18 +00:00
Goran Vidović
de720c99cf Update Croatian translation 2021-10-27 17:05:36 +00:00
Philip Withnall
045a6fb771 Merge branch 'fix_g_win32_app_info_launch_internal_signedness_warning' into 'main'
Fix cast from pointer to integer of different size warning in gio/gwin32appinfo.c

See merge request GNOME/glib!2292
2021-10-26 11:48:49 +00:00
Emmanuel Fleury
8444dc5695 Fix cast from pointer to integer of different size warning in gio/gwin32appinfo.c 2021-10-26 11:48:48 +00:00
Goran Vidović
10f7a0e59c Update Croatian translation 2021-10-25 19:47:33 +00:00
Goran Vidović
f9158d8216 Update Croatian translation 2021-10-25 19:44:58 +00:00
Goran Vidović
6419033072 Update Croatian translation 2021-10-25 19:38:04 +00:00
Rūdolfs Mazurs
4f6c666e5f Update Latvian translation 2021-10-25 16:40:13 +00:00
Philip Withnall
7fde5a1f9f Merge branch 'gio-doc-relative' into 'main'
gio: document GFile API when relative path is absolute

See merge request GNOME/glib!2305
2021-10-25 12:25:19 +00:00
Emmanuele Bassi
0c5c55bb11 Merge branch 'datetime-typo-fix' into 'main'
tests: Fix a typo in a test message in gdatetime.c

See merge request GNOME/glib!2310
2021-10-25 12:11:17 +00:00
Marc-André Lureau
b26855579c gio: fix GFile doc indentation and nullable annotations
Add missing (nullable), and use 2-space indentation to avoid markdown
pre-formatted blocks when unwanted.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-10-25 12:57:13 +01:00
Marc-André Lureau
3a6e8bc887 gio: check the given child name is not an absolute path
As this would have undesirable consequence.

Quoting Philip Withnall:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2305#note_1294729:

  The documentation never said anything about accepting absolute paths,
  so any code which is relying on that is relying on undocumented
  behaviour. We’re allowed to change that.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-10-25 12:57:13 +01:00
Marc-André Lureau
1df7c2ea80 gio: document g_file_get_relative_path() with absolute path
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2021-10-25 12:57:13 +01:00
Philip Withnall
ac26e9d780 tests: Fix a typo in a test message in gdatetime.c
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-25 12:56:16 +01:00
Goran Vidović
8f417138bb Update Croatian translation 2021-10-24 19:38:43 +00:00
Philip Withnall
ceb23e9f00 Merge branch 'XDG_RUNTIME_DIR_mkdir' into 'main'
mkdir path specified by XDG_RUNTIME_DIR

See merge request GNOME/glib!2290
2021-10-22 11:23:46 +00:00
Egor Bychin
5484bf1cef gutils: Add a comment specifying reason of omitting g_mkdir 2021-10-22 12:04:13 +01:00
Philip Withnall
464470dd8f Merge branch '2507-file-enumerator-docs' into 'main'
gfileenumerator: Warn if name is not available for get_child()

Closes #2507

See merge request GNOME/glib!2307
2021-10-21 11:58:32 +00:00
Philip Withnall
2602e0f1aa Merge branch 'drop-pamconsole' into 'main'
gunixmounts: Drop references to pamconsole mount option

See merge request GNOME/glib!2306
2021-10-21 11:49:06 +00:00
Philip Withnall
b6424b5ce1 gfileenumerator: Warn if name is not available for get_child()
`standard::name` must be available for `g_file_enumerator_get_child()`
to work. Emit a critical warning and return if it’s not. This is similar
to the existing behaviour in `g_file_enumerator_iterate()`.

Improve the documentation to mention this.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2507
2021-10-21 12:23:06 +01:00
Philip Withnall
e508a0a8df gfileenumerator: Upgrade existing warning to critical warning
The code cannot function correctly if the `standard::name` attribute is
not present, so upgrade the existing warning to a critical warning and
return if it fails in `g_file_enumerator_iterate()`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2507
2021-10-21 12:23:06 +01:00
Philip Withnall
0630272388 gfileenumerator: Add missing precondition to get_child()
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2507
2021-10-21 12:23:06 +01:00
Philip Withnall
9b1b04587c gunixmounts: Drop references to pamconsole mount option
It was Red Hat specific when it was introduced in 2004, was never
supported by mount(8) upstream, and was removed entirely in 2008.

It’s confusing for GLib to keep references to it around.

Thanks to Karel Zak for digging up the history of it:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2298#note_1294519

And thanks to Xidorn Quan for looking into it in the first place (see
!2298).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-21 12:22:54 +01:00
Emmanuele Bassi
422f744367 Merge branch 'fix-win32-warnings' into 'main'
gthread-win32: Remove an unnecessary volatile qualifier

See merge request GNOME/glib!2308
2021-10-21 11:17:40 +00:00
Philip Withnall
ee867a3c63 gthread-win32: Remove an unnecessary volatile qualifier
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-21 12:01:33 +01:00
Philip Withnall
9784f31527 Merge branch 'fix_more_windows_warnings' into 'main'
Fix more windows warnings

See merge request GNOME/glib!2303
2021-10-20 15:30:50 +00:00
Emmanuel Fleury
db5a9d8397 Fix signedness warning in gio/gsocket.c
gio/gsocket.c: In function 'g_socket_get_available_bytes':
gio/gsocket.c:3141:17: warning: comparison of integer expressions of different signedness: 'u_long' {aka 'long unsigned int'} and 'int'
       if (avail == -1)
                 ^~
gio/gsocket.c: In function 'g_socket_send_messages_with_timeout':
gio/gsocket.c:5283:19: warning: comparison of integer expressions of different signedness: 'gint' {aka 'int'} and 'guint' {aka 'unsigned int'}
     for (i = 0; i < num_messages; ++i)
                   ^
gio/gsocket.c:5308:76: warning: operand of ?: changes signedness from 'int' to 'gsize' {aka 'long long unsigned int'} due to unsignedness of other operand
         result = pollable_result == G_POLLABLE_RETURN_OK ? bytes_written : -1;
                                                                            ^~
2021-10-20 17:09:50 +02:00
Emmanuel Fleury
23e9017aff Fix signedness warning in gio/win32/gwinhttpfile.c
gio/win32/gwinhttpfile.c: In function 'g_winhttp_file_query_info':
gio/win32/gwinhttpfile.c:554:13: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' {aka 'long long unsigned int'}
           n == wcslen (content_length))
             ^~
2021-10-19 18:44:38 +02:00
Emmanuel Fleury
a16d6398d7 Fix signedness warning in gio/win32/gwin32fsmonitorutils.c
gio/win32/gwin32fsmonitorutils.c: In function 'g_win32_fs_monitor_handle_event':
gio/win32/gwin32fsmonitorutils.c:107:11: warning: comparison of integer expressions of different signedness: 'GFileMonitorEvent' {aka 'enum <anonymous>'} and 'int'
   if (fme != -1)
           ^~
2021-10-19 18:44:38 +02:00
Emmanuel Fleury
059dc76ae1 Fix signedness warnings in gio/win32/gwinhttpvfs.c
gio/win32/gwinhttpvfs.c: In function 'g_winhttp_vfs_get_file_for_uri':
gio/win32/gwinhttpvfs.c:172:17: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int'
   for (i = 0; i < G_N_ELEMENTS (winhttp_uri_schemes); i++)
                 ^
gio/win32/gwinhttpvfs.c: In function 'g_winhttp_vfs_get_supported_uri_schemes':
gio/win32/gwinhttpvfs.c:210:17: warning: comparison of integer expressions of different signedness: 'int' and 'long long unsigned int'
   for (i = 0; i < G_N_ELEMENTS (winhttp_uri_schemes); i++)
                 ^
2021-10-19 18:44:38 +02:00
Emmanuel Fleury
2f2e021a56 Fix signedness warnings in glib/gwin32.c
glib/gwin32.c: In function 'g_win32_check_windows_version':
glib/gwin32.c:556:32: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'}
   if (osverinfo.dwMajorVersion > major)
                                ^
glib/gwin32.c:558:37: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'}
   else if (osverinfo.dwMajorVersion == major)
                                     ^~
glib/gwin32.c:560:36: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'}
       if (osverinfo.dwMinorVersion > minor)
                                    ^
glib/gwin32.c:562:41: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'}
       else if (osverinfo.dwMinorVersion == minor)
                                         ^~
2021-10-19 18:44:38 +02:00