Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Configuring perl such that HAS_STRTOD is not defined

by syphilis (Bishop)
on Jul 11, 2018 at 00:43 UTC ( #1218265=perlquestion: print w/replies, xml ) Need Help??

syphilis has asked for the wisdom of the Perl Monks concerning the following question:


Whenever I build a modern perl on Linux, the symbol HAS_STRTOD (in the C source) is defined, as also is $Config{d_strtod}.
Is there a command line option that I can provide to "sh Configure" that will set HAS_STRTOD (and therefore also $Config{d_strtod}) to undef ?


Replies are listed 'Best First'.
Re: Configuring perl such that HAS_STRTOD is not defined
by haukex (Chancellor) on Jul 11, 2018 at 09:45 UTC

    This worked for me:

    $ git checkout v5.28.0 $ git clean -dxf $ sh Configure -des -U d_strtod $ grep -E '^d_strtod\b' d_strtod='undef' $ grep -E '#define.+HAS_STRTOD\b' config.h /*#define HAS_STRTOD / **/ $ make $ ./perl -Ilib -MConfig -le 'print $Config{d_strtod}//"undef"' undef

    Another method is to patch (I've assumed you don't want d_strtod_l either):

    $ sh Configure -des $ perl -i.bak -pe "s/^d_strtod(?:_l)?=\K.*$/'undef'/" $ sh Configure -S $ make # etc.
      sh Configure -des -U d_strtod

      Thanks - that works for me, too!! I removed the space after the "-U" and ran it as sh Configure -des -Ud_strtod
      With or without that space apparently makes no difference. Odd that it hadn't worked for choroba when he tried it.

        Probably because of the missing -Ilib *headdesk*

        It works now on a different machine, let me try again on the original one once I get to it.

        ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: Configuring perl such that HAS_STRTOD is not defined
by choroba (Archbishop) on Jul 11, 2018 at 01:09 UTC
    I have no idea. Tried with
    -UHAS_STRTOD -Ud_strtod -A undef:HAS_STRTOD -A undef:d_strtod
    but it still gives
    ./perl -MConfig -wE 'say $Config{d_strtod}' define
    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      -UHAS_STRTOD -Ud_strtod -A undef:HAS_STRTOD -A undef:d_strtod

      I tried the first of those shortly after posting. I figured it was a punt worth trying - which it would have been, had it worked ;-)
      Thanks for trying out those other arguments, too.

      I'm thinking it might require an alteration to Config_h.SH, which is a generated file that ships with the source. However, I don't know how to correctly implement the required changes.
      Anyway, my main interest is in ascertaining whether it can be achieved by providing appropriate args to "sh Configure".
      I'll ask about it on the perl porters mailing list if nothing turns up here.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1218265]
Approved by choroba
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2019-12-15 07:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found