summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Install gversionmacros.h in the right placeebassi/version-header-installEmmanuele Bassi2022-10-261-2/+3
| | | | | | The gversionmacros.h header is referenced from glib/, so it needs to go into glib's include directory, not in the top-level alongside glib.h, glib-object.h, gmodule.h, and glib-unix.h.
* Merge branch 'RTLD_DEFAULT' into 'main'Philip Withnall2022-10-261-2/+2
|\ | | | | | | | | | | | | Handle plugable g_modules through RTLD_DEFAULT for NetBSD Closes #19 See merge request GNOME/glib!3014
| * Handle plugable g_modules through RTLD_DEFAULT for NetBSDEmmanuel Fleury2022-10-251-2/+2
| | | | | | | | fix issue #19
* | Merge branch 'fix-desktop-app-info-leak' into 'main'Philip Withnall2022-10-264-15/+190
|\ \ | | | | | | | | | | | | gio/gdesktopappinfo: Free the wrapped argv array on launch failure See merge request GNOME/glib!3008
| * | gio/gdesktopappinfo: Free the wrapped argv array on launch failureMarco Trevisan (Treviño)2022-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We create an array that we never free, ensure this is the case. The previous commit gives CI a chance to check this with valgrind job. Found as part of another review: - https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2839#note_1524922
| * | gio/tests/desktop-app-info: Add test to check failure on launch as managerMarco Trevisan (Treviño)2022-10-251-0/+53
| | | | | | | | | | | | Trying to use invalid Fd's numbers so that this would fail early.
| * | gio/tests/desktop-app-info: Add a TestLaunchContext to improve SN testingMarco Trevisan (Treviño)2022-10-251-4/+99
| | | | | | | | | | | | | | | Add a custom launch context implementation so that we can test the startup notification code better.
| * | desktop-app-info: Run test without display, they work with no issueMarco Trevisan (Treviño)2022-10-252-12/+0
| | |
| * | tests/desktop-app-info: Check if launched signal is emittedMarco Trevisan (Treviño)2022-10-251-0/+27
| | |
| * | gvariant: Add missing explicit g_variant_dict_lookup testsMarco Trevisan (Treviño)2022-10-251-0/+11
| | |
* | | Merge branch 'cesun/fix-add-instance-private-typo' into 'main'Philip Withnall2022-10-261-2/+2
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fix function name typo in comment of gtype.c Closes #2791 See merge request GNOME/glib!3016
| * | | Fix function name typo in comment of gtype.csunce2022-10-261-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | The function adjusting private struct size to private struct offset should be `g_type_class_adjust_private_offset`, instead of the previously misspelled `g_type_class_add_instance_private` in comment. Fixes #2791
* | | Merge branch 'wip/3v1n0/clang-warning-fixes' into 'main'Philip Withnall2022-10-252-6/+8
|\ \ \ | | | | | | | | | | | | | | | | tests: Fix few new clang warnings See merge request GNOME/glib!3013
| * | | tests/strfuncs: Do not compare string literal with pointersMarco Trevisan (Treviño)2022-10-241-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise clang would complain: ../glib/tests/strfuncs.c:2603:32: warning: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare] g_assert_true ((gpointer)str != (gpointer)""); ^ ~~~~~~~~~~~~ ../glib/gtestutils.h:187:59: note: expanded from macro 'g_assert_true' if G_LIKELY (expr) ; else \ ^~~~ ../glib/gmacros.h:1186:59: note: expanded from macro 'G_LIKELY' #define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR(expr), 1)) ^~~~ ../glib/gmacros.h:1180:8: note: expanded from macro '_G_BOOLEAN_EXPR' if (expr)
| * | | tests/sequence: Ensure iterator is set and actually checkedMarco Trevisan (Treviño)2022-10-241-1/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | Clang was complaining: ../glib/tests/sequence.c:125:7: warning: variable 'i' set but not used int i; ^ 1 warning generated.
* | | Merge branch 'timezone-relative-link-target' into 'main'Philip Withnall2022-10-252-1/+27
|\ \ \ | | | | | | | | | | | | | | | | gtimezone: Fix symlink checks on relative link targets See merge request GNOME/glib!3009
| * | | gfileutils: Mention possibility of relative paths in g_file_read_link()Philip Withnall2022-10-241-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It’s entirely possible that `g_file_read_link()` will return a relative path. Mention that in the documentation, and include a short example of how to make the path absolute for further computation. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
| * | | gtimezone: Fix symlink checks on relative link targetsPhilip Withnall2022-10-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes in 6265b2e6f70d6f0ec4d16adcdc5f7c53aecf0da4 to reject weird `/etc/localtime` configurations where `/etc/localtime` links to another symlink did not consider the case where the target of `/etc/localtime` is a *relative* path. They only considered the case where the target is absolute. Relative paths are permissible in all symlinks. On my Fedora 36 system, `/etc/localtime`’s target is `../usr/share/zoneinfo/Europe/London`. Fix the check for toolbx by resolving relative paths before calling `g_lstat()` on them. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* | | | Update Friulian translationFabio Tomat2022-10-251-112/+146
| | | | | | | | | | | | | | | | (cherry picked from commit 142f1712d22eb459d919bd0f4fe7cba573a58791)
* | | | Merge branch 'wip/add-built-headers-deps-v2' into 'main'Marco Trevisan2022-10-255-18/+22
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | meson: Cleanup and fix include files paths, using base path without repetitions See merge request GNOME/glib!3011
| * | | | meson: Remove unneeded install_tag's on headersMarco Trevisan (Treviño)2022-10-244-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Meson is able to handle this automatically when we're installing in the include-dir prefix.
| * | | | meson: Cleanup include-dir paths, use base path without repetitionsMarco Trevisan (Treviño)2022-10-245-14/+22
| | |/ / | |/| | | | | | | | | | | | | | Avoid setting the subdir all the times, just use the global definition plus the specific module subdir
* | | | Merge branch 'wip/smcv/pointers-can-be-large' into 'main'Simon McVittie2022-10-241-4/+13
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | docs: Stop claiming that gsize is wide enough to hold a pointer See merge request GNOME/glib!3000
| * | | | docs: Stop claiming that gsize is wide enough to hold a pointerSimon McVittie2022-10-241-4/+13
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Standard C specifically does not guarantee this, and it's untrue on CHERI architectures (which have 128-bit pointers into a 64-bit address space, with the remaining bits used for a capability-like mechanism). Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge branch 'wip/smcv/64-bit-hash' into 'main'Philip Withnall2022-10-241-2/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ghash: Correctly retrieve low 32 bits of 64-bit values Closes #2787 See merge request GNOME/glib!2994
| * | | | ghash: Correctly retrieve low 32 bits of 64-bit valuesSimon McVittie2022-10-241-2/+7
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dereferencing a pointer to a 64-bit object as though it was a 32-bit object is the same as taking the least significant 32 bits on a little-endian machine, but on a big-endian machine it is the same as taking the *most* significant 32 bits, which would result in these hash functions always hashing to zero. The /hash/int64/collisions and /hash/double/collisions test-cases in glib/tests/hash.c detect this and fail. Instead, fetch the whole 64-bit quantity and do the bit-manipulation to xor the more significant half with the less significant half in an architecture-neutral way. Fixes: dd1f4f70 "Optimize g_double_hash implementation" Fixes: c1af4b2b "Optional optimization for `g_int64_hash`" Resolves: https://gitlab.gnome.org/GNOME/glib/-/issues/2787 Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | | Merge branch 'floating-variants-grr' into 'main'Philip Withnall2022-10-242-6/+68
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always ref-sink variants in g_object_set Closes #2774 See merge request GNOME/glib!2934
| * | | | gobject: Always ref-sink variants in g_object_setMatthias Clasen2022-10-242-6/+68
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When collecting varargs, ignore the NOCOPY_CONTENTS flag for variants. That is what our docs advice for refcounted types, and it fixes a regression that was inadvertendly introduced when we stopped doing some extra GValue copies. Includes a test case by Philip Withnall. Fixes: #2774
* | | | Merge branch 'wip/smcv/standard-offsetof' into 'main'Philip Withnall2022-10-241-1/+6
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | docs: Soft-deprecate G_STRUCT_OFFSET in favour of offsetof See merge request GNOME/glib!3002
| * | | docs: Soft-deprecate G_STRUCT_OFFSET in favour of offsetofSimon McVittie2022-10-241-1/+6
| |/ / | | | | | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com>
* | | Merge branch 'wip/add-built-headers-deps' into 'main'Xavier Claessens2022-10-245-18/+56
|\ \ \ | |/ / |/| | | | | | | | glib, gmodule, gobject: Add generated headers to the lib dependency See merge request GNOME/glib!2991
| * | gnulib: Add glib built headers to the gnulib_lib required sourcesMarco Trevisan (Treviño)2022-10-231-0/+6
| | | | | | | | | | | | | | | | | | | | | g-gnulib.h includes glib.h that requires some headers to be generated, so ensure that this is always the case. See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2349167
| * | glib: Also include glibconfig.h in the libglib dependencies and sourcesMarco Trevisan (Treviño)2022-10-231-0/+1
| | | | | | | | | | | | | | | | | | It must be there to build, or we'd fail: See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346909
| * | glib, gmodule, gobject: Add generated headers to the lib dependencyMarco Trevisan (Treviño)2022-10-234-17/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires changing them from being generated sources at compile time to custom targets, but it also ensures that they are actually there when needed, in fact currently we may instead try to compile files that requires them without having been generated yet. See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346914 (glib) See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2344802 (gmodule) See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2345205 (gobject)
| * | meson: cleanup libglib dependenciesMarco Trevisan (Treviño)2022-10-231-1/+11
|/ / | | | | | | Move it multi-line to keep it more readable
* | Merge branch 'wip/pwithnall/macos-file-info-test-fixed' into 'main'Simon McVittie2022-10-211-4/+1
|\ \ | | | | | | | | | | | | build: Mark the g-file-info test as succeeding See merge request GNOME/glib!3004
| * | build: Mark the g-file-info test as succeedingPhilip Withnall2022-10-211-4/+1
| |/ | | | | | | | | | | | | | | | | Previously it was marked as failing on macOS, but commit ed3998b390f5ac7c711c2d3088192036168ad2b2 seems to have fixed that. yay! Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #1392
* | Merge branch 'gdbus-server-no-abstract-tmpdir' into 'main'Marco Trevisan2022-10-215-40/+11
|\ \ | |/ |/| | | | | Fix sandbox escape in GDBusServer See merge request GNOME/glib!3005
| * gio: remove pointless use of g_unix_socket_address_abstract_names_supported ↵msizanoen12022-10-214-32/+10
| | | | | | | | | | | | | | | | with unix:tmpdir= There's no point in checking for g_unix_socket_address_abstract_names_supported now that unix:tmpdir= always use non-abstract sockets.
| * gio/gdbusserver: use non-abstract socket for unix:tmpdir=msizanoen12022-10-211-8/+1
|/ | | | | | | | | | | | | | | | | This implements https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/350 for GDBus's server implementation. Abstract sockets belong to the network namespace instead of the mount namespace. As a result, mount namespace-based sandboxes (e.g. Flatpak) cannot restrict access to abstract sockets (and therefore GDBus's unix:tmpdir= server addresses), at least for applications with network access permission, which may result in sandbox escapes unless the application running the GDBus server explicitly check that the connecting process is not in a sandbox. As of the time of writing, no known applications using GDBusServer does this. Fix this by always using non-abstract sockets for unix:tmpdir=, which is allowed by the DBus specification.
* Merge branch 'time' into 'main'Emmanuele Bassi2022-10-201-2/+2
|\ | | | | | | | | gio/tests/g-file-info: don't assume million-in-one events don't happen See merge request GNOME/glib!2990
| * gio/tests/g-file-info: don't assume million-in-one events don't happenRoss Burton2022-10-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The access and creation time tests create a file, gets the time in seconds, then gets the time in microseconds and assumes that the difference between the two has to be above 0. As rare as this may be, it can happen: $ stat g-file-info-test-50A450 -c %y 2021-07-06 18:24:56.000000767 +0100 Change the test to simply assert that the difference not negative to handle this case. This is the same fix as 289f8b, but that was just modification time. Signed-off-by: Ross Burton <ross.burton@arm.com>
* | Merge branch 'allow-mixed-declarations' into 'main'Philip Withnall2022-10-201-1/+0
|\ \ | |/ |/| | | | | meson: Don't explicitly disable mixed declarations and statements See merge request GNOME/glib!2951
| * meson: Don't explicitly disable mixed declarations and statementsNirbheek Chauhan2022-10-141-1/+0
| | | | | | | | | | | | We require C99 now, and this warning was added for strict adherence to C89 because GCC allowed mixed declarations in gnu89 as a GCC extension. Let's get rid of this.
* | Merge branch 'fix-gstrerror-warning' into 'main'Philip Withnall2022-10-201-1/+1
|\ \ | | | | | | | | | | | | gstrfuncs: Fix a compiler warning in g_strerror() See merge request GNOME/glib!2956
| * | gstrfuncs: Fix a compiler warning in g_strerror()Matthias Clasen2022-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | MSVC is complaining about this code. Let’s try to help it see the light. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2800
* | | Merge branch '2753-vasprintf-loop' into 'main'Philip Withnall2022-10-201-1/+8
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | gprintf: Avoid an infinite loop on ENOMEM in g_vasprintf() Closes #2753 See merge request GNOME/glib!2944
| * | | gprintf: Avoid an infinite loop on ENOMEM in g_vasprintf()Philip Withnall2022-10-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of going through the normal error logging code, which does further allocations and will potentially call back into `g_vasprintf()` and create an infinite loop, just `fputs()` an error message and abort. If we’re getting `ENOMEM` the process is doomed anyway. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2753
* | | | Merge branch 'python-code-style-again' into 'main'Marco Trevisan2022-10-202-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tests: Fix code style in Python files to satisfy black and flake8 See merge request GNOME/glib!2984
| * | | | tests: Fix code style in Python files to satisfy black and flake8Philip Withnall2022-10-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should make the style-check-diff CI job happy again. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>