Commit Graph

27668 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño)
51c023f189 tests/codegen: Add checks for signal emission enums
These are checked to be correct by code compilation, but let's ensure we
also have some kind of forma check on the expected syntax.
2023-06-30 22:17:46 +02:00
Marco Trevisan (Treviño)
4b05e06e1c gdbus-codegen: Address more black cleanups 2023-06-30 22:17:46 +02:00
Marco Trevisan (Treviño)
1b345e411f meson: Add all the gdbus-codegen based tests to the proper suite
So it's easier to run them all with --suite=gdbus-codegen
2023-06-30 18:11:18 +02:00
Philip Withnall
ec754e5404 Merge branch 'fix-custom-dispatch-32bit-windows' into 'main'
gobject/tests: Fix running on 32-bit Windows

See merge request GNOME/glib!3490
2023-06-30 14:05:55 +00:00
Luca Bacci
2dc0a43bc0 glocalfileinfo: Fix GLocalFileStat getters on MinGW x86
For some reason, `time_t` is defined as being 32 bits wide on that
platform, which causes truncation of the timestamps from `struct stat`.

Avoid that problem by consistently using a 64-bit return value from the
`struct stat` accessors.

Helps: #3039
2023-06-30 15:00:56 +01:00
Philip Withnall
2a077b30a4 Merge branch 'gdbus-emit-signal-ids' into 'main'
codegen: Use g_signal_emit to emit signals

See merge request GNOME/glib!3488
2023-06-30 09:27:00 +00:00
Chun-wei Fan
cb1eb57581 gobject tests: Fix running custom-dispatch on 32-bit Windows
UAC will terminate this test program from running in 32-bit x86 builds as
it believes that it will alter Windows.  In order to make this run, we
create a manifest file for 32-bit Windows builds in order to tell UAC
that this program should not need admin privileges.

This will allow the entire test suite for GLib to run on 32-bit Windows
builds.
2023-06-30 11:32:54 +08:00
Chun-wei Fan
ab732692a0 tools: Add script to create UAC manifests for Windows
This is copied from the GTK source tree to put into our builds so that
we can generate a manifest file to pacify UAC on Windows for 32-bit
builds, as UAC will kill any 32-bit processes that it believes will
be an installer or will alter the system in any ways.

This will be used to fix running the custom-dispatch test program on
32-bit Windows builds.
2023-06-30 11:32:44 +08:00
Michael Catanzaro
31565bbb02 Merge branch 'fix_mirror_char_direction' into 'main'
guniprop: fix param direction in g_unichar_get_mirror_char(), for introspection

See merge request GNOME/glib!3489
2023-06-29 22:11:55 +00:00
G.Willems
d8483ef696 guniprop: fix param direction in g_unichar_get_mirror_char(), for introspection 2023-06-29 23:55:08 +02:00
Marco Trevisan (Treviño)
88d48a7a22 codegen: Use g_signal_emit to emit signals
We were using emit_by_name which implies looking up for the signal name,
while the generated code can easily remember the signal ID and use it
instead, allowing direct access to the signal emission.
2023-06-29 22:20:05 +02:00
Marco Trevisan
39e018e151 Merge branch '3007-option-context-colons' into 'main'
goption: Clarify expected format of option group description in docs

Closes #3007

See merge request GNOME/glib!3481
2023-06-29 17:00:49 +00:00
Marco Trevisan
b1ac3f883a Merge branch '3040-gtester-override-find-program' into 'main'
build: Call override_find_program() for gtester

Closes #3040

See merge request GNOME/glib!3478
2023-06-29 16:57:35 +00:00
Marco Trevisan
14907d2f77 Merge branch 'backports-typo-fix' into 'main'
docs: Fix a typo in the backports policy

See merge request GNOME/glib!3484
2023-06-29 16:54:22 +00:00
Marco Trevisan
23e04a5771 Merge branch 'issue-and-mr-docs' into 'main'
docs: Document issue and merge request triaging and review guidelines

See merge request GNOME/glib!3486
2023-06-29 16:52:48 +00:00
Philip Withnall
0c640f0130 docs: Document issue and merge request triaging and review guidelines
This documents the practices that I’ve been trying to follow for the
last few years for managing GLib issues and merge requests, and why they
seem to work well enough.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 16:50:00 +01:00
Philip Withnall
05b861db8b docs: Expand supported platforms documentation a little
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:51:44 +01:00
Philip Withnall
7c6d306927 docs: Fix a typo in the backports policy
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-29 15:40:59 +01:00
Philip Withnall
9ef3ebc23c Merge branch 'kintel-iconv-macos' into 'main'
Link with -framework Foundation and -framework AppKit to correctly link libiconv on macOS

