platform/upstream/glog.git
6 years agoSymbolizer support for mingw and cygwin (#208) master
Sergiu Deitsch [Tue, 27 Feb 2018 20:03:20 +0000 (21:03 +0100)]
Symbolizer support for mingw and cygwin (#208)

* added dbghelp symbolizer support for mingw and cygwin
* fixed compiler errors in case <stdint.h> is not available
* cmake: check whether SymFromAddr actually works

6 years agocmake: do not introduce a policy stack in the package config
Sergiu Deitsch [Fri, 23 Feb 2018 09:16:24 +0000 (10:16 +0100)]
cmake: do not introduce a policy stack in the package config

6 years agoMerge pull request #292 from Mizux/master
Sergiu Deitsch [Sat, 10 Feb 2018 13:34:47 +0000 (14:34 +0100)]
Merge pull request #292 from Mizux/master

CMake Update

6 years agoRework CMake glog VERSION management.
Corentin Le Molgat [Mon, 29 Jan 2018 13:59:08 +0000 (14:59 +0100)]
Rework CMake glog VERSION management.

- Use of Project version properties instead of custom variables
- fix missmatch between VERSION (build version) and SOVERSION (API version)
src: https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html#prop_tgt:VERSION

6 years agoremove uneeded enable_testing()
Corentin Le Molgat [Mon, 29 Jan 2018 13:56:29 +0000 (14:56 +0100)]
remove uneeded enable_testing()

CTest module already provides it

6 years agoProvide glog::glog ALIAs
Corentin Le Molgat [Mon, 29 Jan 2018 13:55:29 +0000 (14:55 +0100)]
Provide glog::glog ALIAs

Useful when using glog as subproject.
Add an explanation at top like in gflags.git CMakeLists.txt

6 years agoBazel: make example more portable
Rodrigo Queiro [Thu, 1 Feb 2018 08:36:50 +0000 (09:36 +0100)]
Bazel: make example more portable

6 years agoAllow using glog/stl_logging.h with Bazel
Rodrigo Queiro [Wed, 31 Jan 2018 13:00:25 +0000 (14:00 +0100)]
Allow using glog/stl_logging.h with Bazel

Fixes #289.

6 years agoAdd workaround for Bazel build on macOS
Rodrigo Queiro [Tue, 16 Jan 2018 08:20:08 +0000 (09:20 +0100)]
Add workaround for Bazel build on macOS

This works around https://github.com/bazelbuild/bazel/issues/3979,
and so closes #282.

6 years agocmake: remove config.h from public headers (closes #238)
Sergiu Deitsch [Thu, 4 Jan 2018 14:19:23 +0000 (15:19 +0100)]
cmake: remove config.h from public headers (closes #238)

6 years agoMerge pull request #283 from Mizux/master
Sergiu Deitsch [Thu, 4 Jan 2018 13:38:21 +0000 (14:38 +0100)]
Merge pull request #283 from Mizux/master

Use target gflags instead of old VARIABLES

6 years agoUse target gflags instead of old VARIABLES
Mizux [Thu, 4 Jan 2018 12:02:02 +0000 (13:02 +0100)]
Use target gflags instead of old VARIABLES

6 years agoMerge pull request #276 from drigz/add-example
Rodrigo Queiro [Thu, 4 Jan 2018 11:00:27 +0000 (12:00 +0100)]
Merge pull request #276 from drigz/add-example

Add an example using glog from Bazel

6 years agoAdd an example using glog from Bazel
Rodrigo Queiro [Tue, 19 Dec 2017 14:42:59 +0000 (15:42 +0100)]
Add an example using glog from Bazel

6 years agoMerge pull request #277 from drigz/update-gflags
Rodrigo Queiro [Thu, 4 Jan 2018 10:29:54 +0000 (11:29 +0100)]
Merge pull request #277 from drigz/update-gflags

Update gflags to latest master

6 years agocmake: use gflags package config instead of a find module
Sergiu Deitsch [Thu, 4 Jan 2018 01:37:49 +0000 (02:37 +0100)]
cmake: use gflags package config instead of a find module

This allows to avoid conflicts between third party gflags find modules floating
around. If a package provide a local version of gflags find module, clients
which locate glog will incorrectly use it. Another problem is a CMake error message
"cmake_policy PUSH without matching POP" in nested find_package calls. In summary,
we need to ensure to use the original gflags package config.

6 years agocmake: ensure consumers do not overwrite the required policy
Sergiu Deitsch [Tue, 2 Jan 2018 22:36:51 +0000 (23:36 +0100)]
cmake: ensure consumers do not overwrite the required policy

6 years agoremoved obsolete vsprojects
Sergiu Deitsch [Tue, 2 Jan 2018 21:31:47 +0000 (22:31 +0100)]
removed obsolete vsprojects

6 years agocmake: added a postfix for debug builds (closes #237)
Sergiu Deitsch [Tue, 2 Jan 2018 13:38:37 +0000 (14:38 +0100)]
cmake: added a postfix for debug builds (closes #237)

This allows to deploy debug and release builds concurrently.

6 years agoMerge pull request #281 from sergiud/msvc-error-define
Sergiu Deitsch [Tue, 2 Jan 2018 01:21:51 +0000 (02:21 +0100)]
Merge pull request #281 from sergiud/msvc-error-define

Fixed undeclared identifier error

6 years agologging_unittest: fixed undeclared identifier error (fixes #267)
Sergiu Deitsch [Tue, 2 Jan 2018 01:18:00 +0000 (02:18 +0100)]
logging_unittest: fixed undeclared identifier error (fixes #267)

6 years agoMerge pull request #278 from shinh/contrib
Shinichiro Hamaji [Thu, 21 Dec 2017 10:05:40 +0000 (19:05 +0900)]
Merge pull request #278 from shinh/contrib

Update AUTHORS and CONTRIBUTORS for PR#232

6 years agoUpdate AUTHORS and CONTRIBUTORS for PR#232
Shinichiro Hamaji [Wed, 20 Dec 2017 08:27:27 +0000 (17:27 +0900)]
Update AUTHORS and CONTRIBUTORS for PR#232

6 years agoUpdate gflags to latest master
Rodrigo Queiro [Tue, 19 Dec 2017 14:47:18 +0000 (15:47 +0100)]
Update gflags to latest master

This means that gflags no longer leaks config.h, so I had to fix a bug
in glog.bzl where config.h is generated at the wrong path.

I also switched to the best-practice for depending on git repositories,
ie using http_archive with a mirror.

6 years agoMerge pull request #232 from qzmfranklin/bazel
Rodrigo Queiro [Mon, 18 Dec 2017 09:20:57 +0000 (10:20 +0100)]
Merge pull request #232 from qzmfranklin/bazel

Build with Bazel.

6 years agoRemove the use of bind() from WORKSPACE.
Zhongming Qu [Thu, 14 Dec 2017 21:45:01 +0000 (13:45 -0800)]
Remove the use of bind() from WORKSPACE.

6 years agoRemove an empty textual_hdrs field.
Zhongming Qu [Thu, 14 Dec 2017 09:03:19 +0000 (01:03 -0800)]
Remove an empty textual_hdrs field.

6 years agoHide certain header files from the cc_library().
Zhongming Qu [Thu, 14 Dec 2017 08:51:26 +0000 (00:51 -0800)]
Hide certain header files from the cc_library().

This commit addresses a few issues:

    1.  No longer leak config.h in a way similar to
            https://github.com/gflags/gflags/issues/233
        The solution of prefixing the path by 'glog_internal' is modified from
            https://github.com/gflags/gflags/issues/234

    2.  No longer expose internal headers.

    3.  Replace PACKAGE_NAME with native.package_name()

    4.  Uers can choose namespaces via the newly added 'namespace' keyword.

    5.  Replace glob with explicitly listing of files.

    6.  Make the genrules more compact using pythonic list construction.

6 years agoCan build with Bazel now
Zhongming Qu [Sun, 9 Jul 2017 04:38:46 +0000 (00:38 -0400)]
Can build with Bazel now

6 years agoBuild with Bazel.
Zhongming Qu [Sun, 9 Jul 2017 04:38:46 +0000 (00:38 -0400)]
Build with Bazel.

6 years agoMerge pull request #261 from pcc/fix3
Fumitoshi Ukai [Fri, 10 Nov 2017 07:55:27 +0000 (16:55 +0900)]
Merge pull request #261 from pcc/fix3

Compute base addresses from program headers while reading /proc/self/maps.

6 years agoCompute base addresses from program headers while reading /proc/self/maps.
Peter Collingbourne [Thu, 2 Nov 2017 23:53:21 +0000 (16:53 -0700)]
Compute base addresses from program headers while reading /proc/self/maps.

We previously had logic to compute the base address from program
headers as part of symbolization. The problem is that we need a correct
base address earlier in order to adjust a PC into the image's address
space, as these addresses can appear in unsymbolized output.

There was previously an assumption that only the mapping that
was lowest in the address space did not need to be adjusted. This
assumption is not guaranteed (for example, the kernel may choose to
map an ET_DYN lowest) and in fact turned out to be wrong in binaries
linked with lld because the first mapping is read-only.

The solution is to move the program header reading logic into the
code that reads /proc/self/maps.

There is a change in semantics for clients that install a callback
using the InstallSymbolizeOpenObjectFileCallback function. Any such
clients will need to return a correct base address from the callback
by reading program headers using code similar to that in the function
OpenObjectFileContainingPcAndGetStartAddress.

6 years agoMerge pull request #106 from dimhotepus/master
Sergiu Deitsch [Sat, 4 Nov 2017 15:22:21 +0000 (16:22 +0100)]
Merge pull request #106 from dimhotepus/master

Cache strlen outside of cycles (PVS-Studio)

6 years agoMerge pull request #260 from ukai/shell_escape
Shinichiro Hamaji [Tue, 31 Oct 2017 05:30:52 +0000 (14:30 +0900)]
Merge pull request #260 from ukai/shell_escape

Shell escape arguments to /bin/mail.

6 years agoShell escape arguments to /bin/mail.
Fumitoshi Ukai [Tue, 31 Oct 2017 04:04:26 +0000 (13:04 +0900)]
Shell escape arguments to /bin/mail.

6 years agoStyle fixes for consistency
Shinichiro Hamaji [Fri, 20 Oct 2017 07:11:31 +0000 (16:11 +0900)]
Style fixes for consistency

6 years agoMerge pull request #245 from DariuszOstolski/issue211
Shinichiro Hamaji [Fri, 20 Oct 2017 07:09:28 +0000 (16:09 +0900)]
Merge pull request #245 from DariuszOstolski/issue211

Fix username lookup in case of missing USER environment variable

6 years agoMerge pull request #254 from DariuszOstolski/issue253
Shinichiro Hamaji [Fri, 20 Oct 2017 06:48:21 +0000 (15:48 +0900)]
Merge pull request #254 from DariuszOstolski/issue253

#253: Use MS preprocessor idiom to disable warning

6 years ago#253: Use MS preprocessor idiom to disable warning
Dariusz Ostolski [Wed, 18 Oct 2017 18:56:49 +0000 (20:56 +0200)]
#253: Use MS preprocessor idiom to disable warning

6 years agoMerge pull request #226 from sergiud/zero-allocation-log-failure
Shinichiro Hamaji [Wed, 11 Oct 2017 15:25:02 +0000 (00:25 +0900)]
Merge pull request #226 from sergiud/zero-allocation-log-failure

Zero allocation fix

6 years agofixed gcc logging failure
Sergiu Deitsch [Thu, 6 Jul 2017 09:05:58 +0000 (11:05 +0200)]
fixed gcc logging failure

6 years agoAdded HAVE_PWD_H to cmake build
Dariusz Ostolski [Wed, 20 Sep 2017 16:41:07 +0000 (18:41 +0200)]
Added HAVE_PWD_H to cmake build

6 years agoFix username lookup in case of missing USER environment variable
Dariusz Ostolski [Tue, 19 Sep 2017 20:23:53 +0000 (22:23 +0200)]
Fix username lookup in case of missing USER environment variable

6 years agoMerge pull request #228 from sergiud/dll-export-fix
Shinichiro Hamaji [Wed, 9 Aug 2017 15:06:08 +0000 (00:06 +0900)]
Merge pull request #228 from sergiud/dll-export-fix

Fix for missing exports (fixes #227)

6 years agoadded missing exports (fixes #227)
Sergiu Deitsch [Wed, 9 Aug 2017 13:21:32 +0000 (15:21 +0200)]
added missing exports (fixes #227)

6 years agoMerge pull request #225 from jray272/remove-log-every-n-assert
Shinichiro Hamaji [Wed, 9 Aug 2017 07:35:05 +0000 (16:35 +0900)]
Merge pull request #225 from jray272/remove-log-every-n-assert

Fix LOG_EVERY_N with clang -Wunused-local-typedef

6 years agoRemove GOOGLE_GLOG_COMPILE_ASSERT
Jim Ray [Wed, 9 Aug 2017 07:09:14 +0000 (00:09 -0700)]
Remove GOOGLE_GLOG_COMPILE_ASSERT

This compile time assert is no longer used anywhere in glog. Remove
it.

6 years agoMerge pull request #224 from jray272/run-windows-script
Shinichiro Hamaji [Wed, 9 Aug 2017 06:04:26 +0000 (15:04 +0900)]
Merge pull request #224 from jray272/run-windows-script

Run src/windows/preprocess.sh to pick up latest logging.h.in changes

6 years agoFix LOG_EVERY_N with clang -Wunused-local-typedef
Jim Ray [Mon, 31 Jul 2017 05:30:33 +0000 (22:30 -0700)]
Fix LOG_EVERY_N with clang -Wunused-local-typedef

Glog uses a pre-C++11 compile time assert to verify the validity of
the severity parameter for LOG_EVERY_N. Unfortunately, some compilers
will complain about the usage of LOG_EVERY_N with
"-Wunused-local-typedef" due to the way the compile time assert is
constructed. This makes it impossible to use LOG_EVERY_N with this
warning treated as an error.

The fix simply removes the assert entirely. This is safe to do since
you can't put anything invalid into the severity parameters without
generating a compile error elsewhere. This has been safe to do ever
since the GLOG_ prefixes were added as part of 6febec361e.

Fixes #223

6 years agoUpdate Windows logging.h based on 2df0ca34aa
Jim Ray [Mon, 31 Jul 2017 05:25:36 +0000 (22:25 -0700)]
Update Windows logging.h based on 2df0ca34aa

Commit changes to src/windows/glog/logging.h that were missed in
2df0ca34aa. Because a change to src/glog/logging.h.in was made,
src/windows/preprocess.sh needed to be run.

6 years agoAdd Jim Ray to CONTRIBUTORS
Jim Ray [Mon, 31 Jul 2017 04:38:38 +0000 (21:38 -0700)]
Add Jim Ray to CONTRIBUTORS

6 years agoMerge pull request #218 from andschwa/remove-sln
Shinichiro Hamaji [Tue, 1 Aug 2017 05:41:47 +0000 (14:41 +0900)]
Merge pull request #218 from andschwa/remove-sln

Update Windows docs

6 years agoUpdate Windows readme for CMake
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:35:04 +0000 (11:35 -0700)]
Update Windows readme for CMake

6 years agoUpdate gitignore for CMake and Visual Studio
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:34:52 +0000 (11:34 -0700)]
Update gitignore for CMake and Visual Studio

6 years agoDelete ancient Visual Studio Solution file.
Andrew Schwartzmeyer [Wed, 26 Jul 2017 18:34:40 +0000 (11:34 -0700)]
Delete ancient Visual Studio Solution file.

6 years agoMerge pull request #216 from google/revert-120-master
Shinichiro Hamaji [Wed, 26 Jul 2017 08:46:57 +0000 (17:46 +0900)]
Merge pull request #216 from google/revert-120-master

Revert "configure.ac: Allow user to disable gflags"

6 years agoRevert "configure.ac: Allow user to disable gflags"
Shinichiro Hamaji [Wed, 26 Jul 2017 08:44:25 +0000 (17:44 +0900)]
Revert "configure.ac: Allow user to disable gflags"

6 years agoMerge pull request #120 from ribalda/master
Shinichiro Hamaji [Wed, 19 Jul 2017 14:51:20 +0000 (23:51 +0900)]
Merge pull request #120 from ribalda/master

configure.ac: Allow user to disable gflags

6 years agoMerge pull request #209 from sergiud/cmake-icc-fix
Shinichiro Hamaji [Sun, 9 Jul 2017 16:53:19 +0000 (01:53 +0900)]
Merge pull request #209 from sergiud/cmake-icc-fix

cmake: fixed gflags namespace detection (fixes #193)

6 years agocmake: fixed gflags namespace detection (fixes #193)
Sergiu Deitsch [Sun, 9 Jul 2017 00:04:17 +0000 (02:04 +0200)]
cmake: fixed gflags namespace detection (fixes #193)

This commit fixes gflags namespace detection using Intel compiler and ensures
the generated try_compile command line does not produce malformed paths.

6 years agoMerge pull request #153 from sergiud/cmake-gnu-install-dirs
Shinichiro Hamaji [Thu, 6 Jul 2017 06:01:10 +0000 (15:01 +0900)]
Merge pull request #153 from sergiud/cmake-gnu-install-dirs

cmake: do not hardcode relative install directories

6 years agoMerge pull request #152 from sergiud/cmake-project-name
Shinichiro Hamaji [Thu, 6 Jul 2017 06:00:37 +0000 (15:00 +0900)]
Merge pull request #152 from sergiud/cmake-project-name

cmake: changed project name from google-glog to glog

6 years agoMerge pull request #157 from sergiud/cygwin-support
Shinichiro Hamaji [Thu, 6 Jul 2017 06:00:06 +0000 (15:00 +0900)]
Merge pull request #157 from sergiud/cygwin-support

Cygwin support

6 years agoMerge pull request #158 from sergiud/zero-allocation
Shinichiro Hamaji [Thu, 6 Jul 2017 05:58:37 +0000 (14:58 +0900)]
Merge pull request #158 from sergiud/zero-allocation

[RFC] reduce heap memory allocations to zero

6 years agoMerge pull request #145 from pixelb/rate-limit-posix-fadvise
Shinichiro Hamaji [Thu, 6 Jul 2017 05:52:13 +0000 (14:52 +0900)]
Merge pull request #145 from pixelb/rate-limit-posix-fadvise

rate limit calls to posix_fadvise()

6 years agoreduce memory allocations to zero
Hans-Andreas Engel [Fri, 8 Apr 2016 08:51:40 +0000 (10:51 +0200)]
reduce memory allocations to zero

6 years agoMerge pull request #199 from v1bri/brian-fix-gflags-link
Shinichiro Hamaji [Thu, 29 Jun 2017 03:36:25 +0000 (12:36 +0900)]
Merge pull request #199 from v1bri/brian-fix-gflags-link

Use gflags ALIAS instead of ${gflags_XXX} vars

6 years agoMerge pull request #168 from andschwa/windows-stacktrace
Shinichiro Hamaji [Wed, 28 Jun 2017 03:31:40 +0000 (12:31 +0900)]
Merge pull request #168 from andschwa/windows-stacktrace

Port stack tracing to Windows

6 years agoSupport signal handler on Windows
Andrew Schwartzmeyer [Tue, 27 Jun 2017 00:13:21 +0000 (17:13 -0700)]
Support signal handler on Windows

6 years agoLink to DbgHelp using pre-processor directive
Andrew Schwartzmeyer [Fri, 23 Jun 2017 19:39:49 +0000 (12:39 -0700)]
Link to DbgHelp using pre-processor directive

This method ensure that all users of glog get automatically linked to
the DbgHelp library without needing to set compiler flags.

6 years agoExport GetStackTrace
Andrew Schwartzmeyer [Thu, 25 May 2017 20:43:39 +0000 (13:43 -0700)]
Export GetStackTrace

Necessary when building with BUILD_SHARED_LIBS=1.

6 years agoSupport symbolizer and demangler on Windows
Andrew Schwartzmeyer [Sat, 4 Mar 2017 00:50:08 +0000 (16:50 -0800)]
Support symbolizer and demangler on Windows

6 years agoSupport stacktrace on Windows
Andrew Schwartzmeyer [Wed, 21 Dec 2016 21:48:58 +0000 (13:48 -0800)]
Support stacktrace on Windows

6 years agoCopy stacktrace_generic-inl.h for Windows
Andrew Schwartzmeyer [Tue, 20 Dec 2016 23:24:50 +0000 (15:24 -0800)]
Copy stacktrace_generic-inl.h for Windows

6 years agoAdd Andrew Schwartzmeyer to authors and contributors
Andrew Schwartzmeyer [Fri, 23 Jun 2017 17:00:12 +0000 (10:00 -0700)]
Add Andrew Schwartzmeyer to authors and contributors

6 years agoSpecify gflags version in CMakeLists.txt
Brian Orr [Thu, 22 Jun 2017 18:24:58 +0000 (11:24 -0700)]
Specify gflags version in CMakeLists.txt

6 years agoUse gflags ALIAS instead of ${gflags_XXX} vars
Brian Orr [Thu, 22 Jun 2017 07:25:13 +0000 (00:25 -0700)]
Use gflags ALIAS instead of ${gflags_XXX} vars

The gflags project updated their CMake config last year with a
`gflags` ALIAS target. This can be used instead of the legacy
`${gflags_LIBRARIES}` and `${gflags_INCLUDE_DIRS}` variables. It also
looks cleaner.

Fixes #198

6 years agoMerge pull request #188 from shinh/remove-configure
Fumitoshi Ukai [Fri, 12 May 2017 05:57:09 +0000 (14:57 +0900)]
Merge pull request #188 from shinh/remove-configure

Remove files generated by autotools

closes #165

6 years agoRemove files generated by autotools
Shinichiro Hamaji [Fri, 12 May 2017 05:52:54 +0000 (14:52 +0900)]
Remove files generated by autotools

for #165. I think not many projects have them in their repo.

6 years agoUpdate the version in CMakeLists.txt to 0.3.5
Shinichiro Hamaji [Wed, 10 May 2017 11:42:57 +0000 (20:42 +0900)]
Update the version in CMakeLists.txt to 0.3.5

6 years agoMerge pull request #186 from shinh/backport
Fumitoshi Ukai [Wed, 10 May 2017 03:51:39 +0000 (12:51 +0900)]
Merge pull request #186 from shinh/backport

Backport internal changes

6 years agoAdd a hack for naive include scanners
Shinichiro Hamaji [Tue, 9 May 2017 08:35:18 +0000 (17:35 +0900)]
Add a hack for naive include scanners

6 years agoDefine OS_LINUX only if it's not defined yet
Shinichiro Hamaji [Tue, 9 May 2017 08:22:38 +0000 (17:22 +0900)]
Define OS_LINUX only if it's not defined yet

6 years agosymbolize: Allow 4kB stack consumption on PPC64
Shinichiro Hamaji [Tue, 9 May 2017 08:21:16 +0000 (17:21 +0900)]
symbolize: Allow 4kB stack consumption on PPC64

6 years agox86 stacktrace: Use __builtin_frame_address if possible
Shinichiro Hamaji [Tue, 9 May 2017 08:11:51 +0000 (17:11 +0900)]
x86 stacktrace: Use __builtin_frame_address if possible

6 years agoRelax test for symbolize
Shinichiro Hamaji [Tue, 9 May 2017 08:05:55 +0000 (17:05 +0900)]
Relax test for symbolize

Don't rely on an internal-linkage extern "C" function having an
unmangled name. This isn't required by the ABI, and in fact is not
valid for a conforming compiler(!). Instead, allow symbolization to
produce either a mangled or an unmangled name here.

6 years agoUse LOG(FATAL) instead of CHECK(false)
Shinichiro Hamaji [Tue, 9 May 2017 08:01:07 +0000 (17:01 +0900)]
Use LOG(FATAL) instead of CHECK(false)

6 years agoRun src/windows/preprocess.sh
Shinichiro Hamaji [Tue, 9 May 2017 07:41:58 +0000 (16:41 +0900)]
Run src/windows/preprocess.sh

6 years agoglog: release 0.3.5
Shinichiro Hamaji [Tue, 9 May 2017 07:24:50 +0000 (16:24 +0900)]
glog: release 0.3.5

7 years agoMerge pull request #179 from renning22/master
Fumitoshi Ukai [Fri, 21 Apr 2017 00:54:53 +0000 (09:54 +0900)]
Merge pull request #179 from renning22/master

CHECK_NOTNULL works with smart pointers when compiled in C++11.

7 years agoCHECK_NOTNULL works with smart pointers when compiled in C++11.
Ning Ren [Thu, 20 Apr 2017 22:30:42 +0000 (15:30 -0700)]
CHECK_NOTNULL works with smart pointers when compiled in C++11.

7 years agoMerge pull request #169 from mayah/windows-no-return
Fumitoshi Ukai [Tue, 7 Mar 2017 03:44:37 +0000 (12:44 +0900)]
Merge pull request #169 from mayah/windows-no-return

Add __declspec(noreturn) on Win

7 years agoAdd __declspec(noreturn) on Win
mayah [Tue, 7 Mar 2017 02:22:24 +0000 (11:22 +0900)]
Add __declspec(noreturn) on Win

Currently cl.exe doesn't know LOG(FATAL) exits the program. Set
__declspec(noreturn).

7 years agoMerge pull request #164 from yoshisatoyanagisawa/dcheck_always_on
Fumitoshi Ukai [Thu, 9 Feb 2017 02:04:00 +0000 (11:04 +0900)]
Merge pull request #164 from yoshisatoyanagisawa/dcheck_always_on

DCHECK_ALWAYS_ON to make D* enabled under NDEBUG

7 years agoDCHECK_ALWAYS_ON to make D* enabled under NDEBUG
Yoshisato Yanagisawa [Tue, 7 Feb 2017 06:47:51 +0000 (15:47 +0900)]
DCHECK_ALWAYS_ON to make D* enabled under NDEBUG

The macro NDEBUG could be automatically defined for release build on
some build environments (e.g. MSVC).  If we use NDEBUG as a key to
distinguish using DCHECK as CHECK (I call this DCHECK is enabled) or
not, we cannot make DCHECK enabled for release build on such
environments.

Considering people use a program with glog for presubmit testing or
dogfooding, they should need to do release build with DCHECK enabled.

7 years agofixed cygwin compilation errors
Sergiu Deitsch [Tue, 17 Jan 2017 11:47:11 +0000 (12:47 +0100)]
fixed cygwin compilation errors

7 years agocmake: do not hardcode relative install directories
Sergiu Deitsch [Tue, 10 Jan 2017 10:34:42 +0000 (11:34 +0100)]
cmake: do not hardcode relative install directories

7 years agocmake: changed project name from google-glog to glog
Sergiu Deitsch [Tue, 10 Jan 2017 10:15:18 +0000 (11:15 +0100)]
cmake: changed project name from google-glog to glog

This fixes the default install location on Windows. Specifically,
find_package works now out-of-the box with the default
CMAKE_INSTALL_PREFIX.

7 years agorate limit calls to posix_fadvise()
Pádraig Brady [Fri, 9 Dec 2016 19:45:34 +0000 (19:45 +0000)]
rate limit calls to posix_fadvise()

There can be a large kernel overhead involved in POSIX_FADV_DONTNEED.
There is no point in calling this per item logged, so rate limit
to at most once per 2MiB written.

With a simple test program that logs 100K items at WARNING level:

Before:

  $ time strace -c -e fadvise64 log.test \
    -log_dir=/dev/shm -logtofiles=true -logtostderr=false
  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
  100.00   12.522509         125     99957           fadvise64
  ------ ----------- ----------- --------- --------- ----------------
  real    0m52.671s
  user    0m2.194s
  sys     0m44.022s

After:

  $ time strace -c -e fadvise64 log.test \
    -log_dir=/dev/shm -logtofiles=true -logtostderr=false

  % time     seconds  usecs/call     calls    errors syscall
  ------ ----------- ----------- --------- --------- ----------------
  100.00    0.000759         152         5           fadvise64
  ------ ----------- ----------- --------- --------- ----------------
  real    0m4.206s
  user    0m1.436s
  sys     0m3.153s

Fixes issue #84

7 years agoconfigure.ac: Allow user to disable gflags
Ricardo Ribalda Delgado [Thu, 11 Aug 2016 09:49:36 +0000 (11:49 +0200)]
configure.ac: Allow user to disable gflags

Under some circumstances like cross-compilation, the user might not want
to enable support for gflags.

This patch allows support for --without-gflags

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>