From: Jarkko Hietaniemi Date: Fri, 18 Aug 2000 03:15:35 +0000 (+0000) Subject: The byteorder code in #6671 was wrong. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad66e0ebddf4284c422b779bd6dd8b67482795b8;p=p5sagit%2Fp5-mst-13.2.git The byteorder code in #6671 was wrong. p4raw-id: //depot/perl@6688 --- diff --git a/configpm b/configpm index 193a8a7..2994787 100755 --- a/configpm +++ b/configpm @@ -134,8 +134,10 @@ sub FETCH { my $t = $Config{ivtype}; my $s = $Config{ivsize}; my $f = $t eq 'long' ? 'L!' : $s == 8 ? 'Q': 'I'; - my $i = unpack($f, pack('C*', map { ord() } 1..$s)); if ($s == 4 || $s == 8) { + my $i = 0; + foreach my $c (reverse(2..$s)) { $i |= ord($c); $i <<= 8 } + $i |= ord(1); $value = join('', unpack('a'x$s, pack($f, $i))); } else { $value = '?'x$s;