KEMBAR78
Defines are still needed for FMT_MODULE as well by matt77hias · Pull Request #4027 · fmtlib/fmt · GitHub
Skip to content

Conversation

@matt77hias
Copy link
Contributor

@matt77hias matt77hias commented Jun 18, 2024

The alternative is duplicating these in fmt.cc.

Copy link
Contributor

@vitaut vitaut left a 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
Comment on lines 41 to 42
#if FMT_USE_FCNTL
# ifdef _WIN32
Copy link
Contributor

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)

Copy link
Contributor Author

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
Comment on lines 41 to 42
#if FMT_USE_FCNTL
# ifdef _WIN32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if FMT_USE_FCNTL
# ifdef _WIN32
#if defined(FMT_USE_FCNTL) && defined(_WIN32)

Copy link
Contributor Author

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;

Copy link
Contributor

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.

@vitaut vitaut merged commit bbf44cc into fmtlib:master Jun 24, 2024
@vitaut
Copy link
Contributor

vitaut commented Jun 24, 2024

Merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants