Skip to content
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

pal_windows.h: missing <cerrno> for ENOMEM on MinGW #733

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

jcelerier
Copy link
Contributor

No description provided.

@mjp41 mjp41 requested a review from SchrodingerZhu January 20, 2025 13:02
@mjp41
Copy link
Member

mjp41 commented Jan 20, 2025

@SchrodingerZhu, is this an area where we are missing stuff for freestanding?

@SchrodingerZhu
Copy link
Collaborator

We don't really support MinGW in freestanding so the change is fine to me.

However, it is a bit inconsistent that we include cxx header for mingw targets.

@jcelerier
Copy link
Contributor Author

jcelerier commented Jan 20, 2025

However, it is a bit inconsistent that we include cxx header for mingw targets.

hmm why ? it's C++ code, the valid header to include is the <c....> cxx version, not the C .h version and both GCC and Clang as shipped by mingw become more strict with this over time

@mjp41
Copy link
Member

mjp41 commented Jan 20, 2025

However, it is a bit inconsistent that we include cxx header for mingw targets.

hmm why ? it's C++ code, the valid header to include is the <c....> cxx version, not the C .h version and both GCC and Clang as shipped by mingw become more strict with this over time

Just for some context. @SchrodingerZhu has been working on getting snmalloc as a built-in option in the LLVM libc. To do that, they have removed a bunch of dependencies on the C++ header files. This is mostly a refactoring. My comment was mostly "@SchrodingerZhu I think you missed a bit." rather than a comment about your change.

Copy link
Member

@mjp41 mjp41 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 doing this.

src/snmalloc/pal/pal_windows.h Outdated Show resolved Hide resolved
@jcelerier
Copy link
Contributor Author

However, it is a bit inconsistent that we include cxx header for mingw targets.

hmm why ? it's C++ code, the valid header to include is the <c....> cxx version, not the C .h version and both GCC and Clang as shipped by mingw become more strict with this over time

Just for some context. @SchrodingerZhu has been working on getting snmalloc as a built-in option in the LLVM libc. To do that, they have removed a bunch of dependencies on the C++ header files. This is mostly a refactoring. My comment was mostly "@SchrodingerZhu I think you missed a bit." rather than a comment about your change.

ahh thanks for the context, makes more sense!

Co-authored-by: Matthew Parkinson <mjp41@users.noreply.github.com>
Copy link
Collaborator

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

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

LGTM

@mjp41 mjp41 merged commit aa07749 into microsoft:main Jan 21, 2025
62 checks passed
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