diff options
| author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2021-06-04 00:00:00 +0000 |
|---|---|---|
| committer | Mike Gilbert <floppym@gentoo.org> | 2021-06-04 15:48:06 -0400 |
| commit | 6d87191d729e19343fdf66df33b2786a9f0cb68a (patch) | |
| tree | 2aa5248790e91d8926e47a2fa00ec297e8fb5d1e /dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch | |
| parent | 43d663de10b438732b69882326a7088f5e07cad9 (diff) | |
| download | gentoo-6d87191d729e19343fdf66df33b2786a9f0cb68a.tar.gz gentoo-6d87191d729e19343fdf66df33b2786a9f0cb68a.tar.bz2 gentoo-6d87191d729e19343fdf66df33b2786a9f0cb68a.zip | |
dev-cpp/glog: Version bump (0.5.0).
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch')
| -rw-r--r-- | dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch b/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch new file mode 100644 index 000000000000..a19ebdcf0fac --- /dev/null +++ b/dev-cpp/glog/files/glog-0.5.0-IsGoogleLoggingInitialized_public.patch @@ -0,0 +1,106 @@ +https://github.com/google/glog/issues/125 +https://github.com/google/glog/pull/651 +https://github.com/google/glog/commit/81e0d616edeb73cbd06d6c40bc4f90593ac0c5d1 + +--- /src/glog/logging.h.in ++++ /src/glog/logging.h.in +@@ -594,6 +594,9 @@ + void* prefix_callback_data = NULL); + #endif + ++// Check if google's logging library has been initialized. ++GOOGLE_GLOG_DLL_DECL bool IsGoogleLoggingInitialized(); ++ + // Shutdown google's logging library. + GOOGLE_GLOG_DLL_DECL void ShutdownGoogleLogging(); + +--- /src/logging_custom_prefix_unittest.cc ++++ /src/logging_custom_prefix_unittest.cc +@@ -221,11 +221,15 @@ + LogWithLevels(0, 0, 0, 0); // simulate "before global c-tors" + const string early_stderr = GetCapturedTestStderr(); + ++ EXPECT_FALSE(IsGoogleLoggingInitialized()); ++ + // Setting a custom prefix generator (it will use the default format so that + // the golden outputs can be reused): + string prefix_attacher_data = "good data"; + InitGoogleLogging(argv[0], &PrefixAttacher, static_cast<void*>(&prefix_attacher_data)); + ++ EXPECT_TRUE(IsGoogleLoggingInitialized()); ++ + RunSpecifiedBenchmarks(); + + FLAGS_logtostderr = true; +@@ -992,8 +996,10 @@ + base::SetLogger(GLOG_INFO, + new RecordDeletionLogger(&custom_logger_deleted, + base::GetLogger(GLOG_INFO))); ++ EXPECT_TRUE(IsGoogleLoggingInitialized()); + ShutdownGoogleLogging(); + EXPECT_TRUE(custom_logger_deleted); ++ EXPECT_FALSE(IsGoogleLoggingInitialized()); + } + + _START_GOOGLE_NAMESPACE_ +--- /src/logging_unittest.cc ++++ /src/logging_unittest.cc +@@ -197,8 +197,12 @@ + LogWithLevels(0, 0, 0, 0); // simulate "before global c-tors" + const string early_stderr = GetCapturedTestStderr(); + ++ EXPECT_FALSE(IsGoogleLoggingInitialized()); ++ + InitGoogleLogging(argv[0]); + ++ EXPECT_TRUE(IsGoogleLoggingInitialized()); ++ + RunSpecifiedBenchmarks(); + + FLAGS_logtostderr = true; +@@ -965,8 +969,10 @@ + base::SetLogger(GLOG_INFO, + new RecordDeletionLogger(&custom_logger_deleted, + base::GetLogger(GLOG_INFO))); ++ EXPECT_TRUE(IsGoogleLoggingInitialized()); + ShutdownGoogleLogging(); + EXPECT_TRUE(custom_logger_deleted); ++ EXPECT_FALSE(IsGoogleLoggingInitialized()); + } + + _START_GOOGLE_NAMESPACE_ +--- /src/utilities.cc ++++ /src/utilities.cc +@@ -62,6 +62,10 @@ + + static const char* g_program_invocation_short_name = NULL; + ++bool IsGoogleLoggingInitialized() { ++ return g_program_invocation_short_name != NULL; ++} ++ + _END_GOOGLE_NAMESPACE_ + + // The following APIs are all internal. +@@ -176,10 +180,6 @@ + } + } + +-bool IsGoogleLoggingInitialized() { +- return g_program_invocation_short_name != NULL; +-} +- + #ifdef OS_WINDOWS + struct timeval { + long tv_sec, tv_usec; +--- /src/utilities.h ++++ /src/utilities.h +@@ -163,8 +163,6 @@ + + const char* ProgramInvocationShortName(); + +-bool IsGoogleLoggingInitialized(); +- + int64 CycleClock_Now(); + + int64 UsecToCycles(int64 usec); |
