summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2009-07-31Make the order of check for OS_WINDOWS|OS_CYGWIN and HAVE_PTHREAD consistent.1-8/+8
git-svn-id: https://google-glog.googlecode.com/svn/trunk@70 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-30Cast from pthread_t to pid_t via uintptr_t.1-1/+1
On 64bit NetBSD, pthread_t is a pointer and pid_t is an integer so we cannot cast from pthread_t to pid_t directoly due to difference of their size. git-svn-id: https://google-glog.googlecode.com/svn/trunk@69 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-30Call glog_internal_namespace_::ProgramInvocationShortName() explicitly.1-4/+6
Otherwise, we may call google::ProgramInvocationShortName() in gflags. git-svn-id: https://google-glog.googlecode.com/svn/trunk@68 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-30Avoid warning for type punning like1-4/+4
src/logging_unittest.cc:591: warning: dereferencing type-punned pointer will break strict-aliasing rules As we'll never dereference the casted pointers, it's OK to silence this warning. git-svn-id: https://google-glog.googlecode.com/svn/trunk@67 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-30Fix posix_strerror_r for OpenBSD.2-2/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@66 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-29Define DumpPCAndSymbol() only when HAVE_SYMBOLIZE is defined.1-0/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@65 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-29Fix user name detection for Windows.1-0/+4
This patch was given by ademin (thanks!). http://code.google.com/p/google-glog/issues/detail?id=12 git-svn-id: https://google-glog.googlecode.com/svn/trunk@64 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-29Suppress warnings.1-15/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@63 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-29Initializes the length of machine name properly.1-2/+2
This fix was suggested at (thanks!) http://code.google.com/p/google-glog/issues/detail?id=9 git-svn-id: https://google-glog.googlecode.com/svn/trunk@62 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-27Regression: Add NOGDI and NOMINMAX macros before including windows.h.1-0/+4
git-svn-id: https://google-glog.googlecode.com/svn/trunk@61 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-27Use internal namespace instead of anonymous namespace for Mutex.1-111/+172
git-svn-id: https://google-glog.googlecode.com/svn/trunk@60 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-27Add cast for pthread_self() to avoid warning.1-1/+6
git-svn-id: https://google-glog.googlecode.com/svn/trunk@59 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-27Add virtual ~Thread() to avoid warnings.1-0/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@58 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-27Add OS_NETBSD macro.1-0/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@57 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-08Suppress warnings. Most of this patch was given by keir (thanks!).7-26/+36
Corresponding glog bug: http://code.google.com/p/google-glog/issues/detail?id=10 The differences from keir's patch are: - For raw_logging.h.in, I just included time.h for struct tm. - Added a fprintf which warns that we should have died to avoid a warning for unused local variable. - Added inline for some functions which may be unused in googletest.h. - Removed DumpPCAndFrameSize as it was unused. git-svn-id: https://google-glog.googlecode.com/svn/trunk@56 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-07-07Run benchmarks only when --run_benchmark is specified.2-0/+13
git-svn-id: https://google-glog.googlecode.com/svn/trunk@52 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-05-20Encapsulate the definition of Mutex into glog's internal namespace.1-3/+9
This will fix the issue a user in Japan reported in his blog. http://kzk9.net/blog/2009/05/deadlock_with_gflags_and_glog_2.html According to his description, when he use glog and gflags-1.1, gflags' code uses glog's Mutex, the Mutex cannot lock the pthread_mutex, and the program stops. The bug happens with the combination of gflags-1.1 and glog. It seems that the issue was caused by incompatibility of Mutex classes. Though I couldn't reproduce this issue, the reporter of this bug said that adding namespace fixes the problem and I think it is generally good idea to use namespace for this kind of common component to avoid incompatibilities. So, I check this change in now. This patch will protect glog from future changes on Mutex as well. --This line, and those below, will be ignored-- M src/base/mutex.h git-svn-id: https://google-glog.googlecode.com/svn/trunk@51 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-05-19Suppress warnings (re-definition of _XOPEN_SOURCE) by including utilities.h ↵3-1/+5
first. git-svn-id: https://google-glog.googlecode.com/svn/trunk@50 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-04-10Check if InitGoogleLogging is not called twice.2-1/+7
git-svn-id: https://google-glog.googlecode.com/svn/trunk@47 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-04-09A bug fix for Windows: Use GetSystemTimeAsFileTime instead of GetSystemTime. ↵1-7/+24
SYSTEMTIME's mSecond is not a unix time but like tm.tm_sec. git-svn-id: https://google-glog.googlecode.com/svn/trunk@45 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-04-07Use struct instead of class for forward declaration of CrashReason as we ↵2-2/+2
define it as struct. git-svn-id: https://google-glog.googlecode.com/svn/trunk@44 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-04-07Apply patch given by maw (thanks!). The patch was modified a bit using ↵1-0/+2
AC_ARG_WITH. - Fix build problems when building with gtest. - --with-gflags support. git-svn-id: https://google-glog.googlecode.com/svn/trunk@42 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-03-10Fixes for GCC 4.4. Thanks John for this patch!4-3/+11
git-svn-id: https://google-glog.googlecode.com/svn/trunk@41 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-03-04Introduce RecordCrashReason().4-13/+27
git-svn-id: https://google-glog.googlecode.com/svn/trunk@40 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-28Add license information for all source code.40-48/+1149
git-svn-id: https://google-glog.googlecode.com/svn/trunk@39 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-24Bug fix: ifdef guard for InitGoogleMock must be HAVE_LIB_GMOCK rather than ↵1-1/+1
HAVE_LIB_GTEST. git-svn-id: https://google-glog.googlecode.com/svn/trunk@38 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-23Regenerate header files for VC++.4-74/+263
git-svn-id: https://google-glog.googlecode.com/svn/trunk@34 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-23Remove the name of unused parameter.1-1/+1
git-svn-id: https://google-glog.googlecode.com/svn/trunk@32 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-23Remove unnecessary #include.1-2/+8
git-svn-id: https://google-glog.googlecode.com/svn/trunk@31 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-22Better Cygwin support.7-10/+18
- configure.ac: Add -lpthread only if acx_pthread_ok is yes. In cygwin, we use Windows' thread so that we don't need -lpthread. - base/mutex.h: Define NOMINMAX before we include windows.h. - glog/*.h: Make sure that dllimport doesn't appear in cygwin. Note that windows.h may define _WIN32 macro. - utilities.h: Define OS_CYGWIN. git-svn-id: https://google-glog.googlecode.com/svn/trunk@30 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-15* Add LOG_TO_STRING.9-540/+1174
* Add LOG_AT_LEVEL. * Add DVLOG. * Add LOG_TO_SINK_ONLY. * Log microseconds. * Add --log_backtrace_at option. * Introduce CrashReason class. * Fix some bugs. git-svn-id: https://google-glog.googlecode.com/svn/trunk@29 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-13Introduce mock-log.h for unittests.2-0/+261
git-svn-id: https://google-glog.googlecode.com/svn/trunk@28 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-09Define ARRAYSIZE in utilities.h and use it.4-8/+8
git-svn-id: https://google-glog.googlecode.com/svn/trunk@27 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-05Use gtest and gmock if installed.6-21/+49
git-svn-id: https://google-glog.googlecode.com/svn/trunk@26 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-05Initialize gflags in signalhandler_unittest.1-0/+3
git-svn-id: https://google-glog.googlecode.com/svn/trunk@25 eb4d4688-79bd-11dd-afb4-1d65580434c0
2009-01-05Fix a typo in commandlineflags.h.1-1/+1
git-svn-id: https://google-glog.googlecode.com/svn/trunk@24 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-12-19Initial windows support. Now we don't have the stacktrace and several unittests.23-215/+2742
git-svn-id: https://google-glog.googlecode.com/svn/trunk@23 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-12-19Flush logs unsafely before program fails in the signal handler.3-1/+23
git-svn-id: https://google-glog.googlecode.com/svn/trunk@22 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-21Add -lpthread in addition to -pthread on Linux.1-0/+3
git-svn-id: https://google-glog.googlecode.com/svn/trunk@21 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-17Fix a typo: s/gnore/ignore/1-2/+2
git-svn-id: https://google-glog.googlecode.com/svn/trunk@18 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-17Remove stacktrace.cc.1-68/+0
git-svn-id: https://google-glog.googlecode.com/svn/trunk@17 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-17Re-organize the way to produce stacktrace.16-530/+142
Since we introduced the API to set signal handler and print a stacktrace, we should avoid glibc's backtrace, which may call malloc. Basically, we choose the way to produce a stacktrace as same as perftools. Also, I removed GetStackFrames, which is not used and not implemented with glibc. git-svn-id: https://google-glog.googlecode.com/svn/trunk@16 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-04Use uintptr_t instead of int as the integer format of pthread_t.1-3/+3
git-svn-id: https://google-glog.googlecode.com/svn/trunk@14 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-11-03Stop to define DISALLOW_EVIL_CONSTRUCTORS to avoid name conflict.1-13/+6
git-svn-id: https://google-glog.googlecode.com/svn/trunk@13 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-30Forgot to add file for the previous change...3-0/+471
Add InstallFailureSignalHandler(). The function installs a signal handler that will dump useful information when the program crashes on certain signals such as SIGSEGV. git-svn-id: https://google-glog.googlecode.com/svn/trunk@12 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-30Add InstallFailureSignalHandler(). The function installs a signal handler that3-1/+43
will dump useful information when the program crashes on certain signals such as SIGSEGV. Also, changed the version of autoconf (2.59 => 2.61). git-svn-id: https://google-glog.googlecode.com/svn/trunk@11 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-17Use abort instead of exit.1-1/+1
git-svn-id: https://google-glog.googlecode.com/svn/trunk@9 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-17Fix a bug: vmodule didn't work with gflags. Since1-9/+4
gflags isn't initialized when REGISTER_MODULE_INITIALIZER is invoked, we couldn't initialize vmodule_list properly. Modified to call VLOG2Initializer in the first call of InitVLOG3__. git-svn-id: https://google-glog.googlecode.com/svn/trunk@8 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-17Use dladdr to get symbols for environments which doesn't use ELF and6-47/+112
has execinfo.h (e.g., MacOSX 10.5). Though dladdr may not be async signal safe, it's OK since glog's stacktrace doesn't depend on signals. git-svn-id: https://google-glog.googlecode.com/svn/trunk@7 eb4d4688-79bd-11dd-afb4-1d65580434c0
2008-10-14Add __attribute__((noinline)) for StackGrowsDown. This is necessary for ↵1-4/+7
recent GCC (4.3). git-svn-id: https://google-glog.googlecode.com/svn/trunk@6 eb4d4688-79bd-11dd-afb4-1d65580434c0