24899 Commits

Author SHA1 Message Date
Philip Withnall
a2e950a021 2.72.2
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2.72.2
2022-05-30 14:26:47 +01:00
Philip Withnall
60bd2510f2 Merge branch 'backport-2661-uwp-warnings-glib-2-72' into 'glib-2-72'
Backport !2661 “win32appinfo: change log level from warning to debug” to glib-2-72

See merge request GNOME/glib!2691
2022-05-30 12:52:54 +00:00
Ignacio Casal Quinteiro
57739ebd5f win32appinfo: change log level from warning to debug
There is nothing that the user can do anyway and this dumps
lots of warnings without real need.

Closes #2640
2022-05-26 15:30:41 +01:00
Christian Kirbach
92177755ed Update German translation 2022-05-22 21:49:55 +00:00
Charles Monzat
4d6e03745e Update French translation 2022-05-22 08:33:07 +00:00
Philip Withnall
7aef380e6f Merge branch 'backport-2654-task-alloc-performance-glib-2-72' into 'glib-2-72'
Backport !2654 “gtask: use g_strconcat() in g_task_return() only if needed” to glib-2-72

See merge request GNOME/glib!2662
2022-05-18 14:09:00 +00:00
Ignacio Casal Quinteiro
7b140e1909 gtask: use g_strconcat() in g_task_return() only if needed
If the task name is NULL there is no need to allocate the string
since this can be expensive if called very often
2022-05-17 14:18:46 +01:00
Pawan Chitrakar
f48e0a91a5 Update Nepali translation 2022-05-11 07:32:36 +00:00
Pawan Chitrakar
37f6bc6114 Update Nepali translation 2022-05-10 09:37:56 +00:00
Sebastian Dröge
3d7d06a4a8 Merge branch 'backport-2642-meson-undefined-glib-2-72' into 'glib-2-72'
Backport !2642 “meson: Check rres.compiled() before calling rres.returncode()” to glib-2-72

See merge request GNOME/glib!2643
2022-05-10 09:00:34 +00:00
Sebastian Dröge
3370232419 Merge branch 'backport-2631-ptrdiff-glib-2-72' into 'glib-2-72'
Backport !2631 “Cast to guintptr instead of subtracting by null” to glib-2-72

See merge request GNOME/glib!2644
2022-05-10 09:00:31 +00:00
TestingPlant
c1683b0468 Cast to guintptr instead of subtracting by null
Subtraction by a null pointer is undefined behavior, so it's been
replaced with a cast to guintptr.
2022-05-09 13:22:28 +01:00
illiliti
e1f5b86fc2 meson: Check rres.compiled() before calling rres.returncode()
As per meson spec, returncode() produces unspecified data if
compiled() == false. Check compiled() first to avoid relying
upon unspecified data.

In addition, muon -- an implemetation of meson written in C goes
further and forbids returning unspecified data. This is a good
decision, but also makes it harder to support applications which
wrongly use meson API. Therefore, application needs to be fixed.
2022-05-09 13:16:29 +01:00
Sebastian Dröge
41594e97c5 Merge branch 'backport-2615-gio-pkgconfig-fix-glib-2-72' into 'glib-2-72'
Backport !2615 “Meson: Fix gio-windows-2.0 override name” to glib-2-72

See merge request GNOME/glib!2616
2022-04-29 08:02:37 +00:00
Sebastian Dröge
748090b0d9 Merge branch 'backport-2449-2600-mingw-test-fixes-glib-2-72' into 'glib-2-72'
Backport !2449 and !2600 mingw test fixes to glib-2-72

See merge request GNOME/glib!2605
2022-04-29 07:59:40 +00:00
Sebastian Dröge
210416bbc0 Merge branch 'backport-2626-2627-leak-fixes-glib-2-72' into 'glib-2-72'
Backport !2626, !2627 minor leak fixes to glib-2-72

