~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to m4/printf-posix.m4

Update README.solaris.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# printf-posix.m4 serial 6 (gettext-0.18.2)
2
 
dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc.
 
1
# printf-posix.m4 serial 5 (gettext-0.18)
 
2
dnl Copyright (C) 2003, 2007, 2009-2010 Free Software Foundation, Inc.
3
3
dnl This file is free software; the Free Software Foundation
4
4
dnl gives unlimited permission to copy and/or distribute it,
5
5
dnl with or without modifications, as long as this notice is preserved.
14
14
  AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
15
15
    gt_cv_func_printf_posix,
16
16
    [
17
 
      AC_RUN_IFELSE(
18
 
        [AC_LANG_SOURCE([[
 
17
      AC_TRY_RUN([
19
18
#include <stdio.h>
20
19
#include <string.h>
21
20
/* The string "%2$d %1$d", with dollar characters protected from the shell's
26
25
{
27
26
  sprintf (buf, format, 33, 55);
28
27
  return (strcmp (buf, "55 33") != 0);
29
 
}]])],
30
 
        [gt_cv_func_printf_posix=yes],
31
 
        [gt_cv_func_printf_posix=no],
32
 
        [
33
 
          AC_EGREP_CPP([notposix], [
 
28
}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
 
29
      [
 
30
        AC_EGREP_CPP([notposix], [
34
31
#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
35
32
  notposix
36
33
#endif
37
 
            ],
38
 
            [gt_cv_func_printf_posix="guessing no"],
39
 
            [gt_cv_func_printf_posix="guessing yes"])
40
 
        ])
 
34
          ],
 
35
          [gt_cv_func_printf_posix="guessing no"],
 
36
          [gt_cv_func_printf_posix="guessing yes"])
 
37
      ])
41
38
    ])
42
39
  case $gt_cv_func_printf_posix in
43
40
    *yes)