In metaconfig.git, the branch master has been updated <http://perl5.git.perl.org/metaconfig.git/commitdiff/17333dbf3f71d359b4b2dbc76a802eae9229b20e?hp=adc7640845fa03ace8d13edd92d8b2a3685690b2>
- Log ----------------------------------------------------------------- commit 17333dbf3f71d359b4b2dbc76a802eae9229b20e Author: H.Merijn Brand - Tux <[email protected]> Date: Tue Jul 5 22:46:05 2016 +0200 VAX: Configure changes for VAX floats Backport of c183cd86045c09fcbba056a606ae50f11c9c5b5a Detect the VAX floating point formats D and G. And the F float, but that is float (duh), never likely to be the double, but do it for consistency (we detect IEEE single precision floats, too). The T float and X float are the IEEE 64-bit and 128-bit, but those were available only on the Alpha. Tested on vax-netbsd. ----------------------------------------------------------------------- Summary of changes: U/perl/longdblfio.U | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/U/perl/longdblfio.U b/U/perl/longdblfio.U index 9fe8ea3..ebdedb1 100644 --- a/U/perl/longdblfio.U +++ b/U/perl/longdblfio.U @@ -1,6 +1,6 @@ ?RCS: $Id$ ?RCS: -?RCS: Copyright (c) 1999 Jarkko Hietaniemi +?RCS: Copyright (c) 1999-2016 Jarkko Hietaniemi ?RCS: ?RCS: You may distribute under the terms of either the GNU General Public ?RCS: License or the Artistic License, as specified in the README file. @@ -22,6 +22,9 @@ ?S: 6 = IEEE 754 128-bit big endian, ?S: 7 = IEEE 754 64-bit mixed endian le-be, ?S: 8 = IEEE 754 64-bit mixed endian be-le, +?S: 9 = VAX 32bit little endian F float format +?S: 10 = VAX 64bit little endian D float format +?S: 11 = VAX 64bit little endian G float format ?S: -1 = unknown format. ?S:. ?S:d_PRIfldbl: @@ -130,6 +133,9 @@ ?C: DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN ?C: DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE ?C: DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE +?C: DOUBLE_IS_VAX_F_FLOAT +?C: DOUBLE_IS_VAX_D_FLOAT +?C: DOUBLE_IS_VAX_G_FLOAT ?C: DOUBLE_IS_UNKNOWN_FORMAT ?C:. ?LINT:known DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN @@ -140,6 +146,9 @@ ?LINT:known DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN ?LINT:known DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE ?LINT:known DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE +?LINT:known DOUBLE_IS_VAX_F_FLOAT +?LINT:known DOUBLE_IS_VAX_D_FLOAT +?LINT:known DOUBLE_IS_VAX_G_FLOAT ?LINT:known DOUBLE_IS_UNKNOWN_FORMAT ?H:#define DOUBLEKIND $doublekind /**/ ?H:?DOUBLEKIND:#define DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN 1 @@ -150,6 +159,9 @@ ?H:?DOUBLEKIND:#define DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN 6 ?H:?DOUBLEKIND:#define DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_LE_BE 7 ?H:?DOUBLEKIND:#define DOUBLE_IS_IEEE_754_64_BIT_MIXED_ENDIAN_BE_LE 8 +?H:?DOUBLEKIND:#define DOUBLE_IS_VAX_F_FLOAT 9 +?H:?DOUBLEKIND:#define DOUBLE_IS_VAX_D_FLOAT 10 +?H:?DOUBLEKIND:#define DOUBLE_IS_VAX_G_FLOAT 11 ?H:?DOUBLEKIND:#define DOUBLE_IS_UNKNOWN_FORMAT -1 ?H:#$d_PRIfldbl PERL_PRIfldbl $sPRIfldbl /**/ ?H:#$d_PRIgldbl PERL_PRIgldbl $sPRIgldbl /**/ @@ -186,6 +198,11 @@ int main() { printf("2\n"); exit(0); } + if (b[0] == 0xCC && b[3] == 0xCC) { + /* VAX format F */ + printf("9\n"); + exit(0); + } #endif #if DOUBLESIZE == 8 if (b[0] == 0x9A && b[7] == 0xBF) { @@ -212,6 +229,16 @@ int main() { printf("8\n"); exit(0); } + if (b[0] == 0xCC && b[7] == 0xCC) { + /* VAX format D, 64-bit little-endian. */ + printf("10\n"); + exit(0); + } + if (b[0] == 0xD9 && b[7] == 0x99) { + /* VAX format G, 64-bit little-endian. */ + printf("11\n"); + exit(0); + } #endif #if DOUBLESIZE == 16 if (b[0] == 0x9A && b[15] == 0xBF) { @@ -225,7 +252,7 @@ int main() { exit(0); } #endif - /* Then there are old mainframe/miniframe formats like VAX, IBM, and CRAY. + /* Then there are old mainframe/miniframe formats like IBM and CRAY. * Whether those environments can still build Perl is debatable. */ printf("-1\n"); /* unknown */ exit(0); @@ -246,7 +273,10 @@ case "$doublekind" in 6) echo "You have IEEE 754 128-bit big endian doubles." >&4 ;; 7) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit LEs in BE)." >&4 ;; 8) echo "You have IEEE 754 64-bit mixed endian doubles (32-bit BEs in LE)." >&4 ;; -*) echo "Cannot figure out your double. You VAX, or something?" >&4 ;; +9) echo "You have VAX format F 32-bit little-endian doubles." >&4 ;; +10) echo "You have VAX format D 64-bit little-endian doubles." >&4 ;; +11) echo "You have VAX format G 64-bit little-endian doubles." >&4 ;; +*) echo "Cannot figure out your double. You CRAY, or something?" >&4 ;; esac $rm_try -- perl5 metaconfig repository
