> On Sep 18, 2019, at 1:07 AM, Noah Misch <[email protected]> wrote:
> 
> On Tue, Sep 17, 2019 at 02:59:33PM +0200, Michael Weiser wrote:
>> On Mon, Sep 02, 2019 at 10:06:00AM -0700, Noah Misch wrote:
>>>> What are your
>>>> thoughts on this, particularly license-wise where to grab an
>>>> implementation from (BSD?)?
>>> BSD is a good bet.  More often than not, I use NetBSD as a source of library
>>> code like this.
>> 
>> I've finally had some time to look into this. The NetBSD as well as
>> glibc implementations of strtod() are huge. Duplicating them in DBD::Pg
>> just for this single call would be a nightmare IMO.
> 
> That is unfortunate.  How huge?
> 
>> I did however stumble across strtod_l() which takes a locale as a third
>> argument.
> 
> That function is not portable enough:
> https://www.gnu.org/software/gnulib/manual/html_node/strtod_005fl.html

This code claims to be in the public domain; no idea if it’s any good, but 
looks like a reasonable size at least:

https://gist.github.com/mattn/1890186

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to