| 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 uvXformat \ |
| 9 | nvEformat nvFformat nvGformat \ |
| 10 | nveformat nvfformat nvgformat: \ |
| 11 | ivsize longsize intsize shortsize \ |
| 12 | sPRId64 sPRIu64 sPRIo64 sPRIx64 sPRIX64 \ |
| 13 | uselongdouble d_longdbl d_PRIgldbl \ |
| 14 | sPRIEldbl sPRIFldbl sPRIGldbl sPRIeldbl sPRIfldbl sPRIgldbl \ |
| 15 | test echo |
| 16 | ?MAKE: -pick add $@ %< |
| 17 | ?S:ivdformat: |
| 18 | ?S: This variable contains the format string used for printing |
| 19 | ?S: a Perl IV as a signed decimal integer. |
| 20 | ?S:. |
| 21 | ?S:uvuformat: |
| 22 | ?S: This variable contains the format string used for printing |
| 23 | ?S: a Perl UV as an unsigned decimal integer. |
| 24 | ?S:. |
| 25 | ?S:uvoformat: |
| 26 | ?S: This variable contains the format string used for printing |
| 27 | ?S: a Perl UV as an unsigned octal integer. |
| 28 | ?S:. |
| 29 | ?S:uvxformat: |
| 30 | ?S: This variable contains the format string used for printing |
| 31 | ?S: a Perl UV as an unsigned hexadecimal integer in lowercase abcdef. |
| 32 | ?S:. |
| 33 | ?S:uvXformat: |
| 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: |
| 42 | ?S: This variable confains the format string used for printing |
| 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:. |
| 49 | ?S:nvEformat: |
| 50 | ?S: This variable contains the format string used for printing |
| 51 | ?S: a Perl NV using %E-ish floating point format. |
| 52 | ?S:. |
| 53 | ?S:nvFformat: |
| 54 | ?S: This variable confains the format string used for printing |
| 55 | ?S: a Perl NV using %F-ish floating point format. |
| 56 | ?S:. |
| 57 | ?S:nvGformat: |
| 58 | ?S: This variable contains the format string used for printing |
| 59 | ?S: a Perl NV using %G-ish floating point format. |
| 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 |
| 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. |
| 104 | ?C:. |
| 105 | ?H:#define IVdf $ivdformat /**/ |
| 106 | ?H:#define UVuf $uvuformat /**/ |
| 107 | ?H:#define UVof $uvoformat /**/ |
| 108 | ?H:#define UVxf $uvxformat /**/ |
| 109 | ?H:#define UVXf $uvXformat /**/ |
| 110 | ?H:#define NVef $nveformat /**/ |
| 111 | ?H:#define NVff $nvfformat /**/ |
| 112 | ?H:#define NVgf $nvgformat /**/ |
| 113 | ?H:#define NVEf $nvEformat /**/ |
| 114 | ?H:#define NVFf $nvFformat /**/ |
| 115 | ?H:#define NVGf $nvGformat /**/ |
| 116 | ?H:. |
| 117 | |
| 118 | echo " " |
| 119 | $echo "Checking the format strings to be used for Perl's internal types..." >&4 |
| 120 | |
| 121 | if $test X"$ivsize" = X8; then |
| 122 | ivdformat="$sPRId64" |
| 123 | uvuformat="$sPRIu64" |
| 124 | uvoformat="$sPRIo64" |
| 125 | uvxformat="$sPRIx64" |
| 126 | uvXformat="$sPRIX64" |
| 127 | else |
| 128 | if $test X"$ivsize" = X"$longsize"; then |
| 129 | ivdformat='"ld"' |
| 130 | uvuformat='"lu"' |
| 131 | uvoformat='"lo"' |
| 132 | uvxformat='"lx"' |
| 133 | uvXformat='"lX"' |
| 134 | else |
| 135 | if $test X"$ivsize" = X"$intsize"; then |
| 136 | ivdformat='"d"' |
| 137 | uvuformat='"u"' |
| 138 | uvoformat='"o"' |
| 139 | uvxformat='"x"' |
| 140 | uvXformat='"X"' |
| 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"' |
| 148 | uvXformat='"hX"' |
| 149 | fi |
| 150 | fi |
| 151 | fi |
| 152 | fi |
| 153 | |
| 154 | if $test X"$uselongdouble" = X"$define" -a X"$d_longdbl" = X"$define" -a X"$d_PRIgldbl" = X"$define"; then |
| 155 | nveformat="$sPRIeldbl" |
| 156 | nvfformat="$sPRIfldbl" |
| 157 | nvgformat="$sPRIgldbl" |
| 158 | nvEformat="$sPRIEldbl" |
| 159 | nvFformat="$sPRIFldbl" |
| 160 | nvGformat="$sPRIGldbl" |
| 161 | else |
| 162 | nveformat='"e"' |
| 163 | nvfformat='"f"' |
| 164 | nvgformat='"g"' |
| 165 | nvEformat='"E"' |
| 166 | nvFformat='"F"' |
| 167 | nvGformat='"G"' |
| 168 | fi |
| 169 | |
| 170 | case "$ivdformat" in |
| 171 | '') echo "$0: Fatal: failed to find format strings, cannot continue." >& 4 |
| 172 | exit 1 |
| 173 | ;; |
| 174 | esac |
| 175 | |