diff --git a/CMakeLists.txt b/CMakeLists.txt index 83ee3fe..2550fcb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,8 +97,6 @@ check_include_file_cxx (inttypes.h HAVE_INTTYPES_H) check_include_file_cxx (memory.h HAVE_MEMORY_H) check_include_file_cxx (pwd.h HAVE_PWD_H) check_include_file_cxx (stdint.h HAVE_STDINT_H) -check_include_file_cxx (stdlib.h HAVE_STDLIB_H) -check_include_file_cxx (string.h HAVE_STRING_H) check_include_file_cxx (strings.h HAVE_STRINGS_H) check_include_file_cxx (sys/stat.h HAVE_SYS_STAT_H) check_include_file_cxx (sys/syscall.h HAVE_SYS_SYSCALL_H) @@ -142,24 +140,24 @@ check_cxx_compiler_flag (-Wunnamed-type-template-args # NOTE: Cannot use check_function_exists here since >=vc-14.0 can define # snprintf as an inline function -check_symbol_exists (snprintf stdio.h HAVE_SNPRINTF) +check_symbol_exists (snprintf cstdio HAVE_SNPRINTF) check_library_exists (dbghelp UnDecorateSymbolName "" HAVE_DBGHELP) check_cxx_source_compiles (" -#include +#include static void foo(void) __attribute__ ((unused)); int main(void) { return 0; } " HAVE___ATTRIBUTE__) check_cxx_source_compiles (" -#include +#include static void foo(void) __attribute__ ((visibility(\"default\"))); int main(void) { return 0; } " HAVE___ATTRIBUTE__VISIBILITY_DEFAULT) check_cxx_source_compiles (" -#include +#include static void foo(void) __attribute__ ((visibility(\"hidden\"))); int main(void) { return 0; } " HAVE___ATTRIBUTE__VISIBILITY_HIDDEN) diff --git a/src/base/commandlineflags.h b/src/base/commandlineflags.h index c8d5089..c13235f 100644 --- a/src/base/commandlineflags.h +++ b/src/base/commandlineflags.h @@ -1,10 +1,10 @@ // Copyright (c) 2008, Google Inc. // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -49,9 +49,9 @@ #define BASE_COMMANDLINEFLAGS_H__ #include "config.h" +#include // for getenv +#include // for memchr #include -#include // for memchr -#include // for getenv #ifdef HAVE_LIB_GFLAGS diff --git a/src/base/mutex.h b/src/base/mutex.h index 2909242..e82c597 100644 --- a/src/base/mutex.h +++ b/src/base/mutex.h @@ -149,8 +149,8 @@ // We need to include these header files after defining _XOPEN_SOURCE // as they may define the _XOPEN_SOURCE macro. -#include -#include // for abort() +#include +#include // for abort() #define MUTEX_NAMESPACE glog_internal_namespace_ diff --git a/src/config.h.cmake.in b/src/config.h.cmake.in index d309993..c4f0136 100644 --- a/src/config.h.cmake.in +++ b/src/config.h.cmake.in @@ -79,15 +79,9 @@ /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STDLIB_H - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_STRINGS_H -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_SYSCALL_H diff --git a/src/demangle.cc b/src/demangle.cc index 9369f9a..f3e6ad7 100644 --- a/src/demangle.cc +++ b/src/demangle.cc @@ -34,7 +34,7 @@ // // Note that we only have partial C++0x support yet. -#include // for NULL +#include // for NULL #include "utilities.h" #include "demangle.h" diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in index 5a7fc4b..9958507 100644 --- a/src/glog/logging.h.in +++ b/src/glog/logging.h.in @@ -36,9 +36,9 @@ #ifndef _LOGGING_H_ #define _LOGGING_H_ -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/glog/raw_logging.h.in b/src/glog/raw_logging.h.in index 31b7ed3..a0ba100 100644 --- a/src/glog/raw_logging.h.in +++ b/src/glog/raw_logging.h.in @@ -36,7 +36,7 @@ #ifndef BASE_RAW_LOGGING_H_ #define BASE_RAW_LOGGING_H_ -#include +#include @ac_google_start_namespace@ diff --git a/src/glog/vlog_is_on.h.in b/src/glog/vlog_is_on.h.in index 4a5bbdf..bcc8122 100644 --- a/src/glog/vlog_is_on.h.in +++ b/src/glog/vlog_is_on.h.in @@ -41,7 +41,7 @@ // // that can't be accomplished e.g. via just VLOG(2) << ...; // } // -// The truth value that VLOG_IS_ON(level) returns is determined by +// The truth value that VLOG_IS_ON(level) returns is determined by // the three verbosity level flags: // --v= Gives the default maximal active V-logging level; // 0 is the default. diff --git a/src/logging.cc b/src/logging.cc index 7bfc4dd..cbdbff1 100644 --- a/src/logging.cc +++ b/src/logging.cc @@ -32,7 +32,7 @@ #include "utilities.h" #include -#include +#include #include #include #ifdef HAVE_UNISTD_H @@ -44,12 +44,12 @@ #ifdef HAVE_SYS_UTSNAME_H # include // For uname. #endif -#include +#include #include #include #include -#include -#include +#include +#include #ifdef HAVE_PWD_H # include #endif @@ -57,7 +57,7 @@ # include #endif #include -#include // for errno +#include // for errno #include #ifdef OS_WINDOWS #include "windows/dirent.h" diff --git a/src/logging_striptest_main.cc b/src/logging_striptest_main.cc index 2fb9127..87d8005 100644 --- a/src/logging_striptest_main.cc +++ b/src/logging_striptest_main.cc @@ -31,7 +31,7 @@ // The common part of the striplog tests. -#include +#include #include #include #include "glog/logging.h" diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc index 73d426b..6a738be 100644 --- a/src/logging_unittest.cc +++ b/src/logging_unittest.cc @@ -44,18 +44,17 @@ # include #endif +#include +#include +#include #include #include -#include #include #include #include #include #include -#include -#include - #include "base/commandlineflags.h" #include "glog/logging.h" #include "glog/raw_logging.h" diff --git a/src/raw_logging.cc b/src/raw_logging.cc index ba65961..9665a81 100644 --- a/src/raw_logging.cc +++ b/src/raw_logging.cc @@ -34,13 +34,13 @@ #include "utilities.h" #include -#include -#include +#include +#include #ifdef HAVE_UNISTD_H # include // for close() and write() #endif #include // for open() -#include +#include #include "config.h" #include "glog/logging.h" // To pick up flag settings etc. #include "glog/raw_logging.h" diff --git a/src/signalhandler.cc b/src/signalhandler.cc index 9554718..b6d6e25 100644 --- a/src/signalhandler.cc +++ b/src/signalhandler.cc @@ -36,8 +36,8 @@ #include "symbolize.h" #include "glog/logging.h" -#include -#include +#include +#include #ifdef HAVE_UCONTEXT_H # include #endif diff --git a/src/signalhandler_unittest.cc b/src/signalhandler_unittest.cc index 36d957b..13b27d3 100644 --- a/src/signalhandler_unittest.cc +++ b/src/signalhandler_unittest.cc @@ -37,9 +37,9 @@ #if defined(HAVE_PTHREAD) # include #endif -#include -#include -#include +#include +#include +#include #include #include "glog/logging.h" diff --git a/src/stacktrace_powerpc-inl.h b/src/stacktrace_powerpc-inl.h index 7b2bbd1..f04d22e 100644 --- a/src/stacktrace_powerpc-inl.h +++ b/src/stacktrace_powerpc-inl.h @@ -35,7 +35,7 @@ // http://www.linux-foundation.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#STACK // Linux has similar code: http://patchwork.ozlabs.org/linuxppc/patch?id=8882 -#include +#include #include // for uintptr_t #include "stacktrace.h" diff --git a/src/stacktrace_unittest.cc b/src/stacktrace_unittest.cc index 77d3429..e23b4c4 100644 --- a/src/stacktrace_unittest.cc +++ b/src/stacktrace_unittest.cc @@ -29,8 +29,8 @@ #include "utilities.h" -#include -#include +#include +#include #include "config.h" #include "base/commandlineflags.h" #include "glog/logging.h" diff --git a/src/stacktrace_x86-inl.h b/src/stacktrace_x86-inl.h index 3b8d5a8..af2783d 100644 --- a/src/stacktrace_x86-inl.h +++ b/src/stacktrace_x86-inl.h @@ -38,7 +38,7 @@ #include #endif -#include // for NULL +#include // for NULL #include "stacktrace.h" _START_GOOGLE_NAMESPACE_ diff --git a/src/stacktrace_x86_64-inl.h b/src/stacktrace_x86_64-inl.h index f7d1dca..2adfdfa 100644 --- a/src/stacktrace_x86_64-inl.h +++ b/src/stacktrace_x86_64-inl.h @@ -31,10 +31,9 @@ // // Produce stack trace using libgcc -extern "C" { -#include // for NULL +#include // for NULL #include // ABI defined unwinder -} + #include "stacktrace.h" _START_GOOGLE_NAMESPACE_ diff --git a/src/symbolize.cc b/src/symbolize.cc index 7767c90..f7fbc53 100644 --- a/src/symbolize.cc +++ b/src/symbolize.cc @@ -56,7 +56,7 @@ #if defined(HAVE_SYMBOLIZE) -#include +#include #include #include @@ -118,14 +118,14 @@ _END_GOOGLE_NAMESPACE_ #else #include #endif -#include +#include +#include +#include +#include +#include +#include #include -#include #include -#include -#include -#include -#include #include #include #include @@ -849,7 +849,7 @@ _END_GOOGLE_NAMESPACE_ #elif defined(OS_MACOSX) && defined(HAVE_DLADDR) #include -#include +#include _START_GOOGLE_NAMESPACE_ @@ -951,7 +951,7 @@ _END_GOOGLE_NAMESPACE_ #else /* HAVE_SYMBOLIZE */ -#include +#include #include "config.h" diff --git a/src/symbolize_unittest.cc b/src/symbolize_unittest.cc index 35cc2d3..0b53230 100644 --- a/src/symbolize_unittest.cc +++ b/src/symbolize_unittest.cc @@ -33,7 +33,7 @@ #include "utilities.h" -#include +#include #include #include "glog/logging.h" diff --git a/src/utilities.cc b/src/utilities.cc index 9a1e35d..6b9a69e 100644 --- a/src/utilities.cc +++ b/src/utilities.cc @@ -31,14 +31,14 @@ #include "utilities.h" -#include -#include +#include +#include -#include +#include #ifdef HAVE_SYS_TIME_H # include #endif -#include +#include #if defined(HAVE_SYSCALL_H) #include // for syscall() #elif defined(HAVE_SYS_SYSCALL_H) diff --git a/src/vlog_is_on.cc b/src/vlog_is_on.cc index e1b257f..4760366 100644 --- a/src/vlog_is_on.cc +++ b/src/vlog_is_on.cc @@ -34,9 +34,9 @@ #include "utilities.h" -#include -#include -#include +#include +#include +#include #include #include #include "base/commandlineflags.h" diff --git a/src/windows/dirent.h b/src/windows/dirent.h index f7a46da..12cf00a 100644 --- a/src/windows/dirent.h +++ b/src/windows/dirent.h @@ -27,15 +27,14 @@ #endif #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include /* Indicates that d_type field is available in dirent structure */ #define _DIRENT_HAVE_D_TYPE diff --git a/src/windows/port.cc b/src/windows/port.cc index 3a0c930..f0022e7 100755 --- a/src/windows/port.cc +++ b/src/windows/port.cc @@ -1,10 +1,10 @@ /* Copyright (c) 2008, Google Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -37,7 +37,7 @@ #endif #include "config.h" -#include // for va_list, va_start, va_end +#include // for va_list, va_start, va_end #include "port.h" // These call the windows _vsnprintf, but always NUL-terminate. diff --git a/src/windows/port.h b/src/windows/port.h index 75761d4..c3207e1 100755 --- a/src/windows/port.h +++ b/src/windows/port.h @@ -1,10 +1,10 @@ /* Copyright (c) 2008, Google Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: - * + * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above @@ -14,7 +14,7 @@ * * Neither the name of Google Inc. nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -54,10 +54,10 @@ #include /* because we so often use open/close/etc */ #include /* for _getcwd() */ #include /* for _getpid() */ -#include /* read in vsnprintf decl. before redifining it */ -#include /* template_dictionary.cc uses va_copy */ -#include /* for _strnicmp(), strerror_s() */ -#include /* for localtime_s() */ +#include /* template_dictionary.cc uses va_copy */ +#include /* read in vsnprintf decl. before redifining it */ +#include /* for _strnicmp(), strerror_s() */ +#include /* for localtime_s() */ /* Note: the C++ #includes are all together at the bottom. This file is * used by both C and C++ code, so we put all the C++ together. */