In configuration step class auto::pack there are found the following two
code blocks:

    my $intsize  = $conf->data->get('intsize');
    my $longsize = $conf->data->get('longsize');
    my $ptrsize  = $conf->data->get('ptrsize');

    ...

    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
    }

Nothing between these two code blocks makes any new assignments to any
of these three variables.  Hence, the determination of what to set
'ptrconst' to is entirely dependent on how 'intsize', 'longsize' and
'ptrsize' were set in an *earlier* configuration step -- 3 steps earlier
in auto::sizes, to be precise.

This being the case, wouldn't it make sense to move the setting of
'ptrconst' to config/auto/sizes.pm?  That way, config/auto/pack.pm could
focus strictly on ... packing.

Thoughts?

Thank you very much.

kid51


Reply via email to