OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/logging.h" | 5 #include "base/logging.h" |
6 | 6 |
| 7 #include <limits.h> |
| 8 |
7 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
8 #include <io.h> | 10 #include <io.h> |
9 #include <windows.h> | 11 #include <windows.h> |
10 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
11 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
12 typedef HANDLE FileHandle; | 14 typedef HANDLE FileHandle; |
13 typedef HANDLE MutexHandle; | 15 typedef HANDLE MutexHandle; |
14 // Windows warns on using write(). It prefers _write(). | 16 // Windows warns on using write(). It prefers _write(). |
15 #define write(fd, buf, count) _write(fd, buf, static_cast<unsigned int>(count)) | 17 #define write(fd, buf, count) _write(fd, buf, static_cast<unsigned int>(count)) |
16 // Windows doesn't define STDERR_FILENO. Define it here. | 18 // Windows doesn't define STDERR_FILENO. Define it here. |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { | 907 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { |
906 LogMessage(file, line, LOG_ERROR).stream() | 908 LogMessage(file, line, LOG_ERROR).stream() |
907 << "NOTREACHED() hit."; | 909 << "NOTREACHED() hit."; |
908 } | 910 } |
909 | 911 |
910 } // namespace logging | 912 } // namespace logging |
911 | 913 |
912 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { | 914 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { |
913 return out << base::WideToUTF8(wstr); | 915 return out << base::WideToUTF8(wstr); |
914 } | 916 } |
OLD | NEW |