Your skill will accomplish
what the force of many cannot
Influencing the Gconvert macroby syphilis (Archbishop)
|on Sep 30, 2020 at 12:16 UTC||Need Help??|
syphilis has asked for the wisdom of the Perl Monks concerning the following question:
This has been (partially, sort of) cross-posted at https://github.com/Perl/perl5/issues/18170.
According to the perl source's uconfig.h:
Unfortunately, on Ubuntu-18.04, the Gconvert macro uses gcvt() - ie the second option.
It's unfortunate because, on Ubuntu-18.04, it produces (for perls whose nvtype is 'double):
Contrast that with(eg) Windows and freebsd-12.0, both of which correctly output:
The issue is that I want the Gconvert macro on my Ubuntu-18.04 perls (when nvtype is double) to use sprintf() instead of gcvt().
That way, I'll get the correct output, as opposed to the truncated garbage that is currently being displayed.
The question is: "How do I realize that objective ?"
Can I do it via a configure argument when building perl?
Or do I need to do it by hacking the perl source ?
It's a fairly simple hack, if that's what's required.
But I'd prefer to do it via a configure argument, if that's possible.
I also wonder if people think that this current behaviour on Ubuntu-18.04 should be fixed.
I think it should ... but I shy away from pushing the case because I have this notion that the vast (and I mean VAST) majority of perl practitioners really do not care about it, and would be quite happy for the current behaviour to continue.