src: define O_SYNC, O_DSYNC and O_DIRECT on Windows#64707
Open
PickBas wants to merge 1 commit into
Open
Conversation
PickBas
force-pushed
the
win-fix-fs-constants
branch
2 times, most recently
from
July 24, 2026 08:20
16f53e6 to
d45f76d
Compare
Signed-off-by: Kirill Saied <sayed.kirill@gmail.com>
PickBas
force-pushed
the
win-fix-fs-constants
branch
from
July 24, 2026 08:28
d45f76d to
3171100
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64707 +/- ##
==========================================
- Coverage 90.24% 90.12% -0.13%
==========================================
Files 739 741 +2
Lines 241676 242251 +575
Branches 45544 45621 +77
==========================================
+ Hits 218102 218329 +227
- Misses 15101 15427 +326
- Partials 8473 8495 +22
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src: define O_SYNC, O_DSYNC and O_DIRECT on Windows
These POSIX open-flag names have no macro in the Windows C runtime, so they were missing from
fs.constantson Windows and got silently dropped when passed tofs.open(). libuv already honors the underlying flags (FILE_FLAG_WRITE_THROUGHfor sync,FILE_FLAG_NO_BUFFERINGfor direct), so this just exposes the constants under their portable names wired to libuv's values.Portable code requesting synchronized or unbuffered I/O now works on Windows instead of losing the flag.