diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-10-04 23:24:02 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-10-04 23:24:02 +0000 |
commit | 9a76ff17c18f3f2704df0a9d7f9466e75f0d1bcc (patch) | |
tree | 7152b39f53790f7714f15025e60071669f4c4315 /acinclude.m4 | |
parent | 7fabc62de73432ac069a6417a2bdb60507369e24 (diff) | |
download | glib-9a76ff17c18f3f2704df0a9d7f9466e75f0d1bcc.tar.gz |
Make the various printf feature test macros reflect the system printf,
2003-10-05 Matthias Clasen <maclas@gmx.de>
* 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)
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index f686739fa..f86034d75 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -23,6 +23,16 @@ doit(char * s, ...) 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); + exit(0); } |