version 1.1, 2017/01/24 14:48:55
|
version 1.1.1.2, 2021/03/17 00:49:17
|
Line 1
|
Line 1
|
# printf-posix.m4 serial 2 (gettext-0.13.1) | # printf-posix.m4 serial 6 (gettext-0.18.2) |
dnl Copyright (C) 2003 Free Software Foundation, Inc. | dnl Copyright (C) 2003, 2007, 2009-2013 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], |
#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | [ |
| AC_EGREP_CPP([notposix], [ |
| #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 yes") | [gt_cv_func_printf_posix="guessing no"], |
]) | [gt_cv_func_printf_posix="guessing yes"]) |
| ]) |
]) |
]) |
case $gt_cv_func_printf_posix in |
case $gt_cv_func_printf_posix in |
*yes) |
*yes) |
AC_DEFINE(HAVE_POSIX_PRINTF, 1, | AC_DEFINE([HAVE_POSIX_PRINTF], [1], |
[Define if your printf() function supports format strings with positions.]) |
[Define if your printf() function supports format strings with positions.]) |
;; |
;; |
esac |
esac |