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 \
12 echo rm use64bits d_quad quadtype uquadtype \
13 d_longdbl uselongdouble longdblsize doublesize \
14 charsize shortsize intsize longsize \
15 cat Compile i_inttypes exe_ext test
16 ?MAKE: -pick add $@ %<
18 ?S: This variable contains the C type used for Perl's IV.
21 ?S: This variable contains the C type used for Perl's UV.
24 ?S: This variable contains the C type used for Perl's NV.
27 ?S: This variable contains the C type used for Perl's I8.
30 ?S: This variable contains the C type used for Perl's U8.
33 ?S: This variable contains the C type used for Perl's I16.
36 ?S: This variable contains the C type used for Perl's U16.
39 ?S: This variable contains the C type used for Perl's I32.
42 ?S: This variable contains the C type used for Perl's U32.
45 ?S: This variable contains the C type used for Perl's I64.
48 ?S: This variable contains the C type used for Perl's U64.
51 ?S: This variable is the size of an IV in bytes.
54 ?S: This variable is the size of a UV in bytes.
57 ?S: This variable is the size of an I8 in bytes.
60 ?S: This variable is the size of an U8 in bytes.
63 ?S: This variable is the size of an I16 in bytes.
66 ?S: This variable is the size of an U16 in bytes.
69 ?S: This variable is the size of an I32 in bytes.
72 ?S: This variable is the size of an U32 in bytes.
75 ?S: This variable is the size of an I64 in bytes.
78 ?S: This variable is the size of an U64 in bytes.
81 ?S: This variable is the size of an NV in bytes.
84 ?S: This variable indicates whether a variable of type nvtype
85 ?S: can preserve all the bits a variable of type uvtype.
88 ?C: This symbol defines the C type used for Perl's IV.
91 ?C: This symbol defines the C type used for Perl's UV.
94 ?C: This symbol defines the C type used for Perl's I8.
97 ?C: This symbol defines the C type used for Perl's U8.
100 ?C: This symbol defines the C type used for Perl's I16.
103 ?C: This symbol defines the C type used for Perl's U16.
106 ?C: This symbol defines the C type used for Perl's I32.
109 ?C: This symbol defines the C type used for Perl's U32.
112 ?C: This symbol defines the C type used for Perl's I64.
115 ?C: This symbol defines the C type used for Perl's U64.
118 ?C: This symbol defines the C type used for Perl's NV.
121 ?C: This symbol contains the sizeof(IV).
124 ?C: This symbol contains the sizeof(UV).
127 ?C: This symbol contains the sizeof(I8).
130 ?C: This symbol contains the sizeof(U8).
133 ?C: This symbol contains the sizeof(I16).
136 ?C: This symbol contains the sizeof(U16).
139 ?C: This symbol contains the sizeof(I32).
142 ?C: This symbol contains the sizeof(U32).
145 ?C: This symbol contains the sizeof(I64).
148 ?C: This symbol contains the sizeof(U64).
151 ?C: This symbol contains the sizeof(NV).
154 ?C: This symbol, if defined, indicates that a variable of type NVTYPE
155 ?C: can preserve all the bit of a variable of type UVSIZE.
157 ?H:#define IVTYPE $ivtype /**/
158 ?H:#define UVTYPE $uvtype /**/
159 ?H:#define I8TYPE $i8type /**/
160 ?H:#define U8TYPE $u8type /**/
161 ?H:#define I16TYPE $i16type /**/
162 ?H:#define U16TYPE $u16type /**/
163 ?H:#define I32TYPE $i32type /**/
164 ?H:#define U32TYPE $u32type /**/
165 ?H:?%<:#ifdef HAS_QUAD
166 ?H:?%<:#define I64TYPE $i64type /**/
167 ?H:?%<:#define U64TYPE $u64type /**/
169 ?H:#define NVTYPE $nvtype /**/
170 ?H:#define IVSIZE $ivsize /**/
171 ?H:#define UVSIZE $uvsize /**/
172 ?H:#define I8SIZE $i8size /**/
173 ?H:#define U8SIZE $u8size /**/
174 ?H:#define I16SIZE $i16size /**/
175 ?H:#define U16SIZE $u16size /**/
176 ?H:#define I32SIZE $i32size /**/
177 ?H:#define U32SIZE $u32size /**/
178 ?H:?%<:#ifdef HAS_QUAD
179 ?H:?%<:#define I64SIZE $i64size /**/
180 ?H:?%<:#define U64SIZE $u64size /**/
182 ?H:#define NVSIZE $nvsize /**/
183 ?H:#$d_nvpresuv NV_PRESERVES_UV
188 $echo "Choosing the C types to be used for Perl's internal types..." >&4
190 case "$use64bits:$d_quad:$quadtype" in
198 uvtype="unsigned long"
204 case "$uselongdouble:$d_longdbl" in
214 $echo "(IV will be "$ivtype", $ivsize bytes)"
215 $echo "(UV will be "$uvtype", $uvsize bytes)"
216 $echo "(NV will be "$nvtype", $nvsize bytes)"
219 #$i_inttypes I_INTTYPES
221 #include <inttypes.h>
227 uint8_t u = UINT8_MAX;
231 int16_t i = INT16_MAX;
232 uint16_t i = UINT16_MAX;
236 int32_t i = INT32_MAX;
237 uint32_t u = UINT32_MAX;
244 '') case "$charsize" in
246 u8type="unsigned char"
255 if eval $compile; then
256 case "`./try$exe_ext`" in
257 int8_t) i8type=int8_t
267 '') if $test $charsize -ge 1; then
269 u8type="unsigned char"
277 '') case "$shortsize" in
279 u16type="unsigned short"
288 if eval $compile; then
289 case "`./try$exe_ext`" in
301 '') if $test $shortsize -ge 2; then
303 u16type="unsigned short"
311 '') case "$longsize" in
313 u32type="unsigned long"
317 *) case "$intsize" in
319 u32type="unsigned int"
330 if eval $compile; then
331 case "`./try$exe_ext`" in
343 '') if $test $intsize -ge 4; then
345 u32type="unsigned int"
353 '') case "$d_quad:$quadtype" in
364 $echo "Checking whether your NVs can preserve your UVs..." >&4
368 $uvtype k = ($uvtype)~0, l;
374 printf("preserve\n");
379 if eval $compile; then
380 case "`./try$exe_ext`" in
381 preserve) d_nvpresuv="$define" ;;
384 case "$d_nvpresuv" in
385 $define) $echo "Yes, they can." 2>&1 ;;
386 *) $echo "No, they can't." 2>&1