Closes #3025

See merge request GNOME/glib!3483
2023-06-29 09:45:08 +00:00
Marius Kintel
0ae1b57ae4 Link with -framework Foundation and -framework AppKit to correctly link libiconv on macOS 2023-06-28 21:10:03 -04:00
Philip Withnall
9845f880ca glocalfileinfo: Delete some redundant code
`_g_stat_has_field (statbuf, G_LOCAL_FILE_STAT_FIELD_ATIME)` will always
return `TRUE` on Windows (since it uses a basic `struct stat`), so the
platform-inspecific code is equivalent to the Windows-specific code.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-28 17:49:45 +01:00
Philip Withnall
c3762deb78 glocalfileinfo: Fix incorrect use of struct statx.st_mtimensec on Android
`GLocalFileStat` is a platform-specific abstraction around `struct stat`
or `struct statx`. If `struct statx` is available, it will use that by
preference as it has more features.

`glocalfileinfo.c` was, in some places, incorrectly accessing the fields
of `GLocalFileStat` directly rather than through its `_g_stat_*()`
getters. While it correctly accounted for the platform-specific
differences between `st_mtimensec` and `st_mtim.tv_nsec`, it hadn’t been
updated to deal with `stx_mtime`.

On Android, `st_mtimensec` is defined as a fallback for
`st_mtim.tv_nsec` (even though it doesn’t need to be). This caused GLib
to take the `st_mtimensec` code path rather than the `stx_mtime` code
path, and hence try to dereference `st_mtim` in a `struct statx`.

Fix that by correctly using the `_g_stat_*()` getters consistently.

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

Fixes: #3039
2023-06-28 17:32:25 +01:00
Philip Withnall
989b4cb8bd gapplication: Tweak option group description
To match the documented style for all option group descriptions.

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

Helps: #3007
2023-06-28 17:04:59 +01:00
Philip Withnall
98f9a11390 goption: Clarify expected format of option group description in docs
To match the current widespread usage.

We can’t automatically append a colon to the group description, as that
would interact badly with translation of the string.

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

Fixes: #3007
2023-06-28 17:03:00 +01:00
Philip Withnall
e8f14a66a6 Merge branch 'wip/oholy/gio-mount-progress' into 'main'
gio-tool-mount: Add option to show progress when unmounting

See merge request GNOME/glib!3471
2023-06-28 15:51:51 +00:00
Ondrej Holy
c083a4d1a6 gio-tool-mount: Add option to show progress when unmounting 2023-06-28 15:51:51 +00:00
Philip Withnall
d3fbb6e0fc Merge branch 'meson-intl-iconv-lookup' into 'main'
meson: try iconv in libintl lookup

See merge request GNOME/glib!3448
2023-06-28 14:48:19 +00:00
Philip Withnall
57d2f161e6 Merge branch 'pcre' into 'main'
pcre subproject fixes: Allow fallback & static build

See merge request GNOME/glib!3470
2023-06-28 14:38:36 +00:00
Marius Kintel
dd5683ce64 meson: Allow fallback & static build of pcre subproject
Using `allow_fallback: false` on the first check for libpcre
was unnecessary, as `required: false` already disables using
fallbacks. `allow_fallback: false` meant that
`--force-fallback-for` couldn’t work. This commit fixes that.

Also allow the fallback libpcre to be built statically so it
can be linked into GLib.

