From: Bruno Haible Date: Thu, 19 Jun 2003 15:58:21 +0000 (+0000) Subject: Work around an autoconf problem. X-Git-Tag: v0.13~428 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a6865d666c2617f1f46fa7c46db9989155a848a;p=thirdparty%2Fgettext.git Work around an autoconf problem. --- diff --git a/gettext-runtime/m4/printf-posix.m4 b/gettext-runtime/m4/printf-posix.m4 index d96c32c82..0baee6297 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 #include +/* 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, [