-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
xlocale.h is not available in newlib / Cygwin #8367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
locale.h is included a few lines earlier, better would be a header existance check for xlocale.h see numpy/core/setup_common.py:OPTIONAL_HEADERS |
I don't really see why xlocale is even included or how we are getting the posix 2008 |
I considered the OPTIONAL_HEADERS approach but wasn't sure if it was overkill or not. I can do that. I don't know why it's used either but don't think it's worth investigating for the purposes of this fix. |
6a8b33f
to
a4915a4
Compare
#ifdef HAVE_XLOCALE_H | ||
#include <xlocale.h> | ||
#else | ||
#include <locale.h> |
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.h is already included so this can be removed
please also add a comment, e.g. /* xlocale.h is included in locale.h on some systems */
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.
Oops, I didn't see that. Thanks for catching it.
a4915a4
to
14dafda
Compare
@@ -1,7 +1,6 @@ | |||
#define PY_SSIZE_T_CLEAN | |||
#include <Python.h> | |||
|
|||
#include <locale.h> |
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.
Oops, I didn't mean to do this.
…from xlocale.h are instead found in locale.h Added a feature check for xlocale.h, with fallback to locale.h if it is missing.
14dafda
to
154b2c1
Compare
looks fine, thanks |
Great, thanks! |
All the symbols defined in xlocale.h are instead found in locale.h