This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Get in the last bunch of Configure changes
[metaconfig.git] / U / perl / perlxvf.U
CommitLineData
b4d5f732
JH
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:
3bb42500
JH
8?MAKE:ivdformat uvuformat uvoformat uvxformat uvXUformat \
9 nvEUformat nvFUformat nvGUformat \
208734dd
A
10 nveformat nvfformat nvgformat: \
11 ivsize longsize intsize shortsize \
3bb42500 12 sPRId64 sPRIu64 sPRIo64 sPRIx64 sPRIXU64 \
63a4f1f4 13 uselongdouble d_longdbl usequadmath d_PRIgldbl \
3bb42500 14 sPRIEUldbl sPRIFUldbl sPRIGUldbl sPRIeldbl sPRIfldbl sPRIgldbl \
b4d5f732
JH
15 test echo
16?MAKE: -pick add $@ %<
17?S:ivdformat:
18?S: This variable contains the format string used for printing
2f125bce 19?S: a Perl IV as a signed decimal integer.
b4d5f732
JH
20?S:.
21?S:uvuformat:
22?S: This variable contains the format string used for printing
2f125bce 23?S: a Perl UV as an unsigned decimal integer.
b4d5f732
JH
24?S:.
25?S:uvoformat:
26?S: This variable contains the format string used for printing
2f125bce 27?S: a Perl UV as an unsigned octal integer.
b4d5f732
JH
28?S:.
29?S:uvxformat:
30?S: This variable contains the format string used for printing
208734dd
A
31?S: a Perl UV as an unsigned hexadecimal integer in lowercase abcdef.
32?S:.
3bb42500 33?S:uvXUformat:
208734dd
A
34?S: This variable contains the format string used for printing
35?S: a Perl UV as an unsigned hexadecimal integer in uppercase ABCDEF.
36?S:.
37?S:nveformat:
38?S: This variable contains the format string used for printing
39?S: a Perl NV using %e-ish floating point format.
40?S:.
41?S:nvfformat:
65a32477 42?S: This variable contains the format string used for printing
208734dd
A
43?S: a Perl NV using %f-ish floating point format.
44?S:.
45?S:nvgformat:
46?S: This variable contains the format string used for printing
47?S: a Perl NV using %g-ish floating point format.
48?S:.
3bb42500 49?S:nvEUformat:
208734dd
A
50?S: This variable contains the format string used for printing
51?S: a Perl NV using %E-ish floating point format.
52?S:.
3bb42500 53?S:nvFUformat:
65a32477 54?S: This variable contains the format string used for printing
208734dd
A
55?S: a Perl NV using %F-ish floating point format.
56?S:.
3bb42500 57?S:nvGUformat:
208734dd
A
58?S: This variable contains the format string used for printing
59?S: a Perl NV using %G-ish floating point format.
b4d5f732
JH
60?S:.
61?C:IVdf:
62?C: This symbol defines the format string used for printing a Perl IV
63?C: as a signed decimal integer.
64?C:.
65?C:UVuf:
66?C: This symbol defines the format string used for printing a Perl UV
67?C: as an unsigned decimal integer.
68?C:.
69?C:UVof:
70?C: This symbol defines the format string used for printing a Perl UV
71?C: as an unsigned octal integer.
72?C:.
73?C:UVxf:
74?C: This symbol defines the format string used for printing a Perl UV
208734dd
A
75?C: as an unsigned hexadecimal integer in lowercase abcdef.
76?C:.
77?C:UVXf:
78?C: This symbol defines the format string used for printing a Perl UV
79?C: as an unsigned hexadecimal integer in uppercase ABCDEF.
80?C:.
81?C:NVef:
82?C: This symbol defines the format string used for printing a Perl NV
83?C: using %e-ish floating point format.
84?C:.
85?C:NVff:
86?C: This symbol defines the format string used for printing a Perl NV
87?C: using %f-ish floating point format.
88?C:.
89?C:NVgf:
90?C: This symbol defines the format string used for printing a Perl NV
91?C: using %g-ish floating point format.
92?C:.
93?C:NVEf:
94?C: This symbol defines the format string used for printing a Perl NV
95?C: using %E-ish floating point format.
96?C:.
97?C:NVFf:
98?C: This symbol defines the format string used for printing a Perl NV
99?C: using %F-ish floating point format.
100?C:.
101?C:NVGf:
102?C: This symbol defines the format string used for printing a Perl NV
103?C: using %G-ish floating point format.
b4d5f732
JH
104?C:.
105?H:#define IVdf $ivdformat /**/
106?H:#define UVuf $uvuformat /**/
107?H:#define UVof $uvoformat /**/
108?H:#define UVxf $uvxformat /**/
3bb42500 109?H:#define UVXf $uvXUformat /**/
208734dd
A
110?H:#define NVef $nveformat /**/
111?H:#define NVff $nvfformat /**/
112?H:#define NVgf $nvgformat /**/
3bb42500
JH
113?H:#define NVEf $nvEUformat /**/
114?H:#define NVFf $nvFUformat /**/
115?H:#define NVGf $nvGUformat /**/
b4d5f732 116?H:.
2f125bce 117: Check format strings for internal types
b4d5f732
JH
118echo " "
119$echo "Checking the format strings to be used for Perl's internal types..." >&4
120
121if $test X"$ivsize" = X8; then
122 ivdformat="$sPRId64"
123 uvuformat="$sPRIu64"
124 uvoformat="$sPRIo64"
125 uvxformat="$sPRIx64"
3bb42500 126 uvXUformat="$sPRIXU64"
b4d5f732
JH
127else
128 if $test X"$ivsize" = X"$longsize"; then
129 ivdformat='"ld"'
130 uvuformat='"lu"'
131 uvoformat='"lo"'
132 uvxformat='"lx"'
3bb42500 133 uvXUformat='"lX"'
b4d5f732
JH
134 else
135 if $test X"$ivsize" = X"$intsize"; then
136 ivdformat='"d"'
137 uvuformat='"u"'
138 uvoformat='"o"'
139 uvxformat='"x"'
3bb42500 140 uvXUformat='"X"'
b4d5f732
JH
141 else
142 : far out
143 if $test X"$ivsize" = X"$shortsize"; then
144 ivdformat='"hd"'
145 uvuformat='"hu"'
146 uvoformat='"ho"'
147 uvxformat='"hx"'
3bb42500 148 uvXUformat='"hX"'
b4d5f732
JH
149 fi
150 fi
151 fi
152fi
153
63a4f1f4
MBT
154if $test X"$usequadmath" = X"$define"; then
155 nveformat='"Qe"'
156 nvfformat='"Qf"'
157 nvgformat='"Qg"'
158 nvEUformat='"QE"'
159 nvFUformat='"QF"'
160 nvGUformat='"QG"'
208734dd 161else
0c7f0563
MBT
162 if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then
163 nveformat="$sPRIeldbl"
164 nvfformat="$sPRIfldbl"
165 nvgformat="$sPRIgldbl"
166 nvEUformat="$sPRIEUldbl"
167 nvFUformat="$sPRIFUldbl"
168 nvGUformat="$sPRIGUldbl"
169 else
170 nveformat='"e"'
171 nvfformat='"f"'
172 nvgformat='"g"'
173 nvEUformat='"E"'
174 nvFUformat='"F"'
175 nvGUformat='"G"'
176 fi
208734dd
A
177fi
178
b4d5f732 179case "$ivdformat" in
2d8cf008 180'') echo "$0: Fatal: failed to find format strings, cannot continue." >&4
b4d5f732
JH
181 exit 1
182 ;;
183esac
184