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_PRIX64 \
9 sPRId64 sPRIi64 sPRIu64 sPRIo64 sPRIx64 sPRIX64: \
10 quadtype i_inttypes test cat rm Setvar Compile exe_ext
11 ?MAKE: -pick add $@ %<
13 ?S: This variable conditionally defines the PERL_PRId64 symbol, which
14 ?S: indiciates that stdio has a symbol to print 64-bit decimal numbers.
17 ?S: This variable conditionally defines the PERL_PRIi64 symbol, which
18 ?S: indiciates that stdio has a symbol to print 64-bit decimal numbers.
21 ?S: This variable conditionally defines the PERL_PRIu64 symbol, which
22 ?S: indiciates that stdio has a symbol to print 64-bit unsigned decimal
26 ?S: This variable conditionally defines the PERL_PRIo64 symbol, which
27 ?S: indiciates that stdio has a symbol to print 64-bit octal numbers.
30 ?S: This variable conditionally defines the PERL_PRIx64 symbol, which
31 ?S: indiciates that stdio has a symbol to print 64-bit hexadecimal numbers.
34 ?S: This variable conditionally defines the PERL_PRIX64 symbol, which
35 ?S: indiciates that stdio has a symbol to print 64-bit hExADECimAl numbers.
38 ?S: This variable, if defined, contains the string used by stdio to
39 ?S: format 64-bit decimal numbers (format 'd') for output.
42 ?S: This variable, if defined, contains the string used by stdio to
43 ?S: format 64-bit decimal numbers (format 'i') for output.
46 ?S: This variable, if defined, contains the string used by stdio to
47 ?S: format 64-bit unsigned decimal numbers (format 'u') for output.
50 ?S: This variable, if defined, contains the string used by stdio to
51 ?S: format 64-bit octal numbers (format 'o') for output.
54 ?S: This variable, if defined, contains the string used by stdio to
55 ?S: format 64-bit hexadecimal numbers (format 'x') for output.
58 ?S: This variable, if defined, contains the string used by stdio to
59 ?S: format 64-bit hExADECimAl numbers (format 'X') for output.
62 ?C: This symbol, if defined, contains the string used by stdio to
63 ?C: format 64-bit decimal numbers (format 'd') for output.
66 ?C: This symbol, if defined, contains the string used by stdio to
67 ?C: format 64-bit decimal numbers (format 'i') for output.
70 ?C: This symbol, if defined, contains the string used by stdio to
71 ?C: format 64-bit unsigned decimal numbers (format 'u') for output.
74 ?C: This symbol, if defined, contains the string used by stdio to
75 ?C: format 64-bit octal numbers (format 'o') for output.
78 ?C: This symbol, if defined, contains the string used by stdio to
79 ?C: format 64-bit hexadecimal numbers (format 'x') 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.
85 ?H:#$d_PRId64 PERL_PRId64 $sPRId64 /**/
86 ?H:#$d_PRIi64 PERL_PRIi64 $sPRIi64 /**/
87 ?H:#$d_PRIu64 PERL_PRIu64 $sPRIu64 /**/
88 ?H:#$d_PRIo64 PERL_PRIo64 $sPRIo64 /**/
89 ?H:#$d_PRIx64 PERL_PRIx64 $sPRIx64 /**/
90 ?H:#$d_PRIx64 PERL_PRIX64 $sPRIX64 /**/
96 if $test X"$quadtype" != X; then
98 echo "Checking how to print 64-bit integers..." >&4
100 if $test X"$sPRId64" = X -a X"$quadtype" = Xint; then
102 #include <sys/types.h>
110 if eval $compile; then
114 sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"';
115 sPRIo64='"o"'; sPRIx64='"x"'; sPRIX64='"X"';
116 echo "We will use %d."
122 if $test X"$sPRId64" = X -a X"$quadtype" = Xlong; then
124 #include <sys/types.h>
127 long q = 12345678901;
132 if eval $compile; then
136 sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"';
137 sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIX64='"lX"';
138 echo "We will use %ld."
144 if $test X"$sPRId64" = X -a X"$i_inttypes" = X"$define" -a X"$quadtype" = Xint64_t; then
146 #include <sys/types.h>
147 #include <inttypes.h>
150 int64_t q = 12345678901;
151 printf("%" PRId64 "\n", q);
155 if eval $compile; then
159 sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
160 sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIX64=PRIX64;
161 echo "We will use the C9X style."
167 if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then
169 #include <sys/types.h>
172 long long q = 12345678901LL; /* AIX cc requires the LL prefix. */
177 if eval $compile; then
181 sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"';
182 sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIX64='"llX"';
183 echo "We will use the %lld style."
189 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
191 #include <sys/types.h>
194 $quadtype q = 12345678901;
199 if eval $compile; then
203 sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"';
204 sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIX64='"LX"';
205 echo "We will use %Ld."
211 if $test X"$sPRId64" = X -a X"$quadtype" != X; then
213 #include <sys/types.h>
216 $quadtype q = 12345678901;
221 if eval $compile; then
225 sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"';
226 sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIX64='"qX"';
227 echo "We will use %qd."
233 if $test X"$sPRId64" = X; then
234 echo "Cannot figure out how to print 64-bit integers." >&4
242 '') d_PRId64="$undef"; d_PRIi64="$undef"; d_PRIu64="$undef";
243 d_PRIo64="$undef"; d_PRIx64="$undef"; d_PRIX64="$undef";
245 *) d_PRId64="$define"; d_PRIi64="$define"; d_PRIu64="$define";
246 d_PRIo64="$define"; d_PRIx64="$define"; d_PRIX64="$define";