annotate m4/printf.m4 @ 8351:3c87bcef59c2

Mention glibc-2.5.
author Bruno Haible <bruno@clisp.org>
date Mon, 05 Mar 2007 23:51:20 +0000
parents 4e430e6470b3
children 741f8a5caa9c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 # printf.m4 serial 1
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 dnl Test whether the *printf family of functions supports the 'j', 'z', 't',
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 dnl 'L' size specifiers. (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 dnl Result is gl_cv_func_printf_sizes_c99.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 AC_DEFUN([gl_PRINTF_SIZES_C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 AC_REQUIRE([AC_PROG_CC])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 AC_REQUIRE([gl_AC_HEADER_STDINT_H])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 AC_REQUIRE([gt_TYPE_LONGDOUBLE])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 [gl_cv_func_printf_sizes_c99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 #include <stddef.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 #include <sys/types.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26 #if HAVE_STDINT_H_WITH_UINTMAX
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 # include <stdint.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 #endif
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 #if HAVE_INTTYPES_H_WITH_UINTMAX
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 # include <inttypes.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 #endif
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 #if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
36 buf[0] = '\0';
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
37 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
38 || strcmp (buf, "12345671 33") != 0)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 #endif
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 buf[0] = '\0';
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 || strcmp (buf, "12345672 33") != 0)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 buf[0] = '\0';
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
46 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
47 || strcmp (buf, "12345673 33") != 0)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
48 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
49 #if HAVE_LONG_DOUBLE
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 buf[0] = '\0';
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
52 || strcmp (buf, "1.5 33") != 0)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 #endif
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 return 0;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
56 }], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
58 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 case "$host_os" in
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 dnl Guess yes on glibc systems.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 dnl Guess yes on FreeBSD >= 5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
65 dnl Guess yes on MacOS X >= 10.3.
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
67 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
68 dnl Guess yes on OpenBSD >= 3.9.
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
69 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
70 gl_cv_func_printf_sizes_c99="guessing no";;
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
71 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
72 dnl Guess yes on Solaris >= 2.10.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
73 solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74 solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
75 dnl Guess yes on NetBSD >= 3.
8350
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
76 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
77 gl_cv_func_printf_sizes_c99="guessing no";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
78 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 dnl If we don't know, assume the worst.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
80 *) gl_cv_func_printf_sizes_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
81 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
83 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
86
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 dnl Test whether the *printf family of functions supports the 'a' and 'A'
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
88 dnl conversion specifier for hexadecimal output of floating-point numbers.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89 dnl (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 dnl Result is gl_cv_func_printf_directive_a.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
93 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 AC_REQUIRE([AC_PROG_CC])
8344
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
95 AC_REQUIRE([gt_TYPE_LONGDOUBLE])
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97 AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
98 [gl_cv_func_printf_directive_a],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
99 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
100 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
101 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
102 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
103 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
104 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
105 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
106 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
8344
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
107 || (strcmp (buf, "0x1.922p+1 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
108 && strcmp (buf, "0x3.244p+0 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
109 && strcmp (buf, "0x6.488p-1 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
110 && strcmp (buf, "0xc.91p-2 33") != 0))
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
111 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
112 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
8344
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
113 || (strcmp (buf, "-0X1.922P+1 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
114 && strcmp (buf, "-0X3.244P+0 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
115 && strcmp (buf, "-0X6.488P-1 33") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
116 && strcmp (buf, "-0XC.91P-2 33") != 0))
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
117 return 1;
8344
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
118 /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
119 if (sprintf (buf, "%.1a", 1.999) < 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
120 || (strcmp (buf, "0x1.0p+1") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
121 && strcmp (buf, "0x2.0p+0") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
122 && strcmp (buf, "0x4.0p-1") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
123 && strcmp (buf, "0x8.0p-2") != 0))
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
124 return 1;
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
125 #if HAVE_LONG_DOUBLE
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
126 /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
127 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
128 if (sprintf (buf, "%.1La", 1.999L) < 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
129 || (strcmp (buf, "0x1.0p+1") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
130 && strcmp (buf, "0x2.0p+0") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
131 && strcmp (buf, "0x4.0p-1") != 0
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
132 && strcmp (buf, "0x8.0p-2") != 0))
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
133 return 1;
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
134 #endif
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 return 0;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
136 }], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
137 [
8344
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
138 case "$host_os" in
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
139 dnl Guess yes on glibc >= 2.5 systems.
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
140 *-gnu*)
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
141 AC_EGREP_CPP([BZ2908], [
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
142 #include <features.h>
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
143 #ifdef __GNU_LIBRARY__
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
144 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
145 BZ2908
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
146 #endif
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
147 #endif
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
148 ],
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
149 [gl_cv_func_printf_directive_a="guessing yes"],
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
150 [gl_cv_func_printf_directive_a="guessing no"])
c8055280f68e Test a corner case. Exclude two buggy implementations.
Bruno Haible <bruno@clisp.org>
parents: 8335
diff changeset
151 ;;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
153 dnl Guess yes on FreeBSD >= 5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
154 freebsd[1-4]*) gl_cv_func_printf_directive_a="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
155 freebsd* | kfreebsd*) gl_cv_func_printf_directive_a="guessing yes";;
8349
d1f886e7c41b Add info about NetBSD 4, which has now borrowed the printf implementation
Bruno Haible <bruno@clisp.org>
parents: 8348
diff changeset
156 dnl Guess yes on NetBSD >= 4.
8350
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
157 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
158 gl_cv_func_printf_directive_a="guessing no";;
8349
d1f886e7c41b Add info about NetBSD 4, which has now borrowed the printf implementation
Bruno Haible <bruno@clisp.org>
parents: 8348
diff changeset
159 netbsd*) gl_cv_func_printf_directive_a="guessing yes";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 dnl If we don't know, assume the worst.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161 *) gl_cv_func_printf_directive_a="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
164 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
165 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
166 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
167
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
168 dnl Test whether the *printf family of functions supports the %n format
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
169 dnl directive. (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
170 dnl Result is gl_cv_func_printf_directive_n.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
171
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
172 AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
173 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
174 AC_REQUIRE([AC_PROG_CC])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
175 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
176 AC_CACHE_CHECK([whether printf supports the 'n' directive],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
177 [gl_cv_func_printf_directive_n],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
178 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
179 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
180 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
182 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
183 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
184 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
185 int count = -1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
186 if (sprintf (buf, "%d %n", 123, &count, 33, 44, 55) < 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
187 || strcmp (buf, "123 ") != 0
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188 || count != 4)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
189 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
190 return 0;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
191 }], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
192 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
193 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
194 case "$host_os" in
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
195 *) gl_cv_func_printf_directive_n="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
197 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
198 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
199 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
200 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
201
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
202 dnl Test whether the *printf family of functions supports POSIX/XSI format
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203 dnl strings with positions. (POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
204 dnl Result is gl_cv_func_printf_positions.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
205
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
206 AC_DEFUN([gl_PRINTF_POSITIONS],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
207 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
208 AC_REQUIRE([AC_PROG_CC])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
209 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
210 AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 [gl_cv_func_printf_positions],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
212 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
213 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
214 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
215 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
216 /* The string "%2$d %1$d", with dollar characters protected from the shell's
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
217 dollar expansion (possibly an autoconf bug). */
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
219 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
220 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
221 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
222 sprintf (buf, format, 33, 55);
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
223 return (strcmp (buf, "55 33") != 0);
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
224 }], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
225 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
226 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
227 case "$host_os" in
8350
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
228 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
229 gl_cv_func_printf_positions="guessing no";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
230 beos*) gl_cv_func_printf_positions="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
231 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
232 *) gl_cv_func_printf_positions="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
233 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
234 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
235 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
236 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
237 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
238
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
239 dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
240 dnl Result is ac_cv_func_snprintf.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
241
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
242 AC_DEFUN([gl_SNPRINTF_PRESENCE],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
243 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
244 AC_CHECK_FUNCS_ONCE([snprintf])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
245 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
246
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
247 dnl Test whether the string produced by the snprintf function is always NUL
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
248 dnl terminated. (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
249 dnl Result is gl_cv_func_snprintf_truncation_c99.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
250
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
251 AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
252 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
253 AC_REQUIRE([AC_PROG_CC])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
254 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
255 AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
256 [gl_cv_func_snprintf_truncation_c99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
257 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
258 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
259 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
260 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
261 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
262 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
263 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
264 strcpy (buf, "ABCDEF");
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
265 snprintf (buf, 3, "%d %d", 4567, 89);
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
266 if (memcmp (buf, "45\0DEF", 6) != 0)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
267 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
268 return 0;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
269 }], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
270 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
271 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
272 case "$host_os" in
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
273 dnl Guess yes on glibc systems.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
274 *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
275 dnl Guess yes on FreeBSD >= 5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
276 freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
277 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
278 dnl Guess yes on MacOS X >= 10.3.
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
279 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
280 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
281 dnl Guess yes on OpenBSD >= 3.9.
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
282 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
283 gl_cv_func_snprintf_truncation_c99="guessing no";;
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
284 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
285 dnl Guess yes on Solaris >= 2.6.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
286 solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
287 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
288 dnl Guess yes on AIX >= 4.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
289 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
290 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
291 dnl Guess yes on HP-UX >= 11.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
292 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
293 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
294 dnl Guess yes on IRIX >= 6.5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
295 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
296 dnl Guess yes on OSF/1 >= 5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
297 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
298 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
299 dnl Guess yes on NetBSD >= 3.
8350
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
300 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
301 gl_cv_func_snprintf_truncation_c99="guessing no";;
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
302 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
303 dnl Guess yes on BeOS.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
304 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
305 dnl If we don't know, assume the worst.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
306 *) gl_cv_func_snprintf_truncation_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
307 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
308 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
309 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
310 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
311 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
312
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
313 dnl Test whether the return value of the snprintf function is the number
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
314 dnl of bytes (excluding the terminating NUL) that would have been produced
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
315 dnl if the buffer had been large enough. (ISO C99, POSIX:2001)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
316 dnl Result is gl_cv_func_printf_retval_c99.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
317
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
318 AC_DEFUN([gl_SNPRINTF_RETVAL_C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
319 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
320 AC_REQUIRE([AC_PROG_CC])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
321 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
322 AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
323 [gl_cv_func_printf_retval_c99],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
324 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
325 AC_TRY_RUN([
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
326 #include <stdio.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
327 #include <string.h>
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
328 static char buf[100];
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
329 int main ()
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
330 {
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
331 strcpy (buf, "ABCDEF");
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
332 if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
333 return 1;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
334 return 0;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
335 }], [gl_cv_func_printf_retval_c99=yes], [gl_cv_func_printf_retval_c99=no],
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
336 [
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
337 changequote(,)dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
338 case "$host_os" in
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
339 dnl Guess yes on glibc systems.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
340 *-gnu*) gl_cv_func_printf_retval_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
341 dnl Guess yes on FreeBSD >= 5.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
342 freebsd[1-4]*) gl_cv_func_printf_retval_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
343 freebsd* | kfreebsd*) gl_cv_func_printf_retval_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
344 dnl Guess yes on MacOS X >= 10.3.
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
345 darwin[1-6].*) gl_cv_func_printf_retval_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
346 darwin*) gl_cv_func_printf_retval_c99="guessing yes";;
8347
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
347 dnl Guess yes on OpenBSD >= 3.9.
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
348 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
349 gl_cv_func_printf_retval_c99="guessing no";;
03bfd77e2c10 Add info about OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 8346
diff changeset
350 openbsd*) gl_cv_func_printf_retval_c99="guessing yes";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
351 dnl Guess yes on Solaris >= 2.6.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
352 solaris2.[0-5]*) gl_cv_func_printf_retval_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
353 solaris*) gl_cv_func_printf_retval_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
354 dnl Guess yes on AIX >= 4.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
355 aix[1-3]*) gl_cv_func_printf_retval_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
356 aix*) gl_cv_func_printf_retval_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
357 dnl Guess yes on NetBSD >= 3.
8350
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
358 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
4e430e6470b3 Be more conservative about the config.guess results on NetBSD.
Bruno Haible <bruno@clisp.org>
parents: 8349
diff changeset
359 gl_cv_func_printf_retval_c99="guessing no";;
8335
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
360 netbsd*) gl_cv_func_printf_retval_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
361 dnl Guess yes on BeOS.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
362 beos*) gl_cv_func_printf_retval_c99="guessing yes";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
363 dnl If we don't know, assume the worst.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
364 *) gl_cv_func_printf_retval_c99="guessing no";;
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
365 esac
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
366 changequote([,])dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
367 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
368 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
369 ])
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
370
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
371 dnl The results of these tests on various platforms are:
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
372 dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
373 dnl 1 = gl_PRINTF_SIZES_C99
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
374 dnl 2 = gl_PRINTF_DIRECTIVE_A
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
375 dnl 3 = gl_PRINTF_DIRECTIVE_N
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
376 dnl 4 = gl_PRINTF_POSITIONS
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
377 dnl 5 = gl_SNPRINTF_PRESENCE
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
378 dnl 6 = gl_SNPRINTF_TRUNCATION_C99
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
379 dnl 7 = gl_SNPRINTF_RETVAL_C99
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
380 dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
381 dnl 1 = checking whether printf supports size specifiers as in C99...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
382 dnl 2 = checking whether printf supports the 'a' and 'A' directives...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
383 dnl 3 = checking whether printf supports the 'n' directive...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
384 dnl 4 = checking whether printf supports POSIX/XSI format strings with positions...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
385 dnl 5 = checking for snprintf...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
386 dnl 6 = checking whether snprintf truncates the result as in C99...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
387 dnl 7 = checking whether snprintf returns a byte count as in C99...
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
388 dnl
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
389 dnl . = yes, # = no.
2c9de3b6ba5b New module 'vasnprintf-posix'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
390 dnl
8348
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
391 dnl 1 2 3 4 5 6 7
8351
3c87bcef59c2 Mention glibc-2.5.
Bruno Haible <bruno@clisp.org>
parents: 8350
diff changeset
392 dnl glibc 2.5 . . . . . . .
8348
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
393 dnl glibc 2.3.6 . # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
394 dnl FreeBSD 5.4, 6.1 . . . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
395 dnl MacOS X 10.3.9 . # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
396 dnl OpenBSD 3.9 . # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
397 dnl Cygwin 2007 . # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
398 dnl Cygwin 2006 # # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
399 dnl Solaris 10 . # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
400 dnl Solaris 2.6 ... 9 # # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
401 dnl Solaris 2.5.1 # # . . # # #
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
402 dnl AIX 4.3.2, 5.1 # # . . . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
403 dnl HP-UX 11.31 . # . . . . #
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
404 dnl HP-UX 10.20, 11.00, 11.11, 11.23 # # . . . . #
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
405 dnl IRIX 6.5 # # . . . . #
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
406 dnl OSF/1 5.1 # # . . . . #
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
407 dnl OSF/1 4.0d # # . . # # #
8349
d1f886e7c41b Add info about NetBSD 4, which has now borrowed the printf implementation
Bruno Haible <bruno@clisp.org>
parents: 8348
diff changeset
408 dnl NetBSD 4.0 . . . . . . .
8348
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
409 dnl NetBSD 3.0 . # . # . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
410 dnl BeOS # # . # . . .
9ee2a6750282 Update with info about HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 8347
diff changeset
411 dnl mingw # # . # . # #