See merge request GNOME/glib!2629
2022-04-29 07:58:19 +00:00
Philip Withnall
a31474e41d gopenuriportal: Fix a use-after-free on an error path
`path` was used in building the error message after it had been freed.
Spotted by scan-build.

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

Helps: #1767
2022-04-28 11:47:30 +01:00
Philip Withnall
d5386a5493 gio-tool: Fix a minor memory leak when using gio-set with bytestrings
Tested using:
```sh
touch ~/foo
gio set ~/foo -t bytestring user::test "\x00\x00"
```
(it doesn’t matter that this fails; the bytestring is still decoded)

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

Coverity CID: #1474407
2022-04-28 11:47:30 +01:00
Marc-André Lureau
25616eb7ee gio/tests: fix socket /socket/credentials/unix_socketpair on win32
When I enabled unix socketpair test on win32, I left the existing
g_close(fds[1]), but _g_win32_socketpair() returns native sockets
descriptors that must be closed with closesocket() on win32.

Let GSocket handle the socket pair cleanup.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-25 14:29:52 +01:00
Marc-André Lureau
1e5faeedd8 gio/tests: GStatBuf.st_size is 64 bits on win64
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-25 14:29:52 +01:00
Xavier Claessens
e7a6e91e02 Meson: Fix gio-windows-2.0 override name
The override name must match the pkgconfig name.
2022-04-25 11:33:45 +01:00
Bruce Cowan
82feda1ccf Update British English translation 2022-04-24 10:30:51 +00:00
Goran Vidović
c80dec72c0 Update Croatian translation 2022-04-20 17:44:55 +00:00
Fran Dieguez
77bf623bee Update Galician translation 2022-04-19 06:04:40 +00:00
Ask Hjorth Larsen
d57e17ce9d Updated Danish translation 2022-04-18 19:22:58 +02:00
Enrico Nicoletto
e8cd7d1918 Update Brazilian Portuguese translation 2022-04-15 16:56:16 +00:00
Marc-André Lureau
bda6992fb6 tests: fix protocol test on win32
The pipe must be closed, or the child PID watch doesn't get triggered.

We should remove the message callback source on EOF, as EOF during main
loop run will reach a bad assert in the callback.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-04-14 13:19:17 +01:00
Chun-wei Fan
ccc2a73e86 glib/tests/date.c: Fix 2-digit year test
...for certain Windows locales, since the formats accepted for
g_date_set_parse() will vary depending on the current system locale.  For
instance, g_date_set_parse(gdate, "dd/mm/yy") is accepted on locales such
as zh-HK (Chinese (Hong Kong SAR)) but is rejected on zh-TW (Chinese
(Taiwan)).

One can tell from the "date format" settings in the Windows system
control panel whether there is a "dd/MM/YYYY" or "dd/MM/YY" option from the
drop-down list of date formats to display for the locale, which will indicate
whether g_date_set_parse(gdate, "dd/mm/yy") is accepted, which is true for
zh-HK but is not true for zh-TW.

If g_date_set_parse(gdate, "dd/mm/yy") is not accepted, try again with
g_date_set_parse(gdate, "yy/mm/dd") thereafter for the 2-digit-year tests.
2022-04-14 13:18:36 +01:00
Chun-wei Fan
b47e7b3503 gdate.c: Use standard name if no daylight saving exists
We should normally have a standard name for the time zone even if we don't
have daylight saving in the time zone, so use the standard name also when
GetTimeZoneInformation() returns TIME_ZONE_ID_UNKNOWN[1][2].

