From 9a76ff17c18f3f2704df0a9d7f9466e75f0d1bcc Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 4 Oct 2003 23:24:02 +0000 Subject: Make the various printf feature test macros reflect the system printf, 2003-10-05 Matthias Clasen * configure.in: Make the various printf feature test macros reflect the system printf, even when using the included printf. In particular, don't force HAVE_C99_SNPRINTF, since g-gnulib.h needs that test result. (#122973) * glib/gprintf.c (g_vasprintf): Don't rely on HAVE_VASPRINTF, directly check for _g_vasprintf. * glib/gprintfint.h (_g_vasprintf): Only define _g_vasprintf() if vasprintf() is available. * glib/gnulib/printf.c (_g_gnulib_vfprintf): Don't write trailing nul to the file. (#122973) * acinclude.m4 (AC_FUNC_VSNPRINTF_C99): Make the test detect non-C99-compliance of AIX 5.1 and Solaris vsnprintf(). (#122496) --- acinclude.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index f686739fa..f86034d75 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -20,6 +20,16 @@ doit(char * s, ...) r = vsnprintf(buffer, 5, s, args); va_end(args); + if (r != 7) + exit(1); + + /* AIX 5.1 and Solaris seems to have a half-baked vsnprintf() + implementation. The above will return 7 but if you replace + the size of the buffer with 0, it borks! */ + va_start(args, s); + r = vsnprintf(buffer, 0, s, args); + va_end(args); + if (r != 7) exit(1); -- cgit v1.2.1