Mercurial > gnulib
annotate m4/vfprintf-posix.m4 @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
1 # vfprintf-posix.m4 serial 14 |
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
2 dnl Copyright (C) 2007-2019 Free Software Foundation, Inc. |
8391 | 3 dnl This file is free software; the Free Software Foundation |
4 dnl gives unlimited permission to copy and/or distribute it, | |
5 dnl with or without modifications, as long as this notice is preserved. | |
6 | |
7 AC_DEFUN([gl_FUNC_VFPRINTF_POSIX], | |
8 [ | |
9 AC_REQUIRE([gl_PRINTF_SIZES_C99]) | |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
10 AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) |
8840
792e05ae7ac8
Fix *printf result for NaN, Inf, -0.0 on mingw.
Bruno Haible <bruno@clisp.org>
parents:
8832
diff
changeset
|
11 AC_REQUIRE([gl_PRINTF_INFINITE]) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
12 AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) |
8391 | 13 AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) |
8664
40c507f55b0f
Implement the %F directive if the system doesn't implement it correctly.
Bruno Haible <bruno@clisp.org>
parents:
8554
diff
changeset
|
14 AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) |
8391 | 15 AC_REQUIRE([gl_PRINTF_DIRECTIVE_N]) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
16 AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) |
8391 | 17 AC_REQUIRE([gl_PRINTF_POSITIONS]) |
8803
6c1d98929550
Work around lack of support of grouping flag.
Bruno Haible <bruno@clisp.org>
parents:
8664
diff
changeset
|
18 AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) |
9674
b69f1141e94f
Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents:
9446
diff
changeset
|
19 AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) |
8804
6ce313658b4d
Work around an incorrect implementation of the 0 flag on most platforms.
Bruno Haible <bruno@clisp.org>
parents:
8803
diff
changeset
|
20 AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) |
9446
0519fc8ce06a
Fix *printf behaviour for large precisions on mingw and BeOS.
Bruno Haible <bruno@clisp.org>
parents:
9442
diff
changeset
|
21 AC_REQUIRE([gl_PRINTF_PRECISION]) |
9442
ad275322f8f1
Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
Bruno Haible <bruno@clisp.org>
parents:
8860
diff
changeset
|
22 AC_REQUIRE([gl_PRINTF_ENOMEM]) |
8391 | 23 gl_cv_func_vfprintf_posix=no |
24 case "$gl_cv_func_printf_sizes_c99" in | |
25 *yes) | |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
26 case "$gl_cv_func_printf_long_double" in |
8391 | 27 *yes) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
28 case "$gl_cv_func_printf_infinite" in |
8391 | 29 *yes) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
30 case "$gl_cv_func_printf_infinite_long_double" in |
8391 | 31 *yes) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
32 case "$gl_cv_func_printf_directive_a" in |
8664
40c507f55b0f
Implement the %F directive if the system doesn't implement it correctly.
Bruno Haible <bruno@clisp.org>
parents:
8554
diff
changeset
|
33 *yes) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
34 case "$gl_cv_func_printf_directive_f" in |
8803
6c1d98929550
Work around lack of support of grouping flag.
Bruno Haible <bruno@clisp.org>
parents:
8664
diff
changeset
|
35 *yes) |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
36 case "$gl_cv_func_printf_directive_n" in |
8804
6ce313658b4d
Work around an incorrect implementation of the 0 flag on most platforms.
Bruno Haible <bruno@clisp.org>
parents:
8803
diff
changeset
|
37 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
38 case "$gl_cv_func_printf_directive_ls" in |
8832
1466c973f476
Add support for 'long double' number output.
Bruno Haible <bruno@clisp.org>
parents:
8804
diff
changeset
|
39 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
40 case "$gl_cv_func_printf_positions" in |
8840
792e05ae7ac8
Fix *printf result for NaN, Inf, -0.0 on mingw.
Bruno Haible <bruno@clisp.org>
parents:
8832
diff
changeset
|
41 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
42 case "$gl_cv_func_printf_flag_grouping" in |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
43 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
44 case "$gl_cv_func_printf_flag_leftadjust" in |
9442
ad275322f8f1
Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
Bruno Haible <bruno@clisp.org>
parents:
8860
diff
changeset
|
45 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
46 case "$gl_cv_func_printf_flag_zero" in |
9446
0519fc8ce06a
Fix *printf behaviour for large precisions on mingw and BeOS.
Bruno Haible <bruno@clisp.org>
parents:
9442
diff
changeset
|
47 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
48 case "$gl_cv_func_printf_precision" in |
9674
b69f1141e94f
Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents:
9446
diff
changeset
|
49 *yes) |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
50 case "$gl_cv_func_printf_enomem" in |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
51 *yes) |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
52 # vfprintf exists and is |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
53 # already POSIX compliant. |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
54 gl_cv_func_vfprintf_posix=yes |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
55 ;; |
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
56 esac |
9674
b69f1141e94f
Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents:
9446
diff
changeset
|
57 ;; |
b69f1141e94f
Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents:
9446
diff
changeset
|
58 esac |
9446
0519fc8ce06a
Fix *printf behaviour for large precisions on mingw and BeOS.
Bruno Haible <bruno@clisp.org>
parents:
9442
diff
changeset
|
59 ;; |
0519fc8ce06a
Fix *printf behaviour for large precisions on mingw and BeOS.
Bruno Haible <bruno@clisp.org>
parents:
9442
diff
changeset
|
60 esac |
9442
ad275322f8f1
Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
Bruno Haible <bruno@clisp.org>
parents:
8860
diff
changeset
|
61 ;; |
ad275322f8f1
Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
Bruno Haible <bruno@clisp.org>
parents:
8860
diff
changeset
|
62 esac |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
63 ;; |
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
64 esac |
8840
792e05ae7ac8
Fix *printf result for NaN, Inf, -0.0 on mingw.
Bruno Haible <bruno@clisp.org>
parents:
8832
diff
changeset
|
65 ;; |
792e05ae7ac8
Fix *printf result for NaN, Inf, -0.0 on mingw.
Bruno Haible <bruno@clisp.org>
parents:
8832
diff
changeset
|
66 esac |
8832
1466c973f476
Add support for 'long double' number output.
Bruno Haible <bruno@clisp.org>
parents:
8804
diff
changeset
|
67 ;; |
1466c973f476
Add support for 'long double' number output.
Bruno Haible <bruno@clisp.org>
parents:
8804
diff
changeset
|
68 esac |
8804
6ce313658b4d
Work around an incorrect implementation of the 0 flag on most platforms.
Bruno Haible <bruno@clisp.org>
parents:
8803
diff
changeset
|
69 ;; |
6ce313658b4d
Work around an incorrect implementation of the 0 flag on most platforms.
Bruno Haible <bruno@clisp.org>
parents:
8803
diff
changeset
|
70 esac |
8803
6c1d98929550
Work around lack of support of grouping flag.
Bruno Haible <bruno@clisp.org>
parents:
8664
diff
changeset
|
71 ;; |
6c1d98929550
Work around lack of support of grouping flag.
Bruno Haible <bruno@clisp.org>
parents:
8664
diff
changeset
|
72 esac |
8664
40c507f55b0f
Implement the %F directive if the system doesn't implement it correctly.
Bruno Haible <bruno@clisp.org>
parents:
8554
diff
changeset
|
73 ;; |
40c507f55b0f
Implement the %F directive if the system doesn't implement it correctly.
Bruno Haible <bruno@clisp.org>
parents:
8554
diff
changeset
|
74 esac |
8391 | 75 ;; |
76 esac | |
77 ;; | |
78 esac | |
79 ;; | |
80 esac | |
81 ;; | |
82 esac | |
83 if test $gl_cv_func_vfprintf_posix = no; then | |
8832
1466c973f476
Add support for 'long double' number output.
Bruno Haible <bruno@clisp.org>
parents:
8804
diff
changeset
|
84 gl_PREREQ_VASNPRINTF_LONG_DOUBLE |
8860
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
85 gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE |
771a56a41b5b
Fix *printf result for NaN, Inf on AIX, Solaris, OSF/1.
Bruno Haible <bruno@clisp.org>
parents:
8840
diff
changeset
|
86 gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE |
8554
35eb5062216c
Prefer nl_langinfo over localeconv.
Bruno Haible <bruno@clisp.org>
parents:
8391
diff
changeset
|
87 gl_PREREQ_VASNPRINTF_DIRECTIVE_A |
8664
40c507f55b0f
Implement the %F directive if the system doesn't implement it correctly.
Bruno Haible <bruno@clisp.org>
parents:
8554
diff
changeset
|
88 gl_PREREQ_VASNPRINTF_DIRECTIVE_F |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11007
diff
changeset
|
89 gl_PREREQ_VASNPRINTF_DIRECTIVE_LS |
8803
6c1d98929550
Work around lack of support of grouping flag.
Bruno Haible <bruno@clisp.org>
parents:
8664
diff
changeset
|
90 gl_PREREQ_VASNPRINTF_FLAG_GROUPING |
9674
b69f1141e94f
Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents:
9446
diff
changeset
|
91 gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST |
8804
6ce313658b4d
Work around an incorrect implementation of the 0 flag on most platforms.
Bruno Haible <bruno@clisp.org>
parents:
8803
diff
changeset
|
92 gl_PREREQ_VASNPRINTF_FLAG_ZERO |
9446
0519fc8ce06a
Fix *printf behaviour for large precisions on mingw and BeOS.
Bruno Haible <bruno@clisp.org>
parents:
9442
diff
changeset
|
93 gl_PREREQ_VASNPRINTF_PRECISION |
9442
ad275322f8f1
Fix *printf behaviour in out-of-memory situations on MacOS X and *BSD.
Bruno Haible <bruno@clisp.org>
parents:
8860
diff
changeset
|
94 gl_PREREQ_VASNPRINTF_ENOMEM |
8391 | 95 gl_REPLACE_VASNPRINTF |
96 gl_REPLACE_VFPRINTF | |
97 fi | |
98 ]) | |
99 | |
100 AC_DEFUN([gl_REPLACE_VFPRINTF], | |
101 [ | |
102 AC_REQUIRE([gl_STDIO_H_DEFAULTS]) | |
103 AC_LIBOBJ([vfprintf]) | |
104 REPLACE_VFPRINTF=1 | |
11007
f6cba5a556ce
many *.m4 files: improve m4 quoting
Jim Meyering <meyering@redhat.com>
parents:
10487
diff
changeset
|
105 AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1], |
10487
953f72c1ffcc
Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents:
9831
diff
changeset
|
106 [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.]) |
8391 | 107 gl_PREREQ_VFPRINTF |
108 ]) | |
109 | |
110 AC_DEFUN([gl_PREREQ_VFPRINTF], [:]) |