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

src: remove unused headers in node_file.cc #50927

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/node_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,10 @@
#include "stream_base-inl.h"
#include "string_bytes.h"

#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <cstring>
#include <cerrno>
#include <climits>

#if defined(__MINGW32__) || defined(_MSC_VER)
# include <io.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

why this is removed? what if the compiler is using MinGW? it will miss something from io.h, or is some library already included from another header file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Headers declared in .cc file are used internally only within the .cc file.
This code was added in the commit below.
bce41fa#diff-70e3325bd2115867617ae2a16321c5de53c070ff2841976fe5b849675a5111e6
At that time, there was code that was used internally to define __MINGW32__ and _MSC_VER, but it is no longer present.

#endif

#include <memory>

namespace node {

namespace fs {
Expand Down