|
[dart:io][windows] Use WriteFile instead of _write
This CL changes File::Write on Windows to call directly to WriteFile()
instead of using _write(). This avoids a number of complexities:
1. Don't need to bother with text vs. binary mode.
2. Don't need to check both errno and GetLastError if _write() fails.
3. Don't need to convert to a wchar_t* for console output since we've
already set the code page to UTF8.
fixes #29101
R=fschneider@google.com
Committed: https://github.com/dart-lang/sdk/commit/141b6351baacaedf23e740b5b7354970f2ac0979
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+36 lines, -193 lines) |
Patch |
|
M |
runtime/bin/file.h
|
View
|
|
2 chunks |
+0 lines, -11 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file.cc
|
View
|
|
1 chunk |
+0 lines, -16 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_android.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_fuchsia.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_linux.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_macos.cc
|
View
|
|
1 chunk |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_patch.dart
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/bin/file_unsupported.cc
|
View
|
|
1 chunk |
+0 lines, -6 lines |
0 comments
|
Download
|
|
M |
runtime/bin/file_win.cc
|
View
|
1
2
|
5 chunks |
+30 lines, -78 lines |
0 comments
|
Download
|
|
M |
runtime/bin/io_natives.cc
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
runtime/bin/process_patch.dart
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
sdk/lib/io/file_impl.dart
|
View
|
|
3 chunks |
+0 lines, -28 lines |
0 comments
|
Download
|
|
M |
sdk/lib/io/stdio.dart
|
View
|
1
2
3
|
3 chunks |
+4 lines, -30 lines |
0 comments
|
Download
|
Total messages: 8 (3 generated)
|