Use wcstod_l on NetBSD

It has wcstod_l, but not uselocale, so we can't use the fallback.
This commit is contained in:
Fabian Homborg 2019-01-20 18:33:04 +01:00
parent f90cb3957f
commit c66b3128ec
2 changed files with 5 additions and 2 deletions

View File

@ -389,7 +389,7 @@ int flock(int fd, int op) {
#endif // HAVE_FLOCK
#ifndef HAVE_WCSTOD_L
#if !defined(HAVE_WCSTOD_L) && !defined(__NetBSD__)
#undef wcstod_l
// For platforms without wcstod_l C extension, wrap wcstod after changing the
// thread-specific locale.

View File

@ -199,7 +199,10 @@ int flock(int fd, int op);
#endif
#ifndef HAVE_WCSTOD_L
// NetBSD _has_ wcstod_l, but it's doing some weak linking hullabaloo that I don't get.
// Since it doesn't have uselocale (yes, the standard function isn't there, the non-standard extension is),
// we can't try to use the fallback.
#if !defined(HAVE_WCSTOD_L) && !defined(__NetBSD__)
// On some platforms if this is incorrectly detected and a system-defined
// defined version of `wcstod_l` exists, calling `wcstod` from our own
// `wcstod_l` can call back into `wcstod_l` causing infinite recursion.