develooper Front page | perl.perl5.porters | Postings from June 2019

Re: "perl -V"' output always lists "USE_PERL_ATOF" ??

Thread Previous
From:
ilmari
Date:
June 17, 2019 15:57
Subject:
Re: "perl -V"' output always lists "USE_PERL_ATOF" ??
Message ID:
d8jblywxl0h.fsf@dalvik.ping.uio.no
"H.Merijn Brand" <h.m.brand@xs4all.nl> writes:

>> #ifdef USE_PERL_ATOF
>> #   define Perl_atof(s) Perl_my_atof(s)
>> #   define Perl_atof2(s, n) Perl_my_atof3(aTHX_ (s), &(n), 0)
>> #else
>> #   define Perl_atof(s) (NV)atof(s)
>> #   define Perl_atof2(s, n) ((n) = atof(s))
>> #endif
>> #define my_atof2(a,b) my_atof3(a,b,0)
>
> Isn't that contradicting with -Accflags=-DUSE_PERL_ATOF=0 ?
>
> Shouldn't the define be #if instead of #ifdef then?

Sorry, I didn't quote the entire relevant code.  Just above that,
there's this bit:

#ifndef USE_PERL_ATOF
#   ifndef _UNICOS
#       define USE_PERL_ATOF
#   endif
#else
#   if USE_PERL_ATOF == 0
#       undef USE_PERL_ATOF
#   endif
#endif

So it defaults to defined unless it's explicitly zero or we're on
Unicos(!).

- ilmari
-- 
"A disappointingly low fraction of the human race is,
 at any given time, on fire." - Stig Sandbeck Mathisen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About