diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2015-12-08 08:40:38 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2015-12-14 06:38:34 -0500 |
commit | b5897239a0c3c2f5ec699690086b30e7db4305d4 (patch) | |
tree | 7e380630a2c128514fbf4d047246e148856565ee /Configure | |
parent | a46a7b6eb88341755ccf2ee4854616716e0504bc (diff) | |
download | perl-b5897239a0c3c2f5ec699690086b30e7db4305d4.tar.gz |
Configure: cannot trust the bytes after the 80-bit fp
They can be zero, they can be garbage.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -6956,16 +6956,17 @@ int main() { } #endif /* For alignment 32-bit platforms have the 80 bits in 12 bytes, - * while 64-bits platforms have it in 16 bytes. */ + * while 64-bits platforms have it in 16 bytes. The trailing bytes + * cannot be trusted. */ #if LDBL_MANT_DIG == 64 && (LONGDBLSIZE == 16 || LONGDBLSIZE == 12) - if (b[0] == 0xCD && b[9] == 0xBF && b[10] == 0x00) { + if (b[0] == 0xCD && b[9] == 0xBF) { /* x86 80-bit little-endian, sizeof 12 (ILP32, Solaris x86) * or 16 (LP64, Linux and OS X), 4 or 6 bytes of padding. * Also known as "extended precision". */ printf("3\n"); exit(0); } - if (b[0] == 0xBF && b[9] == 0xCD && b[10] == 0x00) { + if (b[0] == 0xBF && b[9] == 0xCD) { /* is there ever big-endian 80-bit, really? */ printf("4\n"); exit(0); |