[Bf-blender-cvs] [c9e7e1987bc] master: Glog: Workaround mess around windows and non-windows headers

Sergey Sharybin noreply at git.blender.org
Thu Mar 22 17:27:02 CET 2018


Commit: c9e7e1987bc044b5b438ab2f50c4654b7afeca4c
Author: Sergey Sharybin
Date:   Thu Mar 22 17:26:02 2018 +0100
Branches: master
https://developer.blender.org/rBc9e7e1987bc044b5b438ab2f50c4654b7afeca4c

Glog: Workaround mess around windows and non-windows headers

Seems we can not use include directories order trick, since
files are included form inside ".." string, which forces current
directory to be checked first.

===================================================================

M	extern/glog/src/glog/logging.h
M	extern/glog/src/glog/raw_logging.h
M	extern/glog/src/glog/stl_logging.h

===================================================================

diff --git a/extern/glog/src/glog/logging.h b/extern/glog/src/glog/logging.h
index 8238ca9610f..7aac880a952 100644
--- a/extern/glog/src/glog/logging.h
+++ b/extern/glog/src/glog/logging.h
@@ -33,6 +33,11 @@
 // Pretty much everybody needs to #include this file so that they can
 // log various happenings.
 //
+
+#ifdef WIN32
+#  include "windows/glog/logging.h"
+#else  // WIN32
+
 #ifndef _LOGGING_H_
 #define _LOGGING_H_
 
@@ -1623,3 +1628,5 @@ GOOGLE_GLOG_DLL_DECL void InstallFailureWriter(
 }
 
 #endif // _LOGGING_H_
+
+#endif  // WIN32
diff --git a/extern/glog/src/glog/raw_logging.h b/extern/glog/src/glog/raw_logging.h
index 65278f62803..b030f7f736d 100644
--- a/extern/glog/src/glog/raw_logging.h
+++ b/extern/glog/src/glog/raw_logging.h
@@ -33,6 +33,10 @@
 // acquire any locks, and can therefore be used by low-level memory
 // allocation and synchronization code.
 
+#ifdef WIN32
+#  include "windows/glog/raw_logging.h"
+#else  // WIN32
+
 #ifndef BASE_RAW_LOGGING_H_
 #define BASE_RAW_LOGGING_H_
 
@@ -183,3 +187,5 @@ GOOGLE_GLOG_DLL_DECL void RawLog__SetLastTime(const struct tm& t, int usecs);
 }
 
 #endif  // BASE_RAW_LOGGING_H_
+
+#endif  // WIN32
diff --git a/extern/glog/src/glog/stl_logging.h b/extern/glog/src/glog/stl_logging.h
index 40a15aa4578..bd000152738 100644
--- a/extern/glog/src/glog/stl_logging.h
+++ b/extern/glog/src/glog/stl_logging.h
@@ -44,6 +44,10 @@
 // - GLOG_STL_LOGGING_FOR_EXT_SLIST     - <ext/slist>
 //
 
+#ifdef WIN32
+#  include "windows/glog/stl_logging.h"
+#else  // WIN32
+
 #ifndef UTIL_GTL_STL_LOGGING_INL_H_
 #define UTIL_GTL_STL_LOGGING_INL_H_
 
@@ -218,3 +222,5 @@ inline void PrintSequence(std::ostream& out, Iter begin, Iter end) {
 namespace std { using ::operator<<; }
 
 #endif  // UTIL_GTL_STL_LOGGING_INL_H_
+
+#endif  // WIN32



More information about the Bf-blender-cvs mailing list