Commit Graph

24993 Commits

Author SHA1 Message Date
Daniel Mustieles
be555e247a Updated Spanish translation 2022-04-06 08:21:56 +02:00
Philip Withnall
e2426dd74d Merge branch 'list-store-equal-full' into 'main'
gio: Add g_list_store_find_with_equal_func_full()

Closes #2447

See merge request GNOME/glib!2549
2022-04-05 18:02:15 +00:00
Jason Francis
a85246af3b gio: Add g_list_store_find_with_equal_func_full()
Fixes: #2447
2022-04-05 18:34:39 +01:00
Philip Withnall
aec5d17d77 tests: Remove an incorrect assertion in converter-stream
While the assertion always turned out to be true on Linux, it frequently
caused spurious test failures on FreeBSD.

After some remote debugging, I *think* the cause is as written up in the
comment in the code in this commit. However, I cannot be certain, as the
more debugging messages I added, the harder the failure was to
reproduce; and I don’t have access to a FreeBSD machine.

This fixes failures like:
```
Bail out! GLib-GIO:ERROR:../gio/tests/converter-stream.c:1043:test_converter_pollable: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27)
```

It’s succeeded 1000 times in a row on the FreeBSD CI now; previously
it was failing one time in three:
https://gitlab.gnome.org/GNOME/glib/-/jobs/1936395.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-05 18:19:23 +01:00
Philip Withnall
59751e86fd Merge branch 'signal-group-connect-object' into 'main'
gobject: Add g_signal_group_connect_closure

See merge request GNOME/glib!2521
2022-04-05 16:32:12 +00:00
Jason Francis
2a842b1173 gobject: Add g_signal_group_connect_closure 2022-04-05 15:32:20 +01:00
Simon McVittie
28add9abfe Merge branch 'test-dbus-exit-on-close' into 'main'
tests: Don’t exit gdbus-method-invocation test early on connection close

See merge request GNOME/glib!2589
2022-04-05 14:23:53 +00:00
Simon McVittie
04e5f93e38 Merge branch 'version-bump' into 'main'
build: Post-release version bump to 2.73.0

See merge request GNOME/glib!2577
2022-04-05 14:20:14 +00:00
Philip Withnall
82ad0510d2 tests: Don’t exit gdbus-method-invocation test early on connection close
There’s (deliberately) a bit of race in implementing/handling
`CloseBeforeReturning()` in `gdbus-method-invocation.c`. If the server
closes the D-Bus connection early, the client may exit with `SIGTERM` if
`GDBusConnection:exit-on-close` is set. We don’t want that, as the test
is trying to check that the default handling of a D-Bus method return
after a connection has closed works.

See https://gnome.pages.gitlab.gnome.org/-/glib/-/jobs/1935191/artifacts/_build/meson-logs/testlog.txt

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-05 14:43:16 +01:00
Philip Withnall
c9ef0bf0eb Merge branch 'group-msvc-flags-together' into 'main'
Move msvc warnings in meson.build file

See merge request GNOME/glib!2584
2022-04-05 12:49:22 +00:00
Philip Withnall
e5316bb5ab Merge branch 'issue-2628' into 'main'
glib/win32: fix spawn from GUI regression

See merge request GNOME/glib!2582
2022-04-05 12:13:03 +00:00
Philip Withnall
bae0a3c751 Merge branch 'badcel/gunixfdlist-only-unix' into 'main'
GUnixFDList: Include only in unix build

See merge request GNOME/glib!2585
2022-04-05 12:12:19 +00:00
Loïc Le Page
8bb923f22a Move msvc warnings in meson.build file
Move msvc warnings in meson.build file from line 24 to line 469 to group
them next to gcc/clang warnings. So it is easier to see warnings flags
for all platforms at once.
2022-04-05 14:09:42 +02:00
Philip Withnall
259c86909f Merge branch 'fix-trashing-sandboxed-directories' into 'main'
Fix trashing sandboxed directories

