diff m4/snprintf-posix.m4 @ 9940:0471a8660b70

Work around snprintf bug on Linux libc5.
author Bruno Haible <bruno@clisp.org>
date Sat, 19 Apr 2008 21:42:16 +0200
parents 787bf3487678
children aaeb2f86d096
line wrap: on
line diff
--- a/m4/snprintf-posix.m4
+++ b/m4/snprintf-posix.m4
@@ -1,4 +1,4 @@
-# snprintf-posix.m4 serial 12
+# snprintf-posix.m4 serial 13
 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -25,6 +25,7 @@
     gl_SNPRINTF_TRUNCATION_C99
     gl_SNPRINTF_RETVAL_C99
     gl_SNPRINTF_DIRECTIVE_N
+    gl_SNPRINTF_SIZE1
     gl_VSNPRINTF_ZEROSIZE_C99
     case "$gl_cv_func_printf_sizes_c99" in
       *yes)
@@ -58,11 +59,15 @@
                                                               *yes)
                                                                 case "$gl_cv_func_snprintf_directive_n" in
                                                                   *yes)
-                                                                    case "$gl_cv_func_vsnprintf_zerosize_c99" in
+                                                                    case "$gl_cv_func_snprintf_size1" in
                                                                       *yes)
-                                                                        # snprintf exists and is
-                                                                        # already POSIX compliant.
-                                                                        gl_cv_func_snprintf_posix=yes
+                                                                        case "$gl_cv_func_vsnprintf_zerosize_c99" in
+                                                                          *yes)
+                                                                            # snprintf exists and is
+                                                                            # already POSIX compliant.
+                                                                            gl_cv_func_snprintf_posix=yes
+                                                                            ;;
+                                                                        esac
                                                                         ;;
                                                                     esac
                                                                     ;;