summaryrefslogtreecommitdiff
path: root/m4/vsnprintf-posix.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-09-10 21:18:08 +0200
committerBruno Haible <bruno@clisp.org>2011-09-10 21:18:08 +0200
commitb9816b529202767826d9a556f9138f15eb898037 (patch)
treed752f7ee8e78d19bee61c7e3360f33863c7216fb /m4/vsnprintf-posix.m4
parent9a5654c9d319013848ccfb6c4f10d74a828b1ef5 (diff)
downloadgnulib-b9816b529202767826d9a556f9138f15eb898037.tar.gz
*printf: Add support for MSVC compiler.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): On MSVC, install a handler that handles the exception caused by the %n directive. When cross-compiling, guess no on native Windows. (gl_SNPRINTF_TRUNCATION_C99, gl_SNPRINTF_RETVAL_C99, gl_SNPRINTF_DIRECTIVE_N, gl_SNPRINTF_SIZE1): When snprintf is missing, emulate it through vsnprintf. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Update comment. * doc/posix-functions/dprintf.texi: Update documentation regarding MSVC 9. * doc/posix-functions/fprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/glibc-functions/asprintf.texi: Likewise. * doc/glibc-functions/obstack_printf.texi: Likewise. * doc/glibc-functions/obstack_vprintf.texi: Likewise. * doc/glibc-functions/vasprintf.texi: Likewise.
Diffstat (limited to 'm4/vsnprintf-posix.m4')
-rw-r--r--m4/vsnprintf-posix.m44
1 files changed, 2 insertions, 2 deletions
diff --git a/m4/vsnprintf-posix.m4 b/m4/vsnprintf-posix.m4
index b5ae66e1a5..3b720885ad 100644
--- a/m4/vsnprintf-posix.m4
+++ b/m4/vsnprintf-posix.m4
@@ -1,4 +1,4 @@
-# vsnprintf-posix.m4 serial 14
+# vsnprintf-posix.m4 serial 15
dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -23,7 +23,7 @@ AC_DEFUN([gl_FUNC_VSNPRINTF_POSIX],
gl_cv_func_vsnprintf_posix=no
AC_CHECK_FUNCS([vsnprintf])
if test $ac_cv_func_vsnprintf = yes; then
- dnl Assume that if vsnprintf() exists, snprintf() also exists.
+ dnl These tests use vsnprintf() if snprintf() does not exist.
gl_SNPRINTF_TRUNCATION_C99
gl_SNPRINTF_RETVAL_C99
gl_SNPRINTF_DIRECTIVE_N