| Index: base/file_util_posix.cc
|
| ===================================================================
|
| --- base/file_util_posix.cc (revision 2711)
|
| +++ base/file_util_posix.cc (working copy)
|
| @@ -9,6 +9,7 @@
|
| #include <fnmatch.h>
|
| #include <fts.h>
|
| #include <libgen.h>
|
| +#include <stdio.h>
|
| #include <string.h>
|
| #include <sys/errno.h>
|
| #include <sys/stat.h>
|
| @@ -309,6 +310,14 @@
|
| return true;
|
| }
|
|
|
| +FILE* OpenFile(const std::string& filename, const char* mode) {
|
| + return fopen(filename.c_str(), mode);
|
| +}
|
| +
|
| +FILE* OpenFile(const std::wstring& filename, const char* mode) {
|
| + return fopen(WideToUTF8(filename).c_str(), mode);
|
| +}
|
| +
|
| int ReadFile(const std::wstring& filename, char* data, int size) {
|
| int fd = open(WideToUTF8(filename).c_str(), O_RDONLY);
|
| if (fd < 0)
|
|
|