| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| |
| |
| | |
Handle plugable g_modules through RTLD_DEFAULT for NetBSD
Closes #19
See merge request GNOME/glib!3014
|
| |
| |
| |
| | |
fix issue #19
|
|\ \
| | |
| | |
| | |
| | | |
gio/gdesktopappinfo: Free the wrapped argv array on launch failure
See merge request GNOME/glib!3008
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | | |
Trying to use invalid Fd's numbers so that this would fail early.
|
| | |
| | |
| | |
| | |
| | | |
Add a custom launch context implementation so that we can test the
startup notification code better.
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix function name typo in comment of gtype.c
Closes #2791
See merge request GNOME/glib!3016
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
tests: Fix few new clang warnings
See merge request GNOME/glib!3013
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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)
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Clang was complaining:
../glib/tests/sequence.c:125:7: warning: variable 'i' set but not used
int i;
^
1 warning generated.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
gtimezone: Fix symlink checks on relative link targets
See merge request GNOME/glib!3009
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
| | | |
| | | |
| | | |
| | | | |
(cherry picked from commit 142f1712d22eb459d919bd0f4fe7cba573a58791)
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
meson: Cleanup and fix include files paths, using base path without repetitions
See merge request GNOME/glib!3011
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Meson is able to handle this automatically when we're installing in the
include-dir prefix.
|
| | |/ /
| |/| |
| | | |
| | | |
| | | | |
Avoid setting the subdir all the times, just use the global definition
plus the specific module subdir
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
docs: Stop claiming that gsize is wide enough to hold a pointer
See merge request GNOME/glib!3000
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
ghash: Correctly retrieve low 32 bits of 64-bit values
Closes #2787
See merge request GNOME/glib!2994
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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>
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Always ref-sink variants in g_object_set
Closes #2774
See merge request GNOME/glib!2934
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| |_|/ /
|/| | |
| | | |
| | | | |
docs: Soft-deprecate G_STRUCT_OFFSET in favour of offsetof
See merge request GNOME/glib!3002
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|\ \ \
| |/ /
|/| |
| | |
| | | |
glib, gmodule, gobject: Add generated headers to the lib dependency
See merge request GNOME/glib!2991
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | | |
It must be there to build, or we'd fail:
See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346909
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
|/ /
| |
| |
| | |
Move it multi-line to keep it more readable
|
|\ \
| | |
| | |
| | |
| | | |
build: Mark the g-file-info test as succeeding
See merge request GNOME/glib!3004
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \
| |/
|/|
| |
| | |
Fix sandbox escape in GDBusServer
See merge request GNOME/glib!3005
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| |
| | |
gio/tests/g-file-info: don't assume million-in-one events don't happen
See merge request GNOME/glib!2990
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
|/|
| |
| | |
meson: Don't explicitly disable mixed declarations and statements
See merge request GNOME/glib!2951
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | | |
gstrfuncs: Fix a compiler warning in g_strerror()
See merge request GNOME/glib!2956
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
gprintf: Avoid an infinite loop on ENOMEM in g_vasprintf()
Closes #2753
See merge request GNOME/glib!2944
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
tests: Fix code style in Python files to satisfy black and flake8
See merge request GNOME/glib!2984
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This should make the style-check-diff CI job happy again.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
|