Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5264)

Unified Diff: base/platform_file_win.cc

Issue 12259025: Linux: apply a different hyphen patch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/platform_file_posix.cc ('k') | content/renderer/hyphenator/hyphenator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/platform_file_win.cc
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index b88fe9c0cdf1f4fec4ee45df3b06f1076fa215a6..8c98183b568948b6b24f1bf2afa67f4b6dfd8ef1 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -4,6 +4,8 @@
#include "base/platform_file.h"
+#include <io.h>
+
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
@@ -109,6 +111,15 @@ PlatformFile CreatePlatformFileUnsafe(const FilePath& name,
return file;
}
+FILE* FdopenPlatformFile(PlatformFile file, const char* mode) {
+ if (file == kInvalidPlatformFileValue)
+ return NULL;
+ int fd = _open_osfhandle(reinterpret_cast<intptr_t>(file), 0);
+ if (fd < 0)
+ return NULL;
+ return _fdopen(fd, mode);
+}
+
bool ClosePlatformFile(PlatformFile file) {
base::ThreadRestrictions::AssertIOAllowed();
return (CloseHandle(file) != 0);
« no previous file with comments | « base/platform_file_posix.cc ('k') | content/renderer/hyphenator/hyphenator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698