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:ivtype uvtype nvtype ivsize uvsize nvsize \
9 i8type u8type i16type u16type i32type u32type i64type u64type \
10 i8size u8size i16size u16size i32size u32size i64size u64size: \
11 echo rm use64bits d_quad quadtype uquadtype \
12 d_longdbl uselongdouble longdblsize doublesize \
13 charsize shortsize intsize longsize \
14 cat Compile i_inttypes exe_ext test
15 ?MAKE: -pick add $@ %<
17 ?S: This variable contains the C type used for Perl's IV.
20 ?S: This variable contains the C type used for Perl's UV.
23 ?S: This variable contains the C type used for Perl's NV.
26 ?S: This variable contains the C type used for Perl's I8.
29 ?S: This variable contains the C type used for Perl's U8.
32 ?S: This variable contains the C type used for Perl's I16.
35 ?S: This variable contains the C type used for Perl's U16.
38 ?S: This variable contains the C type used for Perl's I32.
41 ?S: This variable contains the C type used for Perl's U32.
44 ?S: This variable contains the C type used for Perl's I64.
47 ?S: This variable contains the C type used for Perl's U64.
50 ?S: This variable is the size of an IV in bytes.
53 ?S: This variable is the size of a UV in bytes.
56 ?S: This variable is the size of an I8 in bytes.
59 ?S: This variable is the size of an U8 in bytes.
62 ?S: This variable is the size of an I16 in bytes.
65 ?S: This variable is the size of an U16 in bytes.
68 ?S: This variable is the size of an I32 in bytes.
71 ?S: This variable is the size of an U32 in bytes.
74 ?S: This variable is the size of an I64 in bytes.
77 ?S: This variable is the size of an U64 in bytes.
80 ?S: This variable is the size of an NV in bytes.
83 ?C: This symbol defines the C type used for Perl's IV.
86 ?C: This symbol defines the C type used for Perl's UV.
89 ?C: This symbol defines the C type used for Perl's I8.
92 ?C: This symbol defines the C type used for Perl's U8.
95 ?C: This symbol defines the C type used for Perl's I16.
98 ?C: This symbol defines the C type used for Perl's U16.
101 ?C: This symbol defines the C type used for Perl's I32.
104 ?C: This symbol defines the C type used for Perl's U32.
107 ?C: This symbol defines the C type used for Perl's I64.
110 ?C: This symbol defines the C type used for Perl's U64.
113 ?C: This symbol defines the C type used for Perl's NV.
116 ?C: This symbol contains the sizeof(IV).
119 ?C: This symbol contains the sizeof(UV).
122 ?C: This symbol contains the sizeof(I8).
125 ?C: This symbol contains the sizeof(U8).
128 ?C: This symbol contains the sizeof(I16).
131 ?C: This symbol contains the sizeof(U16).
134 ?C: This symbol contains the sizeof(I32).
137 ?C: This symbol contains the sizeof(U32).
140 ?C: This symbol contains the sizeof(I64).
143 ?C: This symbol contains the sizeof(U64).
146 ?C: This symbol contains the sizeof(NV).
148 ?H:#define IVTYPE $ivtype /**/
149 ?H:#define UVTYPE $uvtype /**/
150 ?H:#define I8TYPE $i8type /**/
151 ?H:#define U8TYPE $u8type /**/
152 ?H:#define I16TYPE $i16type /**/
153 ?H:#define U16TYPE $u16type /**/
154 ?H:#define I32TYPE $i32type /**/
155 ?H:#define U32TYPE $u32type /**/
156 ?H:?%<:#ifdef HAS_QUAD
157 ?H:?%<:#define I64TYPE $i64type /**/
158 ?H:?%<:#define U64TYPE $u64type /**/
160 ?H:#define NVTYPE $nvtype /**/
161 ?H:#define IVSIZE $ivsize /**/
162 ?H:#define UVSIZE $uvsize /**/
163 ?H:#define I8SIZE $i8size /**/
164 ?H:#define U8SIZE $u8size /**/
165 ?H:#define I16SIZE $i16size /**/
166 ?H:#define U16SIZE $u16size /**/
167 ?H:#define I32SIZE $i32size /**/
168 ?H:#define U32SIZE $u32size /**/
169 ?H:?%<:#ifdef HAS_QUAD
170 ?H:?%<:#define I64SIZE $i64size /**/
171 ?H:?%<:#define U64SIZE $u64size /**/
173 ?H:#define NVSIZE $nvsize /**/
178 $echo "Choosing the C types to be used for Perl's internal types..." >&4
180 case "$use64bits:$d_quad:$quadtype" in
188 uvtype="unsigned long"
194 case "$uselongdouble:$d_longdbl" in
204 echo "(IV will be "$ivtype", $ivsize bytes)"
205 echo "(UV will be "$uvtype", $uvsize bytes)"
206 echo "(NV will be "$nvtype", $nvsize bytes)"
209 #$i_inttypes I_INTTYPES
211 #include <inttypes.h>
217 uint8_t u = UINT8_MAX;
221 int16_t i = INT16_MAX;
222 uint16_t i = UINT16_MAX;
226 int32_t i = INT32_MAX;
227 uint32_t u = UINT32_MAX;
234 '') case "$charsize" in
236 u8type="unsigned char"
245 if eval $compile; then
246 case "`./try$exe_ext`" in
247 int8_t) i8type=int8_t
257 '') if $test $charsize -ge 1; then
259 u8type="unsigned char"
267 '') case "$shortsize" in
269 u16type="unsigned short"
278 if eval $compile; then
279 case "`./try$exe_ext`" in
291 '') if $test $shortsize -ge 2; then
293 u16type="unsigned short"
301 '') case "$longsize" in
303 u32type="unsigned long"
307 *) case "$intsize" in
309 u32type="unsigned int"
320 if eval $compile; then
321 case "`./try$exe_ext`" in
333 '') if $test $intsize -ge 4; then
335 u32type="unsigned int"
343 '') case "$d_quad:$quadtype" in