cvsuser 02/01/03 16:47:13
Modified: . Configure.pl
Log:
Updated 64-bit patch
Courtesy of "David M. Lloyd" <[EMAIL PROTECTED]>
Revision Changes Path
1.67 +26 -8 parrot/Configure.pl
Index: Configure.pl
===================================================================
RCS file: /home/perlcvs/parrot/Configure.pl,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -w -r1.66 -r1.67
--- Configure.pl 4 Jan 2002 00:43:23 -0000 1.66
+++ Configure.pl 4 Jan 2002 00:47:13 -0000 1.67
@@ -2,7 +2,7 @@
#
# Configure.pl
#
-# $Id: Configure.pl,v 1.66 2002/01/04 00:43:23 dan Exp $
+# $Id: Configure.pl,v 1.67 2002/01/04 00:47:13 dan Exp $
#
# Author: Brent Dax
#
@@ -42,7 +42,7 @@
if($opt_version) {
print "Parrot Version $parrot_version Configure\n";
- print '$Id: Configure.pl,v 1.66 2002/01/04 00:43:23 dan Exp $' . "\n";
+ print '$Id: Configure.pl,v 1.67 2002/01/04 00:47:13 dan Exp $' . "\n";
exit;
}
@@ -141,11 +141,11 @@
debugging => $opt_debugging,
rm_f => 'rm -f',
rm_rf => 'rm -rf',
- stacklow => '(~0xfff)UL',
- intlow => '(~0xfff)UL',
- numlow => '(~0xfff)UL',
- strlow => '(~0xfff)UL',
- pmclow => '(~0xfff)UL',
+ stacklow => '(~0xfffu)',
+ intlow => '(~0xfffu)',
+ numlow => '(~0xfffu)',
+ strlow => '(~0xfffu)',
+ pmclow => '(~0xfffu)',
make => $Config{make},
make_set_make => $Config{make_set_make},
@@ -429,6 +429,24 @@
$c{packtype_n} = 'd';
+#
+# Find out what integer constant type we can use
+# for pointers.
+#
+
+print "Figuring out what integer type we can mix with pointers...\n";
+
+if ($c{intsize} == $c{ptrsize}) {
+ print "We'll use 'unsigned int'.\n";
+ $c{ptrconst} = "u";
+} elsif ($c{longsize} == $c{ptrsize}) {
+ print "We'll use 'unsigned long'.\n";
+ $c{ptrconst} = "ul";
+} else {
+ die <<"AARGH";
+Configure.pl: Unable to find an integer type that fits a pointer.
+AARGH
+}
#
# Build config.h, the Makfefiles and Types.pm:
@@ -701,7 +719,7 @@
my $vector = unpack("b*", pack("V", $_));
my $offset = rindex($vector, "1")+1;
my $mask = 2**$offset - 1;
- push @returns, "(~0x".sprintf("%x", $mask)."UL)";
+ push @returns, "(~0x".sprintf("%x", $mask).$c{ptrconst}.")";
}
return @returns;