This defines G_GNUC_FALLTHROUGH to expand to __attribute__((fallthrough))
on LLVM 10, so it can silence warnings from -Wimplicit-fallthrough.
ok ajacoutot@
glib by doing the following:
- Modify the g_mkdir_with_parents() function so that it will try to
create the specified path directly and if g_mkdir() fails, it will
fall back to walking the path one by one.
- In case of walking the path one by one, ignore ENOENT for all path
elements except for the last one, because g_mkdir_with_parents()
will fail with programs using unveil(2) (with statlie removed).
Ignoring ENOENT is completely fine because we really only care about
the last element of the path and this modification will also have the
benefit of avoiding useless stat calls
- My initial tests show that by just firing up a simple file dialog
this modification saves an average of 110 system calls, now imagine
running GNOME or Chrome with that. Each and every program using glib's
g_mkdir_with_parents() before opening the needed files (most do this)
will benefit from this.
- Check if the XDG directories actually exist before adding them to the
list used by file dialogs.
This is also useful if you are not running a complete desktop environment
and you simply do not have these directories.
ok ajacoutot@
glib2 checks for __sync_bool_compare_and_swap, and requires
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to be defined if the function is
available... except with special cases like Linux armv5. base gcc
implements __sync_bool_compare_and_swap on many of our archs but doesn't
provide __GCC_HAVE_* macros, so glib2 is confused. Extend the
existing workaround to unbreak.
ok ajacoutot@ (maintainer)
The old autoconf build has the following additional check after
determining a valid type for gsize, which is not present in meson.build.:
dnl If int/long are the same size, we see which one produces
dnl warnings when used in the location as size_t. (This matters
dnl on AIX with xlc)
dnl
AS_IF([test $ac_cv_sizeof_size_t = $ac_cv_sizeof_int &&
test $ac_cv_sizeof_size_t = $ac_cv_sizeof_long],
It matters on OpenBSD too. Since my meson-fu is lacking, the patch
simply reorders the if statement to put the one we need earlier.
Should prevent the timeout to refill the list of depenencies while
another thread is freeing it. Should help with segfault reported
on bugs@.
While here sync the kqueue rewrite with upstream.
ok ajacoutot@
- Stop using a socketpair(2) to communicate between two threads of
the same process.
- Call kevent() in non-blocking mode such that it can be integrated
in the poller thread of glib.
- Use glib's abstraction to poll(2) the kqueue instead of adding it
to itself Oo.
- Remove the secondary thread, the associated global hash table, its
broken locking and a lot of abstraction.
- Properly refcount sources.
/!\ This backend is still not generating the events Glib is expecting.
Please report any problem such that this can be pushed upstream.
ok ajacoutot@