Helps: #3025
2023-06-28 14:38:36 +00:00
Jan200101
a497d5be12 meson: try iconv in libintl lookup
This was originally removed in !2734 but still appears to be required for
some MinGW setups, such as the `x86_64-w64-mingw32.static` target in
[mxe](https://github.com/mxe/mxe).

Currently, this configuration fails the libintl internal assert on line
2128, as on this platform `ngettext()` is only found inside libiconv.

This commit will look up iconv potentially twice, once as `libiconv` and
potentially once as `libintl_iconv`. This is what the code did before
!2734 landed, so it’s known to work reliably on a number of platforms.
2023-06-28 15:22:36 +01:00
Philip Withnall
3fc569085c Merge branch 'gspawn-macos-buffer-limit' into 'main'
Avoid stack overflow in gspawn on macOS

Closes #3024

See merge request GNOME/glib!3468
2023-06-28 13:42:40 +00:00
Dario Saccavino
ccea09c1c8 Avoid stack overflow in gspawn on macOS 2023-06-28 13:42:40 +00:00
Emmanuele Bassi
4a7409a0ac Merge branch 'main' into 'main'
Added Annotations

Closes #2993

See merge request GNOME/glib!3476
2023-06-27 16:49:43 +00:00
N.Pranav Krishna
b963bcf8c5 Added Annotations 2023-06-27 16:49:43 +00:00
Philip Withnall
7d4f6673b9 build: Call override_find_program() for gtester
Just in case anyone tries to look it up using `find_program()` in a
`meson.build` in GLib (or a project pulling GLib in as a subproject) in
future.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-27 14:54:18 +01:00
Philip Withnall
28ad519ff8 gdbus-codegen: Fix some minor typos in the documentation
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-27 14:23:01 +01:00
Philip Withnall
0990106501 Merge branch 'futex-errno-kersplato' into 'main'
glib: reset errno to 0 when futex() returns EAGAIN

Closes #3034

See merge request GNOME/glib!3473
2023-06-22 14:22:03 +00:00
Daniel P. Berrange
1bfc04a13d glib: reset errno to 0 when futex() returns EAGAIN 2023-06-22 14:22:03 +00:00
Philip Withnall
3637c2c47f Merge branch 'wip/chergert/fix-listmodel-docs' into 'main'
listmodel: add documentation about unique instances

Closes #3030

See merge request GNOME/glib!3474
2023-06-22 13:57:18 +00:00
Christian Hergert
d972ba03b4 listmodel: add documentation about unique instances
This has subtly been required and the original intention, so make it more
discoverable by adding to the documentation.

Fixes #3030
2023-06-21 11:01:52 -07:00
Emmanuele Bassi
43e133723c Merge branch 'timer-test-fix' into 'main'
tests: Fix an intermittent timing error with testing g_usleep(0)

See merge request GNOME/glib!3472
2023-06-21 11:06:04 +00:00
Philip Withnall
679560feaa tests: Fix an intermittent timing error with testing g_usleep(0)
The code to test that `g_usleep(0)` returns immediately assumes that
`g_usleep(1)` always takes longer, but that’s not necessarily always the
case. Even if no sleeping happens, the function call for `g_usleep(0)`
could get descheduled and take longer than normal.

This results in occasional failures like this one:
```
GLib:ERROR:../glib/tests/timer.c:367:test_usleep_with_zero_wait: assertion failed (elapsed0 <= elapsed1): (0.000206 <= 0.000202)
```

(Source: https://gitlab.gnome.org/GNOME/glib/-/jobs/2898468)

I can’t think of a suitable invariant comparison which can be done with
the timers, but running the comparison 10 times and allowing it to fail
once should work. A probabilistic test of `g_usleep(0)`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-21 11:52:03 +01:00
Dušan Kazik
b5d995e6b8 Update Slovak translation
(cherry picked from commit 49c2fe77c1)
2023-06-14 13:52:28 +00:00
Philip Withnall
1bf8f4b720 Merge branch 'gapplication-action-docs' into 'main'
gapplication: Clarify docs

Closes #3027

See merge request GNOME/glib!3469
2023-06-13 09:41:17 +00:00
Matthias Clasen
4171fba2fe gapplication: Clarify docs
D-Bus does not support maybe types, therefore
using such types are action parameters in
GApplication does not work.

Fixes: #3027
2023-06-10 08:04:49 -04:00
Philip Withnall
e1d47f0b0d Merge branch 'wip/pwithnall/macos-testing' into 'main'
tests: Reduce thread and iteration count on CI for /thread/rec-mutex3

See merge request GNOME/glib!3462
2023-06-09 10:13:21 +00:00
Philip Withnall
0adbf23fbe Merge branch 'wip/pwithnall/reenable-socket-tests' into 'main'
Revert "tests: Temporarily disable socket test due to a kernel bug"

Closes #2879

See merge request GNOME/glib!3467
2023-06-07 13:37:40 +00:00
Philip Withnall
8cad32a118 Revert "tests: Temporarily disable socket test due to a kernel bug"
This reverts commit 1507585869.

This should now be fixed:
https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/981#note_1760399.

Fixes: #2879
2023-06-07 12:29:03 +01:00
Marco Trevisan
6f6692562f Merge branch 'adapt_gsignal_changes' into 'main'
gobject_gdb.py: adapt to recent gsignal changes

See merge request GNOME/glib!3465
2023-06-07 10:27:51 +00:00
Philip Withnall
1f1378b80e Merge branch 'add-space' into 'main'
resolver: Add space in documentations

See merge request GNOME/glib!3466
2023-06-07 10:25:25 +00:00