-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix include xlocale #3699
Fix include xlocale #3699
Conversation
include/fmt/os.h
Outdated
@@ -14,7 +14,9 @@ | |||
#include <system_error> // std::system_error | |||
|
|||
#if defined __APPLE__ || defined(__FreeBSD__) | |||
# include <xlocale.h> // for LC_NUMERIC_MASK on OS X | |||
# if (__cplusplus < 201703L) || __has_include(<xlocale.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.
Please use FMT_HAS_INCLUDE(<xlocale.h>)
instead of these checks.
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.
@vitaut Hi, I changed the code to use FMT_HAS_INCLUDE and rebased on origin's master.
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 the PR
1ca3f28
to
b345027
Compare
Merged with a minor tweak, thanks. |
I use fmtlib's fmt on some console game development environment, but os.h doesn't compile because of missing of xlocale.h.
Therefore I added
__has_include()
check before including xlocale.h.Thanks.