I noticed the following in pack.pm.
sub _set_ptrconst {
my ($conf, $ptrsize, $intsize, $longsize) = @_;
if ( $intsize == $ptrsize ) {
$conf->data->set( ptrconst => "u" );
}
elsif ( $longsize == $ptrsize ) {
$conf->data->set( ptrconst => "ul" );
}
else {
warn <<"AARGH";
Configure.pl: Unable to find an integer type that fits a pointer.
AARGH
}
}
The first condition is good, but I don't think the second ($longsize ==
$ptrsize) is. "l" is documented as:
l A signed long (32-bit) value.
So, this only works okay if $longsize is 4, or am I missing something?
Shouldn't it better be like this?
sub _set_ptrconst {
my ($conf, $ptrsize) = @_;
if ( $ptrsize == 2 ) {
$conf->data->set( ptrconst => "us" );
}
elsif ( $ptrsize == 4 ) {
$conf->data->set( ptrconst => "ul" );
}
elsif ( $ptrsize == 8 ) {
$conf->data->set( ptrconst => "uq" );
}
else {
warn <<"AARGH";
Configure.pl: Unable to find an integer type that fits a pointer.
AARGH
}
}
Ron