This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move the IV, UV, I8, U8, ..., and NV to metaconfig
[metaconfig.git] / U / perl / perlxvf.U
1 ?RCS: $Id$
2 ?RCS:
3 ?RCS: Copyright (c) 1999 Jarkko Hietaniemi
4 ?RCS:
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.
7 ?RCS:
8 ?MAKE:ivdformat uvuformat uvoformat uvxformat: \
9         ivsize longsize intsize shortsize sPRId64 sPRIu64 sPRIo64 sPRIx64 \
10         test echo
11 ?MAKE:  -pick add $@ %<
12 ?S:ivdformat:
13 ?S:     This variable contains the format string used for printing
14 ?S:     a Perl IV as a signed decimal integer. 
15 ?S:.
16 ?S:uvuformat:
17 ?S:     This variable contains the format string used for printing
18 ?S:     a Perl UV as an unsigned decimal integer. 
19 ?S:.
20 ?S:uvoformat:
21 ?S:     This variable contains the format string used for printing
22 ?S:     a Perl UV as an unsigned octal integer. 
23 ?S:.
24 ?S:uvxformat:
25 ?S:     This variable contains the format string used for printing
26 ?S:     a Perl UV as an unsigned hexadecimal integer. 
27 ?S:.
28 ?C:IVdf:
29 ?C:     This symbol defines the format string used for printing a Perl IV
30 ?C:     as a signed decimal integer.
31 ?C:.
32 ?C:UVuf:
33 ?C:     This symbol defines the format string used for printing a Perl UV
34 ?C:     as an unsigned decimal integer.
35 ?C:.
36 ?C:UVof:
37 ?C:     This symbol defines the format string used for printing a Perl UV
38 ?C:     as an unsigned octal integer.
39 ?C:.
40 ?C:UVxf:
41 ?C:     This symbol defines the format string used for printing a Perl UV
42 ?C:     as an unsigned hexadecimal integer.
43 ?C:.
44 ?H:#define      IVdf            $ivdformat              /**/
45 ?H:#define      UVuf            $uvuformat              /**/
46 ?H:#define      UVof            $uvoformat              /**/
47 ?H:#define      UVxf            $uvxformat              /**/
48 ?H:.
49
50 echo " "
51 $echo "Checking the format strings to be used for Perl's internal types..." >&4
52
53 if $test X"$ivsize" = X8; then
54         ivdformat="$sPRId64"
55         uvuformat="$sPRIu64"
56         uvoformat="$sPRIo64"
57         uvxformat="$sPRIx64"
58 else
59         if $test X"$ivsize" = X"$longsize"; then
60                 ivdformat='"ld"'
61                 uvuformat='"lu"'
62                 uvoformat='"lo"'
63                 uvxformat='"lx"'
64         else
65                 if $test X"$ivsize" = X"$intsize"; then
66                         ivdformat='"d"'
67                         uvuformat='"u"'
68                         uvoformat='"o"'
69                         uvxformat='"x"'
70                 else
71                         : far out
72                         if $test X"$ivsize" = X"$shortsize"; then
73                                 ivdformat='"hd"'
74                                 uvuformat='"hu"'
75                                 uvoformat='"ho"'
76                                 uvxformat='"hx"'
77                         fi
78                 fi
79         fi
80 fi
81
82 case "$ivdformat" in
83 '') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4
84     exit 1
85     ;;
86 esac
87