mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
Merge branch 'meson-printf-cleanup' into 'master'
meson: small printf check cleanups See merge request GNOME/glib!1032
This commit is contained in:
commit
0fba8f671c
@ -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)
|
||||
|
@ -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
|
||||
|
@ -12,7 +12,7 @@ endif
|
||||
# <https://github.com/mesonbuild/meson/issues/3937>. 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 = []
|
||||
|
19
meson.build
19
meson.build
@ -913,21 +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 whether the printf() family supports Unix98 %n$ positional parameters
|
||||
# AC_FUNC_PRINTF_UNIX98
|
||||
# Nothing uses HAVE_UNIX98_PRINTF
|
||||
|
||||
|
||||
# Check for nl_langinfo and CODESET
|
||||
if cc.links('''#include <langinfo.h>
|
||||
int main (int argc, char ** argv) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user