[glib/glib-2-64: 1/2] meson: Don't use gnulib for printf on iOS
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-64: 1/2] meson: Don't use gnulib for printf on iOS
- Date: Thu, 6 Aug 2020 09:46:09 +0000 (UTC)
commit 41af1187c3fb26baa4404c70d74b1294f6d887db
Author: Nirbheek Chauhan <nirbheek centricular com>
Date: Thu Aug 6 05:02:59 2020 +0530
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
meson.build | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/meson.build b/meson.build
index 7c80472d8..810649376 100644
--- a/meson.build
+++ b/meson.build
@@ -834,6 +834,15 @@ if host_system == 'windows' and (cc.get_id() == 'msvc' or cc.get_id() == 'clang-
glib_conf.set('HAVE_C99_SNPRINTF', false)
glib_conf.set('HAVE_C99_VSNPRINTF', false)
glib_conf.set('HAVE_UNIX98_PRINTF', false)
+elif not cc_can_run and host_system in ['ios', 'darwin']
+ # All these are true when compiling natively on macOS, so we should use good
+ # defaults when building for iOS and tvOS.
+ glib_conf.set('HAVE_C99_SNPRINTF', true)
+ glib_conf.set('HAVE_C99_VSNPRINTF', true)
+ glib_conf.set('HAVE_UNIX98_PRINTF', true)
+ have_good_vsnprintf = true
+ have_good_snprintf = true
+ have_good_printf = true
else
vsnprintf_c99_test_code = '''
#include <stdio.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]