From 628e1a40d854546bd93e9304795a0b62669c91c2 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sun, 16 Jan 2000 16:37:47 +0000 Subject: [PATCH] Continue qgcvt work; closer now but not yet there. p4raw-id: //depot/cfgperl@4806 --- Configure | 187 +++++++++++++++++++++++++++--------------------------- Porting/Glossary | 4 -- Porting/config.sh | 5 +- Porting/config_H | 2 +- doop.c | 8 +-- utf8.c | 2 +- 6 files changed, 103 insertions(+), 105 deletions(-) diff --git a/Configure b/Configure index adc58e9..29a59fb 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sat Jan 15 23:59:51 EET 2000 [metaconfig 3.0 PL70] +# Generated on Sun Jan 16 18:22:25 EET 2000 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", (int)sizeof(double)); + exit(0); +} +EOCP + set try + if eval $compile_ok; then + doublesize=`./try` + $echo " $doublesize bytes." >&4 + else + dflt='8' + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of a double precision number (in bytes)?" + . ./myread + doublesize="$ans" + fi + ;; +esac +$rm -f try.c try + +: check for long doubles +echo " " +$echo $n "Checking to see if your system supports long double..." $c >&4 +echo 'int main() { long double x = 7.0; }' > try.c +set try +if eval $compile; then + val="$define" + echo " Yes, it does." >&4 +else + val="$undef" + echo " No, it doesn't." >&4 +fi +$rm try.* +set d_longdbl +eval $setvar + +: check for length of long double +case "${d_longdbl}${longdblsize}" in +$define) + echo " " + $echo $n "Checking to see how big your long doubles are..." $c >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", sizeof(long double)); +} +EOCP + set try + set try + if eval $compile; then + longdblsize=`./try$exe_ext` + $echo " $longdblsize bytes." >&4 + else + dflt='8' + echo " " + echo "(I can't seem to compile the test program. Guessing...)" >&4 + rp="What is the size of a long double (in bytes)?" + . ./myread + longdblsize="$ans" + fi + if $test "X$doublesize" = "X$longdblsize"; then + echo "(That isn't any different from an ordinary double.)" + fi + ;; +esac +$rm -f try.* try : Check how to convert floats to strings. if test "X$d_Gconvert" = X; then echo " " echo "Checking for an efficient way to convert floats to strings." - $cat >try.c <<'EOP' + $cat >try.c < +#ifdef I_STDLIB +#include +#endif + int checkit(expect, got) char *expect; @@ -7193,24 +7273,24 @@ int main() /* This must be 1st test on (which?) platform */ /* Alan Burlison */ - Gconvert(0.1, 8, 0, buf); + Gconvert((DOUBLETYPE)0.1, 8, 0, buf); checkit("0.1", buf); - Gconvert(1.0, 8, 0, buf); + Gconvert((DOUBLETYPE)1.0, 8, 0, buf); checkit("1", buf); - Gconvert(0.0, 8, 0, buf); + Gconvert((DOUBLETYPE)0.0, 8, 0, buf); checkit("0", buf); - Gconvert(-1.0, 8, 0, buf); + Gconvert((DOUBLETYPE)-1.0, 8, 0, buf); checkit("-1", buf); /* Some Linux gcvt's give 1.e+5 here. */ - Gconvert(100000.0, 8, 0, buf); + Gconvert((DOUBLETYPE)100000.0, 8, 0, buf); checkit("100000", buf); /* Some Linux gcvt's give -1.e+5 here. */ - Gconvert(-100000.0, 8, 0, buf); + Gconvert((DOUBLETYPE)-100000.0, 8, 0, buf); checkit("-100000", buf); exit(0); @@ -7223,8 +7303,8 @@ EOP *) xxx_list='gconvert gcvt sprintf' ;; esac - case "$uselongdouble$d_qgcvt" in - definedefine) xxx_list="`echo $xxx_list|sed s/gcvt/qgcvt/`" ;; + case "$d_longdbl$uselongdouble" in + definedefine) xxx_list="`echo $xxx_list|sed 's/gcvt/qgcvt gcvt/'`" ;; esac for xxx_convert in $xxx_list; do @@ -7232,7 +7312,7 @@ EOP $rm -f try try$_o set try -DTRY_$xxx_convert if eval $compile; then - echo "$xxx_convert" found. >&4 + echo "$xxx_convert() found." >&4 if ./try; then echo "I'll use $xxx_convert to convert floats into a string." >&4 break; @@ -7252,82 +7332,6 @@ EOP esac fi -: check for length of double -echo " " -case "$doublesize" in -'') - $echo $n "Checking to see how big your double precision numbers are...$c" >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", (int)sizeof(double)); - exit(0); -} -EOCP - set try - if eval $compile_ok; then - doublesize=`./try` - $echo " $doublesize bytes." >&4 - else - dflt='8' - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of a double precision number (in bytes)?" - . ./myread - doublesize="$ans" - fi - ;; -esac -$rm -f try.c try - -: check for long doubles -echo " " -$echo $n "Checking to see if your system supports long double..." $c >&4 -echo 'int main() { long double x = 7.0; }' > try.c -set try -if eval $compile; then - val="$define" - echo " Yes, it does." >&4 -else - val="$undef" - echo " No, it doesn't." >&4 -fi -$rm try.* -set d_longdbl -eval $setvar - -: check for length of long double -case "${d_longdbl}${longdblsize}" in -$define) - echo " " - $echo $n "Checking to see how big your long doubles are..." $c >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", sizeof(long double)); -} -EOCP - set try - set try - if eval $compile; then - longdblsize=`./try$exe_ext` - $echo " $longdblsize bytes." >&4 - else - dflt='8' - echo " " - echo "(I can't seem to compile the test program. Guessing...)" >&4 - rp="What is the size of a long double (in bytes)?" - . ./myread - longdblsize="$ans" - fi - if $test "X$doublesize" = "X$longdblsize"; then - echo "(That isn't any different from an ordinary double.)" - fi - ;; -esac -$rm -f try.* try - echo " " if $test X"$d_longdbl" = X"$define"; then @@ -14561,7 +14565,6 @@ d_pwexpire='$d_pwexpire' d_pwgecos='$d_pwgecos' d_pwpasswd='$d_pwpasswd' d_pwquota='$d_pwquota' -d_qgcvt='$d_qgcvt' d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' diff --git a/Porting/Glossary b/Porting/Glossary index 080a4d8..1bd313b 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1081,10 +1081,6 @@ d_pwquota (i_pwd.U): This variable conditionally defines PWQUOTA, which indicates that struct passwd contains pw_quota. -d_qgcvt (d_qgcvt.U): - This variable conditionally defines the HAS_QGCVT symbol, which - indicates to the C program that the qgcvt() routine is available. - d_quad (quadtype.U): This variable, if defined, tells that there's a 64-bit integer type, quadtype. diff --git a/Porting/config.sh b/Porting/config.sh index 1da2efa..40c49ca 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Sat Jan 15 23:22:46 EET 2000 +# Configuration time: Sun Jan 16 18:32:10 EET 2000 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -59,7 +59,7 @@ ccflags='-pthread -std -DLANGUAGE_C' ccsymbols='__LANGUAGE_C__=1 _LONGLONG=1 LANGUAGE_C=1 SYSTYPE_BSD=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Sat Jan 15 23:22:46 EET 2000' +cf_time='Sun Jan 16 18:32:10 EET 2000' charsize='1' chgrp='' chmod='' @@ -249,7 +249,6 @@ d_pwexpire='undef' d_pwgecos='define' d_pwpasswd='define' d_pwquota='define' -d_qgcvt='undef' d_quad='define' d_readdir='define' d_readlink='define' diff --git a/Porting/config_H b/Porting/config_H index 729fb7e..858c3a4 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Sat Jan 15 23:22:46 EET 2000 + * Configuration time: Sun Jan 16 18:32:10 EET 2000 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ diff --git a/doop.c b/doop.c index 1ad8bfa..990898d 100644 --- a/doop.c +++ b/doop.c @@ -719,7 +719,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) if (offset >= srclen) retnum = 0; else - retnum = (UV) s[offset] << 8; + retnum = (UV) s[offset] << 8; } else if (size == 32) { if (offset >= srclen) @@ -786,7 +786,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) ((UV) s[offset + 3] << 32) + ((UV) s[offset + 4] << 24) + ((UV) s[offset + 5] << 16) + - ( s[offset + 6] << 8); + ( s[offset + 6] << 8); } #endif } @@ -799,7 +799,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) retnum = s[offset]; else if (size == 16) retnum = - ((UV) s[offset] << 8) + + ((UV) s[offset] << 8) + s[offset + 1]; else if (size == 32) retnum = @@ -820,7 +820,7 @@ Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size) ((UV) s[offset + 3] << 32) + ((UV) s[offset + 4] << 24) + ((UV) s[offset + 5] << 16) + - ( s[offset + 6] << 8) + + ( s[offset + 6] << 8) + s[offset + 7]; } #endif diff --git a/utf8.c b/utf8.c index 7bae55c..0153fd6 100644 --- a/utf8.c +++ b/utf8.c @@ -69,7 +69,7 @@ Perl_uv_to_utf8(pTHX_ U8 *d, UV uv) return d; } #ifdef HAS_QUAD - if (uv < 0x1000000000) + if (uv < 0x1000000000LL) #endif { *d++ = 0xfe; /* Can't match U+FEFF! */ -- 2.7.4