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

Side by Side Diff: base/logging.cc

Issue 1422623002: Build fixes for fnl/musl (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update README.chromium in //third_party Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « base/files/file_util_posix.cc ('k') | base/trace_event/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 typedef HANDLE FileHandle; 10 typedef HANDLE FileHandle;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 530
531 LogMessage::LogMessage(const char* file, int line, LogSeverity severity, 531 LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
532 std::string* result) 532 std::string* result)
533 : severity_(severity), file_(file), line_(line) { 533 : severity_(severity), file_(file), line_(line) {
534 Init(file, line); 534 Init(file, line);
535 stream_ << "Check failed: " << *result; 535 stream_ << "Check failed: " << *result;
536 delete result; 536 delete result;
537 } 537 }
538 538
539 LogMessage::~LogMessage() { 539 LogMessage::~LogMessage() {
540 #if !defined(NDEBUG) && !defined(OS_NACL) && !defined(__UCLIBC__) 540 #if !defined(NDEBUG) && !defined(OS_NACL) && !defined(__UCLIBC__) && !defined(FN L_MUSL)
541 if (severity_ == LOG_FATAL) { 541 if (severity_ == LOG_FATAL) {
542 // Include a stack trace on a fatal. 542 // Include a stack trace on a fatal.
543 base::debug::StackTrace trace; 543 base::debug::StackTrace trace;
544 stream_ << std::endl; // Newline to separate from log message. 544 stream_ << std::endl; // Newline to separate from log message.
545 trace.OutputToStream(&stream_); 545 trace.OutputToStream(&stream_);
546 } 546 }
547 #endif 547 #endif
548 stream_ << std::endl; 548 stream_ << std::endl;
549 std::string str_newline(stream_.str()); 549 std::string str_newline(stream_.str());
550 550
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 BASE_EXPORT void LogErrorNotReached(const char* file, int line) { 806 BASE_EXPORT void LogErrorNotReached(const char* file, int line) {
807 LogMessage(file, line, LOG_ERROR).stream() 807 LogMessage(file, line, LOG_ERROR).stream()
808 << "NOTREACHED() hit."; 808 << "NOTREACHED() hit.";
809 } 809 }
810 810
811 } // namespace logging 811 } // namespace logging
812 812
813 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) { 813 std::ostream& std::operator<<(std::ostream& out, const wchar_t* wstr) {
814 return out << base::WideToUTF8(wstr); 814 return out << base::WideToUTF8(wstr);
815 } 815 }
OLDNEW
« no previous file with comments | « base/files/file_util_posix.cc ('k') | base/trace_event/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698