-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`xlocale.h` is not available on Linux, so we can't just universally include it. `HAVE_XLOCALE_H` was already being tested/set in the CMake script as a possible requirement for `wcstod_l` support, this just adds it to `config_cmake_h.in` and uses it in `wutil.h` to gate the include.
- Loading branch information
Showing
2 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2bb53f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using xlocale is almost always wrong, as far as I can tell. I haven't got 10.10 running anywhere still; what's the compilation error you're getting without this?
2bb53f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locale_t
is undefined without it. Note thatxlocale.h
was also required to getwcstod_l
under FreeBSD.2bb53f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting; POSIX requires
locale.h
to definelocale_t
, although I suppose 10.10 might have predated that requirement (added in issue 7).Anyway pulling in
<sstream>
pulls in<xlocale.h>
on 10.11, which I guess is why this just worked beforehand.2bb53f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging into it and for that info.
2bb53f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can define
_USE_EXTENDED_LOCALES_
and thenstdlib.h
includesxlocale.h
itself on Darwin and FreeBSD.