Closes #2629

See merge request GNOME/glib!2583
2022-04-05 11:58:33 +00:00
Philip Withnall
14717e4f41 Merge branch 'cleanup-warnings-split-9' into 'main'
Cleanup warnings split 9

See merge request GNOME/glib!2498
2022-04-05 11:19:51 +00:00
badcel
c9874f817b
GUnixFDList: Include only in unix build 2022-04-04 20:30:22 +02:00
Philip Withnall
295c2a70d1 Merge branch 'unicode-encoding-test' into 'main'
Move tests/unicode-encoding.c to glib/tests/unicode-encoding.c

See merge request GNOME/glib!2581
2022-04-04 17:23:48 +00:00
Emmanuel Fleury
795952cb8d Move tests/unicode-encoding.c to glib/tests/unicode-encoding.c
Related to issue #1434
2022-04-04 18:51:30 +02:00
Emmanuel Fleury
43759ca951 Convert tests/unicode-encoding.c to glib test framework 2022-04-04 18:51:24 +02:00
Loic Le Page
c6a5021f48 Fix redefinition of local variable in gio/gdbusobjectmanagerclient.c 2022-04-04 17:39:59 +01:00
Loic Le Page
5223863922 Fix redefinition of local variable in gio/gdbusserver.c 2022-04-04 17:39:59 +01:00
Loic Le Page
19280e2166 Fix non-initialized variable in gio/tests/date.c 2022-04-04 17:39:59 +01:00
Loic Le Page
af69d438ed Fix unused variable and remove finalize vfunc in gio/tests/gdbus-example-proxy-subclass.c
G_GNUC_UNUSED does perfectly its job with gcc compiler but the warning
still remains with msvc compiler.

Once the unused variable removed, the finalize vfunc can be removed as
it's doing the same job as the parent function.
2022-04-04 17:39:59 +01:00
Loic Le Page
4e3f704d49 Fix global variable name hidden by local variables in gio/tests/pollable.c 2022-04-04 17:39:58 +01:00
Loic Le Page
25ab7f1e74 Fix global variable name hidden by local variables in gio/tests/proxy.c 2022-04-04 17:39:42 +01:00
Loic Le Page
13710c3699 Fix global variable name hidden by local variables in gio/tests/resolver.c 2022-04-04 17:39:42 +01:00
Matthias Clasen
724df43616 Fix trashing sandboxed directories
We must not open the fd with O_PATH|O_NOFOLLOW,
since the portal rejects that combination. Leaving
out O_NOFOLLOW is fine in this case - we know it
is a directory, we just received EISDIR.

