-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Defines are still needed for FMT_MODULE as well #4027
Conversation
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 fix! LGTM, just one minor comment inline.
src/os.cc
Outdated
#if FMT_USE_FCNTL | ||
# ifdef _WIN32 |
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.
We can merge these two now to reduce nesting:
#if FMT_USE_FCNTL && defined(_WIN32)
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.
Changed to #if defined(FMT_USE_FCNTL) && defined(_WIN32)
(see below)
src/os.cc
Outdated
#if FMT_USE_FCNTL | ||
# ifdef _WIN32 |
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.
#if FMT_USE_FCNTL | |
# ifdef _WIN32 | |
#if defined(FMT_USE_FCNTL) && defined(_WIN32) |
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.
Correct it would be needed for FMT_USE_FCNTL == 0
and FMT_USE_FCNTL == 1
due to
constexpr mode_t default_open_mode =
S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
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.
It looks redundant now, let's just remove the FMT_USE_FCNTL
check here.
Merged, thanks! |
The alternative is duplicating these in fmt.cc.