Commit Graph

289 Commits

Author SHA1 Message Date
Philip Withnall
f91af2021c 2.65.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-08-18 11:49:43 +01:00
Andre Miranda
60eefd4de9 glocalfileinfo: Add statx() support
This currently just implements the same functionality as the existing
`stat()`/`fstat()`/`fstatat()`/`lstat()` calls, although where a reduced
field set is requested it may return faster.

Helps: #1970
2020-08-17 12:33:05 +01:00
Philip Withnall
b99008f57f 2.65.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-08-07 15:29:26 +01:00
Nirbheek Chauhan
77f9b0b9d5 meson: Don't use gnulib for printf on iOS
iOS and tvOS use the same printf family as macOS, and these all have
been available on macOS for a long time.

Closes https://gitlab.gnome.org/GNOME/glib/-/issues/1868
2020-08-06 05:16:15 +05:30
Philip Withnall
cd02eac2d4 gstdio: Add macOS support to g_fsync()
Apparently, `fsync()` doesn’t actually sync to the spinning disk on
macOS. You need an `fcntl()` for that.

See: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html

Spotted by Christoph Reiter in a comment on !369.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 21:38:17 +01:00
holin
eb3409a9c9
gmain: fix fetching timebase on non-Intel Darwin
Co-authored-by: Misty De Meo <mistydemeo@gmail.com>
2020-07-13 10:25:20 -07:00
Philip Withnall
625f1b4007 Merge branch 'Android-stpcpy' into 'master'
meson: check for stpcpy using cc.links()

See merge request GNOME/glib!1515
2020-06-08 11:29:24 +00:00
Vilius Sutkus 89
fcfb1c6b9e meson: Require 0.54.2 when building for Android ≤ 20
cc.has_function() provide false positive for Android-20 and earlier; the fix is in Meson 0.54.2. People attempting to cross-compile previously wouldn’t have been able to get it to work without manual intervention, so the dependency bump for this platform is not an additional obstacle for them.
2020-06-08 11:29:24 +00:00
Nirbheek Chauhan
a28b52d7db meson: Only look for _NSGetEnviron when building for macOS
On iOS it can cause build failures with some SDK versions, and its
usage will also cause the app to be rejected on submission.
2020-05-29 00:31:35 +05:30
Nirbheek Chauhan
3c78d0cec6 meson: Autodetect when building for iOS
Instead of relying on `system` to be set correctly in the
cross-compile file, detect when we're building for iOS/watchOS/tvOS.
2020-05-29 00:31:35 +05:30
Nirbheek Chauhan
c6af3c7749 meson: host_system can be ios when cross-compiling
Cross-compile system names aren't standardized in Meson yet[1], but we
already use this name in `tests/meson.build`, so use it here too for
consistency.

1. https://mesonbuild.com/Reference-tables.html#operating-system-names
2020-05-29 00:31:35 +05:30
James Le Cuirot
56271ff271 meson: Fix underlinking of static libintl by trying iconv and pthread
I thought about checking for an intl pkg-config file but upstream are
not interested in adding one so there seems little point.

Closes #1851
2020-05-28 09:16:32 +01:00
Philip Withnall
c1d7097d0a build: Drop unused G_ATOMIC_OP_MEMORY_BARRIER_NEEDED
See the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #1323
2020-05-19 16:20:31 +01:00
Chris Packham
a714484208 meson: Remove stray ], in O_DIRECTORY check
A stray ], was leftover from the autotools -> meson conversion. Remove
it.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
2020-05-14 10:18:39 +12:00
Martin Storsjö
1b94bfbd72 meson: Don't misdetect stpcpy on windows platforms on clang
See https://github.com/mesonbuild/meson/issues/3672 and
https://github.com/mesonbuild/meson/issues/5628 for explanations
of cases where meson misdetects functions due to clang builtins (that
always are available, regardless of whether the platform actually
provides them).

