23248 Commits

Author SHA1 Message Date
Philip Withnall
ffc9ac5599 Merge branch 'backport-2026-log-lines-glib-2-68' into 'glib-2-68'
Backport !2026 “Split g_test_log() messages that contain multiple lines” to glib-2-68

See merge request GNOME/glib!2035
2021-04-08 13:41:05 +00:00
Emmanuele Bassi
2e37754261 Split g_test_log() messages that contain multiple lines
When using TAP we want every single line to be one of the following:

 - a valid TAP clause
 - a comment
 - a blank line

Typical explicit test logs are single line comments, but in some cases
we might end up printing debug messages from libraries, and those may
contain multiple lines. When that happens, we break the TAP and fail the
test in conditions entirely outside of our control.

One option to avoid outright failure is to always prepend each line of a
messge with `#`, to ensure that the whole thing is considered a comment.
2021-04-07 16:36:06 +01:00
Philip Withnall
484531600c Merge branch 'glib-2-68-mr-2032' into 'glib-2-68'
Backport MR !2032 (gkeyfile: Drop a redundant check) into glib-2-68

See merge request GNOME/glib!2034
2021-04-07 13:44:36 +00:00
Benjamin Berg
56fe8cccc5 gsocks5proxy: Handle EOF when reading from a stream
The code did not handle EOF (0 byte read) correctly. This can e.g. cause
an infinite loop if an incorrect socks proxy is configured.

Add the appropriate checks and return an G_IO_ERROR_CONNECTION_CLOSED
error if EOF is encountered.
2021-04-07 16:29:40 +03:00
Bruce Cowan
e0c0342688 Update British English translation 2021-04-02 13:24:48 +00:00
Philip Withnall
3da1f2595f Merge branch 'vs2012-2-68' into 'glib-2-68'
Few fixes and notes for building on Visual Studio 2012 and earlier

See merge request GNOME/glib!2022
2021-03-31 15:52:23 +00:00
Chun-wei Fan
8da16a4f80 README.win32.md: Restore Visual Studio 2008/2010 support
It turns out that it is possible to use the Windows 8.0 SDK in Visual
Studio 2008 and 2010 officially, but requires a special setup in the
build command prompt.

Tell people how that special setup can be achieved, and restore the
extra instructions on building with Visual Studio 2008, as it is now
possible again.
2021-03-31 21:48:52 +08:00
Chun-wei Fan
a54af2f36f README.win32.md: Add info on roapi.h
The roapi.h that is included with the Windows 8.0 SDK mostly works under
plain C with one exception, so let people know the fix for that.  Note
that the Windows 8.1 and 10 SDKs contain copies of roapi.h that is
directly usable under plain C.
2021-03-31 21:48:52 +08:00
Chun-wei Fan
ce660066f2 gsocket.c: Declare variables at the top-of-block
This will allow the code to build on C89 compilers, since they do not
allow declaring a variable within a for loop initializer.
2021-03-31 21:48:52 +08:00
Chun-wei Fan
20bd716d4c option-context.c: Define NAN if not defined on MSVC
This will enable the build to succeed on older Visual Studio versions
that don't support NAN yet.  Other supported compilers should support
this.
2021-03-31 21:47:49 +08:00
Sebastian Dröge
d51c3b01fe Merge branch 'cherry-pick-e42aff25' into 'glib-2-68'
Backport MR !2016 (GIO W32: Pin gio DLL) into glib-2-68

See merge request GNOME/glib!2021
2021-03-31 06:25:09 +00:00
Philip Withnall
d4043d622a Merge branch 'gio-appinfo-thread-crash' into 'master'
GIO W32: Pin gio DLL

Closes #2300 and #2359

See merge request GNOME/glib!2016

(cherry picked from commit e42aff259223af6213ccb91b1453d2363f782a22)

f701d6c4 GIO W32: Pin gio DLL
03b574ae Don't leak a handle from _g_io_win32_get_module()
2021-03-31 02:55:28 +00:00
Sebastian Dröge
d84fbe0ee9 Merge branch 'backport-2009-key-file-locale-caching-glib-2-68' into 'glib-2-68'
Backport !2009 “gkeyfile: Fix crash when parsing translations on a second load” to glib-2-68

