summaryrefslogtreecommitdiffstats
path: root/gl/m4/printf-posix.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/printf-posix.m4')
-rw-r--r--gl/m4/printf-posix.m423
1 files changed, 13 insertions, 10 deletions
diff --git a/gl/m4/printf-posix.m4 b/gl/m4/printf-posix.m4
index 1eacf95..d7dfb60 100644
--- a/gl/m4/printf-posix.m4
+++ b/gl/m4/printf-posix.m4
@@ -1,5 +1,5 @@
1# printf-posix.m4 serial 5 (gettext-0.18) 1# printf-posix.m4 serial 6 (gettext-0.18.2)
2dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc. 2dnl Copyright (C) 2003, 2007, 2009-2013 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,8 @@ AC_DEFUN([gt_PRINTF_POSIX],
14 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], 14 AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
15 gt_cv_func_printf_posix, 15 gt_cv_func_printf_posix,
16 [ 16 [
17 AC_TRY_RUN([ 17 AC_RUN_IFELSE(
18 [AC_LANG_SOURCE([[
18#include <stdio.h> 19#include <stdio.h>
19#include <string.h> 20#include <string.h>
20/* The string "%2$d %1$d", with dollar characters protected from the shell's 21/* The string "%2$d %1$d", with dollar characters protected from the shell's
@@ -25,16 +26,18 @@ int main ()
25{ 26{
26 sprintf (buf, format, 33, 55); 27 sprintf (buf, format, 33, 55);
27 return (strcmp (buf, "55 33") != 0); 28 return (strcmp (buf, "55 33") != 0);
28}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, 29}]])],
29 [ 30 [gt_cv_func_printf_posix=yes],
30 AC_EGREP_CPP([notposix], [ 31 [gt_cv_func_printf_posix=no],
32 [
33 AC_EGREP_CPP([notposix], [
31#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ 34#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
32 notposix 35 notposix
33#endif 36#endif
34 ], 37 ],
35 [gt_cv_func_printf_posix="guessing no"], 38 [gt_cv_func_printf_posix="guessing no"],
36 [gt_cv_func_printf_posix="guessing yes"]) 39 [gt_cv_func_printf_posix="guessing yes"])
37 ]) 40 ])
38 ]) 41 ])
39 case $gt_cv_func_printf_posix in 42 case $gt_cv_func_printf_posix in
40 *yes) 43 *yes)