The same also happens on GCC 10, which added support for __has_builtin.
2020-05-11 20:23:43 +03:00
Martin Storsjö
4cf4dbfc1e meson: Add -Wno-format-zero-length for gcc/clang builds
Zero length format strings isn't something that needs to be warned
about.
2020-04-27 16:26:04 +03:00
Xavier Claessens
be3728b9fa Meson: Add glib_checks and glib_asserts options
In cases where performance are critical it can be useful to disable
checks and asserts. GStreamer has those options too, using the same name
and setting them yielding means we can set those options on the main
project (e.g. gst-build) and glib will inherit the same value when built
as subproject.
2020-04-09 09:17:35 -04:00
Nirbheek Chauhan
b462e2c80c meson: Use the b_vscrt option for selecting the CRT
This option has been available since 0.48, and we should use it
instead of only guessing based on buildtype.
2020-04-03 16:39:22 +05:30
Nirbheek Chauhan
e7cfe62e73 meson: Fix check for builtype arguments
`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
2020-04-03 16:39:22 +05:30
Seungha Yang
2744d7921d meson: Don't use assert in test code
The test code can be built on Windows using Cygwin or MSYS2.
Even though it's test code, it might bring assertion dialog box
for native Windows while meson configure.
2020-03-13 20:32:43 +09:00
Philip Withnall
604081971f build: Post-release version bump to 2.65.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-04 14:46:28 +00:00
Philip Withnall
369626e310 2.64.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-27 16:11:22 +00:00
Philip Withnall
b90eb15f3e 2.63.6
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 15:05:38 +00:00
Philip Withnall
65be80c3ed build: Rework path construction to reliably add prefix
There were a couple of custom paths which could end up being relative,
rather than absolute, due to not properly prefixing them with
`get_option('prefix')`.

The use of `join_paths()` here correctly drops all path components
before the final absolute path in the list of arguments. So if someone
configures GLib with an absolute path for `gio_module_dir`, that will be
used unprefixed; but if someone configures with a relative path, it will
be prefixed by `get_option('prefix)`.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1919
2020-02-07 17:12:35 +00:00
Philip Withnall
7f4cb36e8e 2.63.5
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-03 14:26:39 +00:00
Philip Withnall
12ee603039 Merge branch 'dab_libmount_auto_detection' into 'master'
meson: libmount autodectection

See merge request GNOME/glib!1344
2020-02-03 08:20:44 +00:00
stephane Cerveau
b220033cf0 meson: libmount autodectection
As it can be disabled, it should be automatic as the packahge might be
unavailable for a given target.
2020-02-01 18:53:56 +01:00
Xavier Claessens
47a20304bd ci: Update Meson to 0.52.1 in fedora docker
This is required to be able to build the doc. The debian docker is still
pinned to 0.49.2 which ensure we can build with both versions of meson.

Meson 0.52.0 warns about adding -Wall flag manually, we can remove that
because warning_level=1 (the default) option already implies it.
2020-01-29 15:54:53 +01:00
Philip Withnall
b413c50dcd 2.63.4
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-21 12:41:48 +00:00
Sebastian Dröge
d1a3be5605 Remove trailing comma from SYS_sched_getattr meson check 2020-01-19 10:48:33 +02:00
Sebastian Dröge
8b1f24f658 Check for SYS_sched_getattr before using it unconditionally
Really old versions of Linux don't have yet. In that case fall back to
the fallback code.

See 8aeca4fa64 (note_686823)
2020-01-16 16:02:39 +02:00
Sebastian Dröge
8aeca4fa64 GThreadPool - Don't inherit thread priorities when creating new threads
By default (on POSIX) we would be inheriting thread priorities from the
thread that pushed a new task on non-exclusive thread pools and causes a
new thread to be created. This can cause any non-exclusive thread pool
to accidentally contain threads of different priorities, or e.g. threads
with real-time priority.

To prevent this, custom handling for setting the scheduler settings for
Linux and Windows is added and as a fallback for other platforms a new
thread is added that is responsible for spawning threads for
non-exclusive thread pools.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1834
2020-01-15 23:18:33 +02:00
Philip Withnall
de7d7dbd6c 2.63.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Matthew Waters
86747cea08 build: don't check for protected visibility
It's not supported on macOS' clang compiler and will fail the visibility
check and thus make the G_GNUC_INTERNAL attribute do nothing.

Compiler stderr:
 /var/folders/nt/j2v2x4wd5cl33fq27mm31mwc0000gn/T/tmpxxf2zzi_/testfile.c:13:19: error: target does not support 'protected' visibility; using 'default' [-Werror,-Wunsupported-visibility]
  __attribute__ ((visibility ("protected")))
                  ^
1 error generated.

Checking if "GNU C visibility attributes test" compiles: NO
2019-12-03 13:33:16 +11:00
Philip Withnall
ae49ff0903 2.63.2
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-25 11:11:33 +00:00
Philip Withnall
505c954424 build: Check size_t compatibility with various other types
When choosing the type to base `size_t` on, check the compatibility of
passing pointers, as well as the width of the type, to avoid compiler
warnings in future.

For now, the code to do the checks is fairly ugly due to limitations in
Meson. In particular, the new checks are limited to gcc and clang (other
compilers will behave as before), and they are all duplicated. See the
comments in the code for links to Meson improvement requests.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1777
2019-11-05 09:20:00 +00:00
Philip Withnall
d97d4828d0 2.63.1
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-31 16:25:09 +00:00
Alan Coopersmith
2b34f52b01 build: no --export-dynamic ldflags for Solaris
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-10-04 13:23:25 -07:00
Emmanuele Bassi
c08e7b9364 Merge branch 'switch_to_gnu99' into 'master'
Switching from C gnu89 to C gnu99 standard

See merge request GNOME/glib!1035
2019-10-04 14:51:10 +00:00
Simon McVittie
42d8e17795 Always build tests if we enabled installed-tests
If we're cross-compiling, the installed-tests are useful even if we
can't run them on the build machine: we can copy them to the host
machine (possibly via a distro package like Debian's libglib2.0-tests)
and run them there.

While I'm changing the build-tests condition anyway, deduplicate it.

Based on a patch by Helmut Grohne.

Bug-Debian: https://bugs.debian.org/941509
Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-10-01 20:12:16 +01:00
Philip Withnall
bbbdc27151 build: Bump Python requirement to ≥ 3.5
We already depend on Meson 0.49.2, which depends on Python 3.5, so we’ve
actually implicitly had this requirement for a while. Might as well make
it explicit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-30 11:23:20 +01:00
Emmanuel Fleury
2f9c9e2c5a Switching from C gnu89 to C gnu99 standard 2019-09-17 19:48:56 +02:00
Philip Withnall
bbccd2c1d7 build: Post-release version bump to 2.63.0
Ready for the new unstable release series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-17 12:23:06 +01:00
Philip Withnall
a1af0be78c 2.62.0
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-09-05 17:54:38 +01:00
Philip Withnall
b3b6830d9a Merge branch 'wip/lantw/gthread-set-thread-name-on-bsd' into 'master'
gthread: Set thread name on *BSD

Closes #1761

See merge request GNOME/glib!1072
2019-09-02 11:10:16 +00:00
Ting-Wei Lan
f489b6f922 gthread: Set thread name on *BSD
Add support for setting thread name on FreeBSD, DragonFlyBSD, OpenBSD,
and NetBSD.

Fixes https://gitlab.gnome.org/GNOME/glib/issues/1761
2019-08-30 01:29:04 +08:00
Ting-Wei Lan
fe3c16608a meson: Move libdl_dep to the top level
Instead of letting each directory to find its way to link with libdl,
it is easier to put the check in the top level, so its result can be
used by all directories.

It is a follow-up of https://gitlab.gnome.org/GNOME/glib/merge_requests/810.
2019-08-29 23:25:40 +08:00
Philip Withnall
29388470f8 Merge branch 'easy-uwp-patches' into 'master'
Some (probably) easy uwp patches

See merge request GNOME/glib!1057
2019-08-26 20:18:45 +00:00
Nirbheek Chauhan
f84ef02914 windows: Move G_WINAPI_ONLY_APP to config.h
Also set the Windows version to be 10 or newer when targeting UWP, since
the Windows 8 SDK does not have many of the APIs we need, such as
_beginthreadex.
2019-08-27 00:17:29 +05:30
Christoph Reiter
26f7104d79 meson: small cleanup for printf checks
Instead of duplicating checks add a use_system_printf meson variable and
macro and use them everywhere.
2019-08-20 17:19:26 +02:00