See merge request GNOME/glib!2010
2021-03-23 17:15:44 +00:00
Philip Withnall
77649d3d3d gkeyfile: Fix crash when parsing translations on a second load
If the same `GKeyFile` is reused to load multiple different key files,
any loads after the first which encounter translated keys will crash,
because clearing the data from the first load cleared the cached
language names, but didn’t clear `checked_locales`, so they were never
reloaded.

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

Fixes: #2361
2021-03-23 16:56:33 +00:00
Philip Withnall
07ab2e26c9 gkeyfile: Drop a redundant check
It should not be possible for `->locales` to be set without
`->checked_locales` being set, so drop the redundant check. This helps
with branch code coverage.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-23 16:56:33 +00:00
Sebastian Dröge
76b3b72621 Merge branch 'backport-1996-ghost-utils-includes-glib-2-68' into 'glib-2-68'
Backport !1996 “Include glibconfig.h to get the G_OS_UNIX token” to glib-2-68

See merge request GNOME/glib!1997
2021-03-19 07:40:23 +00:00
Andy Fiddaman
08f2ed7535 Include glibconfig.h to get the G_OS_UNIX token 2021-03-18 19:42:18 +00:00
Philip Withnall
a58a47fd6d 2.68.0
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2.68.0
2021-03-18 13:27:26 +00:00
Matej Urbančič
840d50b8d8 Update Slovenian translation 2021-03-17 17:44:17 +00:00
Sebastian Dröge
c53711492c Merge branch 'coverity-localfileoutputstream-error-handling' into 'master'
glocalfileoutputstream: Tidy up error handling

See merge request GNOME/glib!1994
2021-03-17 07:43:03 +00:00
Philip Withnall
2696384e0e Merge branch 'mcatanzaro/queue' into 'master'
tests: Fix copy/paste error in queue test

See merge request GNOME/glib!1995
2021-03-16 18:11:55 +00:00
Michael Catanzaro
3a74ad128e tests: Fix copy/paste error in queue test
Coverity is pretty good at detecting copy/paste errors.
2021-03-16 12:53:44 -05:00
Philip Withnall
c4b4fecaef glocalfileoutputstream: Tidy up error handling
After the recent reworking of this code it was possible for `g_close()`
to be called on `fd == -1`, which is invalid. It would have reported an
error, were errors not ignored. So it was harmless, but still best to
fix.

Simplify the error handling by combining both error labels and checking
the state of `fd` dynamically.

Coverity CID: #1450834

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-16 11:36:27 +00:00
Milo Casagrande
01101813a5 Update Italian translation 2021-03-15 08:06:09 +00:00
Philip Withnall
4784da5047 Merge branch 'valgrind-updates' into 'master'
glib.supp: Generalize some suppressions

See merge request GNOME/glib!1989
2021-03-14 17:18:57 +00:00
Sebastian Dröge
094206f1eb Merge branch 'bytes-icon-docs' into 'master'
gbytesicon: Fix error in g_bytes_icon_new() documentation

See merge request GNOME/glib!1992
2021-03-14 16:20:12 +00:00
Philip Withnall
d26d70d66a gbytesicon: Fix error in g_bytes_icon_new() documentation
It said that `NULL` could be returned, but actually `g_bytes_icon_new()`
can never fail.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-14 15:53:24 +00:00
Aurimas Černius
7bd4a2b146 Updated Lithuanian translation 2021-03-14 12:30:22 +02:00
Piotr Drąg
1a1824ce6e Update Polish translation 2021-03-13 19:40:16 +01:00
Jiri Grönroos
e31936eeaf Update Finnish translation 2021-03-13 12:38:43 +00:00
Marek Černocký
cc060c6cb9 Updated Czech translation 2021-03-13 11:50:53 +01:00
Daniel Șerbănescu
366d5e1fdf Update Romanian translation 2021-03-13 10:49:59 +00:00
Changwoo Ryu
68fccd6559 Update Korean translation 2021-03-13 06:15:27 +00:00
Philip Chimento
ad96f02bdb glib.supp: Generalize some suppressions
Some versions of compilers inline gobject_init_ctor() and
type_class_init_Wm(), so the existing suppression rules would no longer
match. Try to generalize them to handle these cases.
2021-03-12 15:41:28 -08:00
Sebastian Dröge
986694d7b2 Merge branch 'gconstructor-fix' into 'master'
build: Drop gconstructor_as_data_h usage from glib-compile-schemas

