diff --git a/src/base/commandlineflags.h b/src/base/commandlineflags.h index f77012dc9..66c0dae09 100644 --- a/src/base/commandlineflags.h +++ b/src/base/commandlineflags.h @@ -59,7 +59,7 @@ #else -#include +#include "glog/logging.h" #define DECLARE_VARIABLE(type, shorttype, name, tn) \ namespace fL##shorttype { \ diff --git a/src/cleanup_immediately_unittest.cc b/src/cleanup_immediately_unittest.cc index 686d19386..b98b634e4 100644 --- a/src/cleanup_immediately_unittest.cc +++ b/src/cleanup_immediately_unittest.cc @@ -27,10 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include -#include - #include "base/commandlineflags.h" +#include "glog/logging.h" +#include "glog/raw_logging.h" #include "googletest.h" #ifdef HAVE_LIB_GFLAGS diff --git a/src/cleanup_with_absolute_prefix_unittest.cc b/src/cleanup_with_absolute_prefix_unittest.cc index 95c4baf09..c035a9e98 100644 --- a/src/cleanup_with_absolute_prefix_unittest.cc +++ b/src/cleanup_with_absolute_prefix_unittest.cc @@ -27,10 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include -#include - #include "base/commandlineflags.h" +#include "glog/logging.h" +#include "glog/raw_logging.h" #include "googletest.h" #ifdef HAVE_LIB_GFLAGS diff --git a/src/cleanup_with_relative_prefix_unittest.cc b/src/cleanup_with_relative_prefix_unittest.cc index 0cee085e5..194c8e685 100644 --- a/src/cleanup_with_relative_prefix_unittest.cc +++ b/src/cleanup_with_relative_prefix_unittest.cc @@ -27,10 +27,9 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include -#include - #include "base/commandlineflags.h" +#include "glog/logging.h" +#include "glog/raw_logging.h" #include "googletest.h" #ifdef HAVE_LIB_GFLAGS diff --git a/src/demangle.h b/src/demangle.h index f347b9814..416f7ee15 100644 --- a/src/demangle.h +++ b/src/demangle.h @@ -71,7 +71,7 @@ #define BASE_DEMANGLE_H_ #include "config.h" -#include +#include "glog/logging.h" _START_GOOGLE_NAMESPACE_ diff --git a/src/demangle_unittest.cc b/src/demangle_unittest.cc index ab3653d4d..21a407caf 100644 --- a/src/demangle_unittest.cc +++ b/src/demangle_unittest.cc @@ -31,15 +31,16 @@ // // Unit tests for functions in demangle.c. -#include "utilities.h" +#include "demangle.h" -#include #include +#include #include -#include -#include "demangle.h" -#include "googletest.h" + #include "config.h" +#include "glog/logging.h" +#include "googletest.h" +#include "utilities.h" #ifdef HAVE_LIB_GFLAGS #include diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index de15eaa27..636929d1b 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -60,10 +60,10 @@ #define GLOG_MSVC_POP_WARNING() #endif -#include +#include "glog/platform.h" #if @ac_cv_have_glog_export@ -#include +#include "glog/export.h" #endif // We care a lot about number of bits things take up. Unfortunately, @@ -599,12 +599,13 @@ DECLARE_string(logmailer); @ac_google_start_namespace@ // They need the definitions of integer types. -#include -#include +#include "glog/log_severity.h" +#include "glog/vlog_is_on.h" -// Initialize google's logging library. You will see the program name -// specified by argv0 in log outputs. -GLOG_EXPORT void InitGoogleLogging(const char* argv0); + // Initialize google's logging library. You will see the program name + // specified by argv0 in log outputs. + GLOG_EXPORT void + InitGoogleLogging(const char* argv0); GLOG_EXPORT void InitGoogleLogging(const char* argv0, CustomPrefixCallback prefix_callback, diff --git a/src/glog/raw_logging.h.in b/src/glog/raw_logging.h.in index 66fec91e5..0bf52b488 100644 --- a/src/glog/raw_logging.h.in +++ b/src/glog/raw_logging.h.in @@ -39,10 +39,9 @@ #include @ac_google_start_namespace@ - -#include -#include -#include +#include "glog/log_severity.h" +#include "glog/logging.h" +#include "glog/vlog_is_on.h" #if defined(__GNUC__) #pragma GCC diagnostic push diff --git a/src/glog/vlog_is_on.h.in b/src/glog/vlog_is_on.h.in index eacc6de6d..be76dffd7 100644 --- a/src/glog/vlog_is_on.h.in +++ b/src/glog/vlog_is_on.h.in @@ -61,10 +61,10 @@ #ifndef BASE_VLOG_IS_ON_H_ #define BASE_VLOG_IS_ON_H_ -#include - #include +#include "glog/log_severity.h" + #if defined(__GNUC__) // We emit an anonymous static int* variable at every VLOG_IS_ON(n) site. // (Normally) the first time every VLOG_IS_ON(n) site is hit, diff --git a/src/logging.cc b/src/logging.cc index fa8868561..39f0c5400 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -68,10 +68,10 @@ #else #include // for automatic removal of old logs #endif -#include "base/commandlineflags.h" // to get the program name -#include -#include +#include "base/commandlineflags.h" // to get the program name #include "base/googleinit.h" +#include "glog/logging.h" +#include "glog/raw_logging.h" #ifdef HAVE_STACKTRACE # include "stacktrace.h" diff --git a/src/logging_striptest_main.cc b/src/logging_striptest_main.cc index 27e12544e..7158ab285 100644 --- a/src/logging_striptest_main.cc +++ b/src/logging_striptest_main.cc @@ -32,11 +32,12 @@ // The common part of the striplog tests. #include -#include #include -#include +#include + #include "base/commandlineflags.h" #include "config.h" +#include "glog/logging.h" DECLARE_bool(logtostderr); GLOG_DEFINE_bool(check_mode, false, "Prints 'opt' or 'dbg'"); diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc index c6aea7b08..ddd434f12 100644 --- a/src/logging_unittest.cc +++ b/src/logging_unittest.cc @@ -49,7 +49,6 @@ #include #include #include -#include #include #include #include @@ -57,8 +56,8 @@ #include #include "base/commandlineflags.h" -#include -#include +#include "glog/logging.h" +#include "glog/raw_logging.h" #include "googletest.h" DECLARE_string(log_backtrace_at); // logging.cc diff --git a/src/mock-log.h b/src/mock-log.h index 62999b249..a6c11474a 100644 --- a/src/mock-log.h +++ b/src/mock-log.h @@ -36,13 +36,12 @@ #define GLOG_SRC_MOCK_LOG_H_ // For GOOGLE_NAMESPACE. This must go first so we get _XOPEN_SOURCE. -#include "utilities.h" +#include #include -#include - -#include +#include "glog/logging.h" +#include "utilities.h" _START_GOOGLE_NAMESPACE_ namespace glog_testing { diff --git a/src/package_config_unittest/working_config/glog_package_config.cc b/src/package_config_unittest/working_config/glog_package_config.cc index b7b5cf6c6..cfbbe7792 100644 --- a/src/package_config_unittest/working_config/glog_package_config.cc +++ b/src/package_config_unittest/working_config/glog_package_config.cc @@ -1,4 +1,4 @@ -#include +#include "glog/logging.h" int main(int /*argc*/, char** argv) { diff --git a/src/raw_logging.cc b/src/raw_logging.cc index 540ec6605..8debc1800 100644 --- a/src/raw_logging.cc +++ b/src/raw_logging.cc @@ -39,12 +39,14 @@ #ifdef HAVE_UNISTD_H # include // for close() and write() #endif -#include // for open() +#include // for open() + #include -#include "config.h" -#include // To pick up flag settings etc. -#include + #include "base/commandlineflags.h" +#include "config.h" +#include "glog/logging.h" // To pick up flag settings etc. +#include "glog/raw_logging.h" #ifdef HAVE_STACKTRACE # include "stacktrace.h" diff --git a/src/signalhandler.cc b/src/signalhandler.cc index 657e15c08..f53e68719 100644 --- a/src/signalhandler.cc +++ b/src/signalhandler.cc @@ -31,13 +31,13 @@ // // Implementation of InstallFailureSignalHandler(). -#include "utilities.h" -#include "stacktrace.h" -#include "symbolize.h" -#include - #include #include + +#include "glog/logging.h" +#include "stacktrace.h" +#include "symbolize.h" +#include "utilities.h" #ifdef HAVE_UCONTEXT_H # include #endif diff --git a/src/signalhandler_unittest.cc b/src/signalhandler_unittest.cc index c88598b4e..a110ac54d 100644 --- a/src/signalhandler_unittest.cc +++ b/src/signalhandler_unittest.cc @@ -41,7 +41,8 @@ #include #include #include -#include + +#include "glog/logging.h" #ifdef HAVE_LIB_GFLAGS #include diff --git a/src/stacktrace.h b/src/stacktrace.h index bf23e193c..3180d30fb 100644 --- a/src/stacktrace.h +++ b/src/stacktrace.h @@ -34,7 +34,7 @@ #define BASE_STACKTRACE_H_ #include "config.h" -#include +#include "glog/logging.h" _START_GOOGLE_NAMESPACE_ diff --git a/src/stacktrace_libunwind-inl.h b/src/stacktrace_libunwind-inl.h index 0b20d2386..e59c492a5 100644 --- a/src/stacktrace_libunwind-inl.h +++ b/src/stacktrace_libunwind-inl.h @@ -37,7 +37,7 @@ extern "C" { #define UNW_LOCAL_ONLY #include } -#include +#include "glog/raw_logging.h" #include "stacktrace.h" _START_GOOGLE_NAMESPACE_ diff --git a/src/stacktrace_unittest.cc b/src/stacktrace_unittest.cc index 6d3c21aee..b92961ce3 100644 --- a/src/stacktrace_unittest.cc +++ b/src/stacktrace_unittest.cc @@ -27,14 +27,15 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include "utilities.h" +#include "stacktrace.h" #include #include -#include "config.h" + #include "base/commandlineflags.h" -#include -#include "stacktrace.h" +#include "config.h" +#include "glog/logging.h" +#include "utilities.h" #ifdef HAVE_EXECINFO_BACKTRACE_SYMBOLS # include diff --git a/src/stl_logging_unittest.cc b/src/stl_logging_unittest.cc index 34daf8dd3..44aba54cc 100644 --- a/src/stl_logging_unittest.cc +++ b/src/stl_logging_unittest.cc @@ -27,8 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include -#include +#include "glog/stl_logging.h" #include #include @@ -38,6 +37,7 @@ #include #include "config.h" +#include "glog/logging.h" #include "googletest.h" using namespace std; diff --git a/src/symbolize.cc b/src/symbolize.cc index 82322914e..8e8436158 100644 --- a/src/symbolize.cc +++ b/src/symbolize.cc @@ -119,7 +119,6 @@ _END_GOOGLE_NAMESPACE_ #include #endif #include -#include #include #include #include @@ -133,6 +132,7 @@ _END_GOOGLE_NAMESPACE_ #include #include "config.h" +#include "glog/raw_logging.h" #include "symbolize.h" // Re-runs fn until it doesn't cause EINTR. diff --git a/src/symbolize.h b/src/symbolize.h index 86c22e3ea..89a6a4f25 100644 --- a/src/symbolize.h +++ b/src/symbolize.h @@ -54,9 +54,9 @@ #ifndef BASE_SYMBOLIZE_H_ #define BASE_SYMBOLIZE_H_ -#include "utilities.h" #include "config.h" -#include +#include "glog/logging.h" +#include "utilities.h" #ifdef HAVE_SYMBOLIZE diff --git a/src/symbolize_unittest.cc b/src/symbolize_unittest.cc index 2b4d8c29e..08d32a122 100644 --- a/src/symbolize_unittest.cc +++ b/src/symbolize_unittest.cc @@ -33,12 +33,11 @@ #include "symbolize.h" -#include - #include #include #include "config.h" +#include "glog/logging.h" #include "googletest.h" #include "utilities.h" diff --git a/src/utilities.h b/src/utilities.h index 5d8f1c591..ae34d8d4c 100644 --- a/src/utilities.h +++ b/src/utilities.h @@ -52,11 +52,10 @@ #define PRIXS __PRIS_PREFIX "X" #define PRIoS __PRIS_PREFIX "o" -#include "base/mutex.h" // This must go first so we get _XOPEN_SOURCE - #include -#include +#include "base/mutex.h" // This must go first so we get _XOPEN_SOURCE +#include "glog/logging.h" #if defined(GLOG_OS_WINDOWS) # include "port.h" diff --git a/src/utilities_unittest.cc b/src/utilities_unittest.cc index 93b1acdea..c24df00cf 100644 --- a/src/utilities_unittest.cc +++ b/src/utilities_unittest.cc @@ -29,8 +29,9 @@ // // Author: Shinichiro Hamaji #include "utilities.h" + +#include "glog/logging.h" #include "googletest.h" -#include #ifdef HAVE_LIB_GFLAGS #include diff --git a/src/vlog_is_on.cc b/src/vlog_is_on.cc index ac60d0293..f78fd0777 100644 --- a/src/vlog_is_on.cc +++ b/src/vlog_is_on.cc @@ -32,17 +32,17 @@ // Broken out from logging.cc by Soren Lassen // logging_unittest.cc covers the functionality herein -#include "utilities.h" - -#include -#include #include #include +#include +#include #include + #include "base/commandlineflags.h" -#include -#include #include "base/googleinit.h" +#include "glog/logging.h" +#include "glog/raw_logging.h" +#include "utilities.h" // glog doesn't have annotation #define ANNOTATE_BENIGN_RACE(address, description) diff --git a/src/windows/port.h b/src/windows/port.h index 9611e1039..eecc46fed 100755 --- a/src/windows/port.h +++ b/src/windows/port.h @@ -62,7 +62,7 @@ * used by both C and C++ code, so we put all the C++ together. */ -#include +#include "glog/logging.h" #ifdef _MSC_VER