Ticket #294: ld-format.patch

File ld-format.patch, 1.0 KB (added by doughera, 5 years ago)
  • config/auto/format.pm

    diff -r -u parrot-current/config/auto/format.pm parrot-andy/config/auto/format.pm
    old new  
    1515 
    1616use strict; 
    1717use warnings; 
     18use Config;  # for long double printf format 
    1819 
    1920use base qw(Parrot::Configure::Step); 
    2021 
     
    115116        # Stay way from long double for now (it may be 64 or 80 bits) 
    116117        # die "long double not supported at this time, use double."; 
    117118        $nvsize   = $ldsize; 
    118         $nvformat = "%Lf"; 
     119        if (defined($Config{'sPRIgldbl'})) { 
     120            $nvformat = "%.15" .  $Config{'sPRIgldbl'}; 
     121            $nvformat =~ s/"//g;   # Perl 5's Config value has embedded double quotes 
     122        } 
     123        else { 
     124            die qq{Configure.pl:  Can't find a printf-style format specifier for type '$nv'\n}; 
     125        } 
    119126    } 
    120127    else { 
    121128        die qq{Configure.pl:  Can't find a printf-style format specifier for type '$nv'\n};