diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-25 23:33:34 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-25 23:33:34 +0000 |
commit | ca8e74e0be01f4766da829ccd1381ce0daa48718 (patch) | |
tree | c22edc100d96368c3e17e38133a5f7202be20177 /base/platform_file_win.cc | |
parent | cc687ec560fb4889c42d331784d4a3f805427b55 (diff) | |
download | chromium_src-ca8e74e0be01f4766da829ccd1381ce0daa48718.zip chromium_src-ca8e74e0be01f4766da829ccd1381ce0daa48718.tar.gz chromium_src-ca8e74e0be01f4766da829ccd1381ce0daa48718.tar.bz2 |
Linux: apply a different hyphen patch.
This will make it possible to use system hyphen.
BUG=176285
Review URL: https://codereview.chromium.org/12259025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/platform_file_win.cc')
-rw-r--r-- | base/platform_file_win.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc index b88fe9c..8c98183 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); |