Fixes: #2629
2022-04-04 10:26:13 -04:00
Marc-André Lureau
f70dc8bcb4 glib/win32: fix spawn from GUI regression
In commit 674072b13 ("glib/win32: check if dup() failed in helper
process"), I happily added checks for dup() calls in the spawn helper.
However, I didn't realize that GUI applications do not necessarily have
a console attached, and will now fail spawning processes.

One way to check that is via a _fileno() call, as explained in:
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fileno?view=msvc-170#return-value

Fixes:
https://gitlab.gnome.org/GNOME/glib/-/issues/2628

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-04 15:59:04 +04:00
Marek Černocký
db76697aee Updated Czech translation 2022-04-01 23:26:38 +02:00
Philip Withnall
ad23894c15 gatomic: Add a C++ variant of g_atomic_int_compare_and_exchange()
The C++ variant implements type safety differently, to avoid warnings
from C++ compilers about:
```
../../../gnome-commander-1.14.2/src/intviewer/searcher.cc:303:5: error: cannot initialize a parameter of type 'gint *' (aka 'int *') with an rvalue of type 'void *'
    g_atomic_int_compare_and_exchange ((gint*)&src->priv->progress_value, oldval, (gint)d);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-commander/1.14.2-r0/recipe-sysroot/usr/include/glib-2.0/glib/gatomic.h:160:44: note: expanded from macro 'g_atomic_int_compare_and_exchange'
    __atomic_compare_exchange_n ((atomic), (void *) (&(gaicae_oldval)), (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
```

This complements the existing C++ variant for
`g_atomic_pointer_compare_and_exchange()`, and fixes a regression on C++
from https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2114.

With the addition of the unit tests in the previous commit, this is
effectively tested by the FreeBSD and macOS CI jobs, as they use
`clang++` in C++ mode. `g++` doesn’t seem to emit a warning about this.

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

Fixes: #2625
2022-04-01 17:23:23 +01:00
Philip Withnall
16d1bc49cc tests: Add C++ tests for typechecking with atomic compare and exchanges
The tests have to be conditional on C++11 being enabled, as the default
C++ standard on macOS is (for some reason), C++97 (`__cplusplus` is
defined as `199711L`).

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

Helps: #2625
2022-04-01 17:22:33 +01:00
Philip Withnall
4e65bcda0c tests: Fix a typo in a test skip message
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-01 17:22:31 +01:00
Philip Withnall
6c31ef6f18 Merge branch 'cleanup-warnings-split-8' into 'main'
Cleanup warnings split 8

See merge request GNOME/glib!2497
2022-04-01 15:13:32 +00:00
Loic Le Page
e372ed3413 Fix cast pointer to int warning in gio/tests/socket.c 2022-04-01 15:10:50 +02:00
Loic Le Page
7bd79b112d Fix non-initialized variable in gio/tests/socket-client.c 2022-04-01 15:10:50 +02:00
Loic Le Page
027e3769ee Fix global variable name hidden by local variables in gio/tests/socket-server.c 2022-04-01 15:10:50 +02:00
Loic Le Page
7178e10cd5 Fix redefinition of local variable in gio/tests/testfilemonitor.c 2022-04-01 15:10:50 +02:00
Loic Le Page
c324ce5c2a Fix redefinition of local variable in gio/gactiongroupexporter.c 2022-04-01 15:10:50 +02:00
Loic Le Page
3214a0f333 Fix redefinition of local variable in gio/gapplicationimpl-dbus.c 2022-04-01 15:10:50 +02:00
Loic Le Page
0c1619227c Fix redefinition of local variable in gio/gdbus-tool.c 2022-04-01 15:10:50 +02:00
Loic Le Page
4bcb7bc631 Fix redefinition of local variable in gio/gdbusauth.c 2022-04-01 15:10:50 +02:00
Loic Le Page
eb157bfa1b Fix redefinition of local variable in gio/gdbusauthmechanismsha1.c 2022-04-01 15:10:41 +02:00
Andika Triwidada
9884991471 Update Indonesian translation 2022-04-01 03:41:41 +00:00
Philip Withnall
5486e00cf9 Merge branch 'cleanup-warnings-split-5' into 'main'
Cleanup warnings split 5

See merge request GNOME/glib!2494
2022-03-31 23:36:36 +00:00
Loic Le Page
bf68e8606b Fix non-initialized variable and remove obsolete usage of inet_addr in gio/gsocket.c 2022-04-01 00:18:40 +01:00
Loic Le Page
7bde242707 Fix redefinition of local variable in gio/gsocks5proxy.c 2022-04-01 00:18:40 +01:00
Loic Le Page
bd5d867320 Fix global variable name hidden by local variables in gio/gthreadedresolver.c 2022-04-01 00:18:40 +01:00
Loic Le Page
49d0c5a90b Fix redefinition of local variable in gio/gtlscertificate.c 2022-04-01 00:18:40 +01:00
Loic Le Page
84dabcf274 Fix global and local variables hidden by local variables and non-initialized variables in gio/gwin32appinfo.c 2022-04-01 00:18:40 +01:00
Loic Le Page
155657de3e Fix redefinition of local variable in gio/gwin32file-sync-stream.c 2022-04-01 00:18:40 +01:00