Ticket #1236 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

config/auto/format.pm: Replace direct dependence on Perl 5 %Config

Reported by: jkeenan Owned by: jkeenan
Priority: normal Milestone:
Component: configure Version: 1.7.0
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:

Description

In the course of working on TT #1189, I have had occasion to search for files, in the configuration system or elsewhere, which depend unnecessarily on the Perl 5 %Config found on the system where Parrot is being built. I will be opening additional tickets for cases where I find such dependencies in files outside the configuration step tests.

config/auto/format.pm does a direct lookup on Perl 5's %Config to determine one value:

     18 use Config;  # for long double printf format
...
     73     elsif ( $nv eq "long double" ) {
     74 
     75         # Stay way from long double for now (it may be 64 or 80 bits)
     76         # die "long double not supported at this time, use double.";
     77         $nvsize   = $ldsize;
     78         if (defined($Config{'sPRIgldbl'})) {
     79             $nvformat = "%.15" .  $Config{'sPRIgldbl'};
     80             $nvformat =~ s/"//g;   # Perl 5's Config value has embedded         double quotes
     81         }

This is bad. We eventually want to eliminate our dependence on %Config completely. Until that time, we should at least do in this configuration step what we have done in all other configuration steps: use an indirect lookup by going to init::defaults and placing a value in a special part of the Parrot::Configure object.

I opened the auto_format_no_Config branch to work on this. Please see attached patch, which will I will apply in 3-4 days unless there is serious objection.

Thank you very much.

kid51

Attachments

auto.format.diff Download (2.7 KB) - added by jkeenan 5 years ago.

Change History

Changed 5 years ago by jkeenan

Changed 5 years ago by jkeenan

  • status changed from new to assigned
  • owner set to jkeenan

Changed 5 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed
  • patch changed from new to applied

Branch merged into trunk in r42411 and removed from SVN head in r42412. Closing ticket.

Note: See TracTickets for help on using tickets.