diff --git a/config/auto/memalign.pm b/config/auto/memalign.pm index 9cf5408665..a92ce68f8a 100644 --- a/config/auto/memalign.pm +++ b/config/auto/memalign.pm @@ -41,8 +41,6 @@ sub runstep { _set_malloc_header($conf); - _set_ptrcast($conf); - $conf->cc_gen('config/auto/memalign/test_c.in'); eval { $conf->cc_build(); }; unless ( $@ || $conf->cc_run_capture() !~ /ok/ ) { @@ -74,16 +72,6 @@ sub _set_malloc_header { } } -sub _set_ptrcast { - my $conf = shift; - if ( $conf->data->get('ptrsize') == $conf->data->get('intsize') ) { - $conf->data->set( ptrcast => 'int' ); - } - else { - $conf->data->set( ptrcast => 'long' ); - } -} - sub _set_memalign { my $self = shift; my ($conf, $test, $test2) = @_; diff --git a/t/steps/auto/memalign-01.t b/t/steps/auto/memalign-01.t index 23cbc0d387..8d544e62b0 100644 --- a/t/steps/auto/memalign-01.t +++ b/t/steps/auto/memalign-01.t @@ -75,32 +75,6 @@ $step = test_step_constructor_and_description($conf); $conf->data->set('i_malloc' => undef); # reset for next test } -########### _set_ptrcast() ########### - -{ - $conf->data->set('ptrsize' => 2); - $conf->data->set('intsize' => 2); - ok(auto::memalign::_set_ptrcast($conf), - "_set_ptrcast() returned true value"); - is($conf->data->get( 'ptrcast' ), 'int', - "ptrcast has expected value"); - # reset for next test - $conf->data->set('ptrsize' => undef); - $conf->data->set('intsize' => undef); -} - -{ - $conf->data->set('ptrsize' => 2); - $conf->data->set('intsize' => 4); - ok(auto::memalign::_set_ptrcast($conf), - "_set_ptrcast() returned true value"); - is($conf->data->get( 'ptrcast' ), 'long', - "ptrcast has expected value"); - # reset for next test - $conf->data->set('ptrsize' => undef); - $conf->data->set('intsize' => undef); -} - ########### _set_memalign() ########### {