[1]: https://docs.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
[2]: https://docs.microsoft.com/zh-tw/windows/win32/api/timezoneapi/nf-timezoneapi-settimezoneinformation
2022-04-14 13:18:36 +01:00
Philip Withnall
38d076a5fd 2.72.1
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2.72.1
2022-04-14 12:15:25 +01:00
Kukuh Syafaat
0587ef97fc Update Indonesian translation 2022-04-11 09:08:49 +00:00
Aleksandr Melman
4efe65117d Update Russian translation 2022-04-09 15:35:33 +00:00
Alexander Shopov
06a0c8abd9 Update Bulgarian translation 2022-04-09 07:56:28 +00:00
Sebastian Dröge
d30a726069 Merge branch 'wip/pwithnall/backport-2578-clang-cxx-glib-2-72' into 'glib-2-72'
Backport !2578 “gatomic: Add a C++ variant of g_atomic_int_compare_and_exchange()” to glib-2-72

See merge request GNOME/glib!2593
2022-04-06 13:29:21 +00:00
Philip Withnall
45da15a50c 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-06 12:34:53 +01:00
Philip Withnall
0e33f1110f 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-06 12:34:53 +01:00
Philip Withnall
62a60f1d60 tests: Fix a typo in a test skip message
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-06 12:34:53 +01:00
Simon McVittie
817fc993c7 Merge branch 'backport-2589-test-dbus-exit-on-close-glib-2-72' into 'glib-2-72'
Backport !2589 “tests: Don’t exit gdbus-method-invocation test early on connection close” to glib-2-72

See merge request GNOME/glib!2590
2022-04-05 16:23:35 +00:00
Philip Withnall
18cb90980e 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 15:51:20 +01:00
Simon McVittie
d50bc089e2 Merge branch 'backport-translation-fixes-and-2571-glib-2-72' into 'glib-2-72'
Backport translation fixes and !2571 “meson: Set BROKEN_POLL in macOS builds” to glib-2-72

See merge request GNOME/glib!2573
2022-04-05 14:23:33 +00:00
Simon McVittie
e62f5222bb Merge branch 'backport-2565-meson-python-fix-glib-2-72' into 'glib-2-72'
Backport !2565 “Revert "meson: simplify lookup of python command"” to glib-2-72

See merge request GNOME/glib!2574
2022-04-05 14:22:32 +00:00
Simon McVittie
49910134c8 Merge branch 'backport-2583-portal-trashing-dirs-glib-2-72' into 'glib-2-72'
Backport !2583 “Fix trashing sandboxed directories” to glib-2-72

See merge request GNOME/glib!2587
2022-04-05 14:18:02 +00:00
Philip Withnall
880f974b96 Merge branch 'backport-2582-win32-gui-spawn-glib-2-72' into 'glib-2-72'
Backport !2582 “glib/win32: fix spawn from GUI regression” to glib-2-72

See merge request GNOME/glib!2588
2022-04-05 13:10:20 +00:00
Marc-André Lureau
44a82bf84c 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-05 13:13:52 +01:00
Matthias Clasen
cdf74f8169 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-05 13:00:16 +01:00
Philip Withnall
ce71974576 Revert "meson: simplify lookup of python command"
This reverts commit 4a4d9eb6624b69328fa9749236c0b4236932ceb8.

It seems to cause build failures with `VsDevCmd.bat` 2022:
```
..\meson.build:2274:0: ERROR: Command "C:\Program Files\Meson\meson.exe runpython --version" failed with status 2.
```

Revert it for now until this can be fixed in Meson.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2541#note_1410521
2022-03-29 12:36:36 +01:00
Haruka Ma
1738e25375 meson: Set BROKEN_POLL in macOS builds 2022-03-28 13:02:59 +01:00
Andre Klapper
edd0bdbc93 Fix invalid markup in Bulgarian translation 2022-03-28 13:02:59 +01:00
Philip Withnall
e951bf1ae3 docs: Improve formatting for some file monitor documentation
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-23 15:34:19 +00:00
Philip Withnall
bbf1dca06a docs: Drop reference to G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME
Support for separate directory monitors was dropped in commit
b995c08bf32cb701b92bd8c98651de2d77cade9e, in 2015.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-23 15:32:37 +00:00