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

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

Thread Previous | Thread Next
From:
H.Merijn Brand
Date:
June 17, 2019 12:41
Subject:
Re: "perl -V"' output always lists "USE_PERL_ATOF" ??
Message ID:
20190617144048.06ab7fce@pc09.procura.nl
On Wed, 12 Jun 2019 15:41:24 +0100, ilmari@ilmari.org (Dagfinn Ilmari
Mannsåker) wrote:

> sisyphus <sisyphus359@gmail.com> writes:
> 
> > On Wed, Jun 12, 2019 at 10:41 PM Dagfinn Ilmari Mannsåker
> > <ilmari@ilmari.org> wrote:
> >  
> >> sisyphus <sisyphus359@gmail.com> writes:
> >>  
>  [...]  
> >>
> >> Looking at the comments and code in perl.h, you can disable it by
> >> passing -Accflags=-DUSE_PERL_ATOF=0 to Configure.  
> >
> > Thanks.
> > I've tested, and I can verify that does remove  "USE_PERL_ATOF"
> > from the "perl -V" output.
> >
> > But does configuring perl-5.30.0 with the
> > "-Accflags=-DUSE_PERL_ATOF=0" argument alter perl's functionality
> > in any way ?  
> 
> Looking at the code and comments in perl.h again
> (https://github.com/perl/perl5/blob/maint-5.30/perl.h#L2353-L2378),
> the difference is that it uses the system atof() function instead of
> the perl-provided one:
> 
> #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?

> - ilmari

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.29   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous | Thread Next


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