See merge request GNOME/glib!1987
2021-03-12 13:06:41 +00:00
Philip Withnall
39ecc25383 build: Drop gconstructor_as_data_h usage from glib-compile-schemas
The variable `gconstructor_code` (which is what’s defined by
`gconstructor_as_data_h`) is not used at all inside
`glib-compile-schemas`.

This looks like a copy/paste error from the build definition for
`glib-compile-resources` below, which does need it.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-12 12:42:17 +00:00
Sabri Ünal
e85c4a550f Update Turkish translation 2021-03-11 20:20:44 +00:00
Philip Withnall
b3384e5797 2.67.6
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2.67.6
2021-03-11 16:52:09 +00:00
Hugo Carvalho
cdfa8a627d Update Portuguese translation 2021-03-11 14:48:08 +00:00
Emmanuele Bassi
327ea4e30d Merge branch '2327-mkenums-version-macros' into 'master'
glib-mkenums: Parse and skip deprecation/availability annotations

Closes #2327

See merge request GNOME/glib!1984
2021-03-11 14:40:57 +00:00
Fran Dieguez
f1b2909e04 Update Galician translation 2021-03-11 14:21:56 +00:00
Philip Withnall
c92d9dc267 enums: Add missing GLIB_AVAILABLE_ENUMERATOR_IN_2_68 annotations
In the 2.68 cycle we’d added 3 new enumerator elements. Due to the
preceding commit, they can now be annotated with
`GLIB_AVAILABLE_ENUMERATOR_IN_2_68`, which will make it a bit easier for
third party projects to notice when they’re using these symbols without
having bumped their GLib dependency.

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

Fixes: #2327
2021-03-11 13:37:49 +00:00
Philip Withnall
856aeba9e4 glib-mkenums: Parse and skip deprecation/availability annotations
Teach `glib-mkenums` how to parse and ignore:
 - `GLIB_AVAILABLE_ENUMERATOR_IN_x_xx`
 - `GLIB_DEPRECATED_ENUMERATOR_IN_x_xx`
 - `GLIB_DEPRECATED_ENUMERATOR_IN_x_xx_FOR(x)`

Future work could expose the deprecation/availability information as
substitutions in the template file, but this commit does not do that.

It does, however, add some unit tests for the annotations.

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

Fixes: #2327
2021-03-11 13:37:49 +00:00
Sebastian Dröge
db0ec9528e Merge branch '2328-file-new-empty-path' into 'master'
glocalvfs: Create a dummy file for g_file_new_for_path("")

Closes #2328

See merge request GNOME/glib!1983
2021-03-11 09:42:19 +00:00
Tim Sabsch
3cf65c4989 Update German translation 2021-03-10 19:57:52 +00:00
Guillaume Bernard
f041188bbd Update French translation 2021-03-10 19:41:52 +00:00
Philip Withnall
519bdf665b Merge branch 'work-out-libutil-soname-at-build-time' into 'master'
gio/tests/{meson.build,pollable.c}: Determine libutil SONAME at build time

See merge request GNOME/glib!1977
2021-03-10 19:35:18 +00:00
Asier Sarasua Garmendia
e72c235734 Update Basque translation 2021-03-10 19:10:57 +00:00
Philip Withnall
d52728f994 glocalvfs: Create a dummy file for g_file_new_for_path("")
`""` is not a valid path (`stat()` on it returns `ENOENT`). Previously,
a full `GLocalFile` was being created, which ended up resolving to
`$CWD`, through path canonicalisation. That isn’t right.

Fix it by creating a `GDummyFile` instead, and adding a unit test.

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

Fixes: #2328
2021-03-10 19:10:38 +00:00
Philip Withnall
628e1c5893 gdummyfile: Return NULL from get_basename() if no path is stored
Rather than returning a URI, which definitely won’t be a valid basename.

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

Helps: #2328
2021-03-10 19:10:04 +00:00