update google on windows
This commit is contained in:
@@ -568,8 +568,10 @@ class LogSink; // defined below
|
||||
LOG_TO_STRING_##severity(static_cast<std::vector<std::string>*>(outvec)).stream()
|
||||
|
||||
#define LOG_IF(severity, condition) \
|
||||
static_cast<void>(0), \
|
||||
!(condition) ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
|
||||
#define SYSLOG_IF(severity, condition) \
|
||||
static_cast<void>(0), \
|
||||
!(condition) ? (void) 0 : google::LogMessageVoidify() & SYSLOG(severity)
|
||||
|
||||
#define LOG_ASSERT(condition) \
|
||||
@@ -859,6 +861,7 @@ DECLARE_CHECK_STROP_IMPL(strcasecmp, false)
|
||||
&google::LogMessage::SendToLog)
|
||||
|
||||
#define PLOG_IF(severity, condition) \
|
||||
static_cast<void>(0), \
|
||||
!(condition) ? (void) 0 : google::LogMessageVoidify() & PLOG(severity)
|
||||
|
||||
// A CHECK() macro that postpends errno if the condition is false. E.g.
|
||||
@@ -931,16 +934,11 @@ struct CompileAssert {
|
||||
struct CrashReason;
|
||||
|
||||
// Returns true if FailureSignalHandler is installed.
|
||||
bool IsFailureSignalHandlerInstalled();
|
||||
// Needs to be exported since it's used by the signalhandler_unittest.
|
||||
GOOGLE_GLOG_DLL_DECL bool IsFailureSignalHandlerInstalled();
|
||||
} // namespace glog_internal_namespace_
|
||||
|
||||
#define GOOGLE_GLOG_COMPILE_ASSERT(expr, msg) \
|
||||
typedef google::glog_internal_namespace_::CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
|
||||
|
||||
#define LOG_EVERY_N(severity, n) \
|
||||
GOOGLE_GLOG_COMPILE_ASSERT(google::GLOG_ ## severity < \
|
||||
google::NUM_SEVERITIES, \
|
||||
INVALID_REQUESTED_LOG_SEVERITY); \
|
||||
SOME_KIND_OF_LOG_EVERY_N(severity, (n), google::LogMessage::SendToLog)
|
||||
|
||||
#define SYSLOG_EVERY_N(severity, n) \
|
||||
@@ -1008,23 +1006,29 @@ const LogSeverity GLOG_0 = GLOG_ERROR;
|
||||
|
||||
#else // !DCHECK_IS_ON()
|
||||
|
||||
#define DLOG(severity) \
|
||||
#define DLOG(severity) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DVLOG(verboselevel) \
|
||||
(true || !VLOG_IS_ON(verboselevel)) ?\
|
||||
(void) 0 : google::LogMessageVoidify() & LOG(INFO)
|
||||
#define DVLOG(verboselevel) \
|
||||
static_cast<void>(0), \
|
||||
(true || !VLOG_IS_ON(verboselevel)) ? \
|
||||
(void) 0 : google::LogMessageVoidify() & LOG(INFO)
|
||||
|
||||
#define DLOG_IF(severity, condition) \
|
||||
static_cast<void>(0), \
|
||||
(true || !(condition)) ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_EVERY_N(severity, n) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : google::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_IF_EVERY_N(severity, condition, n) \
|
||||
static_cast<void>(0), \
|
||||
(true || !(condition))? (void) 0 : google::LogMessageVoidify() & LOG(severity)
|
||||
|
||||
#define DLOG_ASSERT(condition) \
|
||||
static_cast<void>(0), \
|
||||
true ? (void) 0 : LOG_ASSERT(condition)
|
||||
|
||||
// MSVC warning C4127: conditional expression is constant
|
||||
@@ -1109,10 +1113,11 @@ namespace base_logging {
|
||||
// buffer to allow for a '\n' and '\0'.
|
||||
class GOOGLE_GLOG_DLL_DECL LogStreamBuf : public std::streambuf {
|
||||
public:
|
||||
// REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\n'.
|
||||
// REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'.
|
||||
LogStreamBuf(char *buf, int len) {
|
||||
setp(buf, buf + len - 2);
|
||||
}
|
||||
|
||||
// This effectively ignores overflow.
|
||||
virtual int_type overflow(int_type ch) {
|
||||
return ch;
|
||||
@@ -1151,13 +1156,9 @@ public:
|
||||
// 2005 if you are deriving from a type in the Standard C++ Library"
|
||||
// http://msdn.microsoft.com/en-us/library/3tdb471s(VS.80).aspx
|
||||
// Let's just ignore the warning.
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable: 4275)
|
||||
#endif
|
||||
GLOG_MSVC_PUSH_DISABLE_WARNING(4275)
|
||||
class GOOGLE_GLOG_DLL_DECL LogStream : public std::ostream {
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(default: 4275)
|
||||
#endif
|
||||
GLOG_MSVC_POP_WARNING()
|
||||
public:
|
||||
LogStream(char *buf, int len, int ctr)
|
||||
: std::ostream(NULL),
|
||||
|
||||
Reference in New Issue
Block a user