|
version 1.1, 2012/02/21 22:57:49
|
version 1.1.1.3, 2021/03/17 13:38:46
|
|
Line 1
|
Line 1
|
| # printf-posix.m4 serial 5 (gettext-0.18) | # printf-posix.m4 serial 6 (gettext-0.18.2) |
| dnl Copyright (C) 2003, 2007, 2009 Free Software Foundation, Inc. | dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc. |
| dnl This file is free software; the Free Software Foundation |
dnl This file is free software; the Free Software Foundation |
| dnl gives unlimited permission to copy and/or distribute it, |
dnl gives unlimited permission to copy and/or distribute it, |
| dnl with or without modifications, as long as this notice is preserved. |
dnl with or without modifications, as long as this notice is preserved. |
|
Line 14 AC_DEFUN([gt_PRINTF_POSIX],
|
Line 14 AC_DEFUN([gt_PRINTF_POSIX],
|
| AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], |
AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings], |
| gt_cv_func_printf_posix, |
gt_cv_func_printf_posix, |
| [ |
[ |
| AC_TRY_RUN([ | AC_RUN_IFELSE( |
| | [AC_LANG_SOURCE([[ |
| #include <stdio.h> |
#include <stdio.h> |
| #include <string.h> |
#include <string.h> |
| /* The string "%2$d %1$d", with dollar characters protected from the shell's |
/* The string "%2$d %1$d", with dollar characters protected from the shell's |
|
Line 25 int main ()
|
Line 26 int main ()
|
| { |
{ |
| sprintf (buf, format, 33, 55); |
sprintf (buf, format, 33, 55); |
| return (strcmp (buf, "55 33") != 0); |
return (strcmp (buf, "55 33") != 0); |
| }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, | }]])], |
| [ | [gt_cv_func_printf_posix=yes], |
| AC_EGREP_CPP([notposix], [ | [gt_cv_func_printf_posix=no], |
| | [ |
| | AC_EGREP_CPP([notposix], [ |
| #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ |
#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ |
| notposix |
notposix |
| #endif |
#endif |
| ], | ], |
| [gt_cv_func_printf_posix="guessing no"], | [gt_cv_func_printf_posix="guessing no"], |
| [gt_cv_func_printf_posix="guessing yes"]) | [gt_cv_func_printf_posix="guessing yes"]) |
| ]) | ]) |
| ]) |
]) |
| case $gt_cv_func_printf_posix in |
case $gt_cv_func_printf_posix in |
| *yes) |
*yes) |