diff options
author | Bruno Haible <bruno@clisp.org> | 2003-06-19 15:58:21 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:10:43 +0200 |
commit | 2a6865d666c2617f1f46fa7c46db9989155a848a (patch) | |
tree | a89654099f6ad67f651788e10df19162b0379ce8 /gettext-runtime/m4 | |
parent | 2602f446fa8c620b8c6b5a0cff38d0c6d3150c35 (diff) | |
download | external_gettext-2a6865d666c2617f1f46fa7c46db9989155a848a.zip external_gettext-2a6865d666c2617f1f46fa7c46db9989155a848a.tar.gz external_gettext-2a6865d666c2617f1f46fa7c46db9989155a848a.tar.bz2 |
Work around an autoconf problem.
Diffstat (limited to 'gettext-runtime/m4')
-rw-r--r-- | gettext-runtime/m4/printf-posix.m4 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gettext-runtime/m4/printf-posix.m4 b/gettext-runtime/m4/printf-posix.m4 index d96c32c..0baee62 100644 --- a/gettext-runtime/m4/printf-posix.m4 +++ b/gettext-runtime/m4/printf-posix.m4 @@ -19,11 +19,14 @@ AC_DEFUN([gt_PRINTF_POSIX], AC_TRY_RUN([ #include <stdio.h> #include <string.h> +/* The string "%2$d %1$d", with dollar characters protected from the shell's + dollar expansion (possibly an autoconf bug). */ +static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; static char buf[100]; int main () { - sprintf (buf, "%2$d %1$d", 33, 55); - return (strcmp (buf, "55 33") == 0); + sprintf (buf, format, 33, 55); + return (strcmp (buf, "55 33") != 0); }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no, [ AC_EGREP_CPP(notposix, [ |