3 ?RCS: Copyright (c) 1999 Jarkko Hietaniemi
5 ?RCS: You may distribute under the terms of either the GNU General Public
6 ?RCS: License or the Artistic License, as specified in the README file.
8 ?MAKE:d_PRId64 d_PRIi64 d_PRIu64 d_PRIo64 d_PRIx64 d_PRIXU64 \
9 sPRId64 sPRIi64 sPRIu64 sPRIo64 sPRIx64 sPRIXU64: \
10 quadtype i_inttypes test cat rm_try Setvar Compile run
11 ?MAKE: -pick add $@ %<
13 ?S: This variable conditionally defines the PERL_PRId64 symbol, which
14 ?S: indicates that stdio has a symbol to print 64-bit decimal numbers.
17 ?S: This variable conditionally defines the PERL_PRIi64 symbol, which
18 ?S: indicates that stdio has a symbol to print 64-bit decimal numbers.
21 ?S: This variable conditionally defines the PERL_PRIu64 symbol, which
22 ?S: indicates that stdio has a symbol to print 64-bit unsigned decimal
26 ?S: This variable conditionally defines the PERL_PRIo64 symbol, which
27 ?S: indicates that stdio has a symbol to print 64-bit octal numbers.
30 ?S: This variable conditionally defines the PERL_PRIx64 symbol, which
31 ?S: indicates that stdio has a symbol to print 64-bit hexadecimal numbers.
34 ?S: This variable conditionally defines the PERL_PRIXU64 symbol, which
35 ?S: indicates that stdio has a symbol to print 64-bit hExADECimAl numbers.
36 ?S: The 'U' in the name is to separate this from d_PRIx64 so that even
37 ?S: case-blind systems can see the difference.
40 ?S: This variable, if defined, contains the string used by stdio to
41 ?S: format 64-bit decimal numbers (format 'd') for output.
44 ?S: This variable, if defined, contains the string used by stdio to
45 ?S: format 64-bit decimal numbers (format 'i') for output.
48 ?S: This variable, if defined, contains the string used by stdio to
49 ?S: format 64-bit unsigned decimal numbers (format 'u') for output.
52 ?S: This variable, if defined, contains the string used by stdio to
53 ?S: format 64-bit octal numbers (format 'o') for output.
56 ?S: This variable, if defined, contains the string used by stdio to
57 ?S: format 64-bit hexadecimal numbers (format 'x') for output.
60 ?S: This variable, if defined, contains the string used by stdio to
61 ?S: format 64-bit hExADECimAl numbers (format 'X') for output.
62 ?S: The 'U' in the name is to separate this from sPRIx64 so that even
63 ?S: case-blind systems can see the difference.
66 ?C: This symbol, if defined, contains the string used by stdio to
67 ?C: format 64-bit decimal numbers (format 'd') for output.
70 ?C: This symbol, if defined, contains the string used by stdio to
71 ?C: format 64-bit decimal numbers (format 'i') for output.
74 ?C: This symbol, if defined, contains the string used by stdio to
75 ?C: format 64-bit unsigned decimal numbers (format 'u') for output.
78 ?C: This symbol, if defined, contains the string used by stdio to
79 ?C: format 64-bit octal numbers (format 'o') for output.
82 ?C: This symbol, if defined, contains the string used by stdio to
83 ?C: format 64-bit hexadecimal numbers (format 'x') for output.
86 ?C: This symbol, if defined, contains the string used by stdio to
87 ?C: format 64-bit hExADECimAl numbers (format 'X') for output.
89 ?H:#$d_PRId64 PERL_PRId64 $sPRId64 /**/
90 ?H:#$d_PRIi64 PERL_PRIi64 $sPRIi64 /**/
91 ?H:#$d_PRIu64 PERL_PRIu64 $sPRIu64 /**/
92 ?H:#$d_PRIo64 PERL_PRIo64 $sPRIo64 /**/
93 ?H:#$d_PRIx64 PERL_PRIx64 $sPRIx64 /**/
94 ?H:#$d_PRIx64 PERL_PRIXU64 $sPRIXU64 /**/
101 if $test X"$quadtype" != X; then
103 echo "Checking how to print 64-bit integers..." >&4
105 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
107 #include <sys/types.h>
115 if eval $compile; then
119 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
120 sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"';
121 echo "We will use %d."
127 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
129 #include <sys/types.h>
132 long q = 12345678901;
137 if eval $compile; then
141 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
142 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"';
143 echo "We will use %ld."
149 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
151 #include <sys/types.h>
152 #include <inttypes.h>
155 int64_t q = 12345678901;
156 printf("%" PRId64 "\n", q);
160 if eval $compile; then
164 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
165 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
166 echo "We will use the C9X style."
172 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
174 #include <sys/types.h>
177 $quadtype q = 12345678901;
182 if eval $compile; then
186 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
187 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"';
188 echo "We will use %Ld."
194 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
196 #include <sys/types.h>
199 long long q = 12345678901LL; /* AIX cc requires the LL suffix. */
204 if eval $compile; then
208 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
209 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"';
210 echo "We will use the %lld style."
216 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
218 #include <sys/types.h>
221 $quadtype q = 12345678901;
226 if eval $compile; then
230 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
231 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"';
232 echo "We will use %qd."
238 if $test X"$sPRId64" = X; then
239 echo "Cannot figure out how to print 64-bit integers." >&4
246 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
247 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIXU64="$undef";
249 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
250 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIXU64="$define";