diff --git a/glib/gprintf.c b/glib/gprintf.c index 9293c83e6..fc0a02a3b 100644 --- a/glib/gprintf.c +++ b/glib/gprintf.c @@ -319,7 +319,7 @@ g_vasprintf (gchar **string, gint len; g_return_val_if_fail (string != NULL, -1); -#if !defined(HAVE_GOOD_PRINTF) +#if !defined(USE_SYSTEM_PRINTF) len = _g_gnulib_vasprintf (string, format, args); if (len < 0) diff --git a/glib/gprintfint.h b/glib/gprintfint.h index 6bf5fdad5..02bd9482f 100644 --- a/glib/gprintfint.h +++ b/glib/gprintfint.h @@ -25,7 +25,7 @@ #ifndef __G_PRINTFINT_H__ #define __G_PRINTFINT_H__ -#ifdef HAVE_GOOD_PRINTF +#ifdef USE_SYSTEM_PRINTF #define _g_printf printf #define _g_fprintf fprintf diff --git a/glib/meson.build b/glib/meson.build index dac28c06d..91a48f194 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -12,7 +12,7 @@ endif # . When we can depend # on a meson version where those are fixed, revert the commit that # introduced this workaround. -if have_good_vsnprintf and have_good_snprintf and have_good_printf +if use_system_printf gnulib_lib = [] gnulib_objects = [] gnulib_libm_dependency = [] diff --git a/meson.build b/meson.build index 88573e400..ed78359e5 100644 --- a/meson.build +++ b/meson.build @@ -913,17 +913,16 @@ else glib_conf.set('EXEEXT', '') endif -if have_good_vsnprintf and have_good_snprintf and have_good_printf - # Our printf is 'good' only if vsnpintf()/snprintf()/printf() supports C99 well enough - glib_conf.set('HAVE_GOOD_PRINTF', 1) -else +# Our printf is 'good' only if vsnpintf()/snprintf()/printf() supports C99 well enough +use_system_printf = have_good_vsnprintf and have_good_snprintf and have_good_printf +glib_conf.set('USE_SYSTEM_PRINTF', use_system_printf) +glibconfig_conf.set('GLIB_USING_SYSTEM_PRINTF', use_system_printf) + +if not use_system_printf + # gnulib has vasprintf so override the previous check glib_conf.set('HAVE_VASPRINTF', 1) endif -glibconfig_conf.set('GLIB_USING_SYSTEM_PRINTF', - have_good_vsnprintf and have_good_snprintf and have_good_printf) - - # Check for nl_langinfo and CODESET if cc.links('''#include int main (int argc, char ** argv) {