Glog: Workaround mess around windows and non-windows headers
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 22 Mar 2018 16:26:02 +0000 (17:26 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 22 Mar 2018 16:26:02 +0000 (17:26 +0100)
Seems we can not use include directories order trick, since
files are included form inside ".." string, which forces current
directory to be checked first.

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

index 8238ca9610fc7ba341add5591bfb426baa897931..7aac880a9525ee22224e7aba231ae2863b338ca0 100644 (file)
 // 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
index 65278f62803f4782c3c7c7cc286fcc9d6389b670..b030f7f736d78d9f7c8d78c0c50397e6ed4cb06f 100644 (file)
 // 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
index 40a15aa457803be13315cb2411bf8aaeef107528..bd0001527389e9ac7ffb8a796050c0b8f7b72c96 100644 (file)
 // - 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