summaryrefslogtreecommitdiff
path: root/src/utilities.cc
diff options
context:
space:
mode:
author <shinichiro.hamaji@gmail.com>2013-02-18 10:56:53 +0000
committer <shinichiro.hamaji@gmail.com>2013-02-18 10:56:53 +0000
commit478a80caa0cf072d73e268d0bea46428b328943c (patch)
tree3cf77346f68c0669c55b97e3fbc5fa8a14be1f98 /src/utilities.cc
parenta106e61178d55c4d3b296c332d3f8c1eb43bcc1e (diff)
downloadglog-478a80caa0cf072d73e268d0bea46428b328943c.tar.gz
glog-478a80caa0cf072d73e268d0bea46428b328943c.tar.bz2
glog-478a80caa0cf072d73e268d0bea46428b328943c.zip
Attempt to improve mingw-w64 support
- Set -Isrc/windows for mingw - Check existence of sigaction, pread, and pwrite - Provide alternative implementation of pread and pwrite - Eliminate symlink code for OS_WINDOWS - Don't check /proc/self/fd if the OS isn't linux - Don't use MSVC specific declarations in port.h for mingw git-svn-id: https://google-glog.googlecode.com/svn/trunk@135 eb4d4688-79bd-11dd-afb4-1d65580434c0
Diffstat (limited to 'src/utilities.cc')
-rw-r--r--src/utilities.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utilities.cc b/src/utilities.cc
index a6d1961..f31c7c7 100644
--- a/src/utilities.cc
+++ b/src/utilities.cc
@@ -136,6 +136,8 @@ static void DumpStackTrace(int skip_count, DebugWriter *writerfn, void *arg) {
static void DumpStackTraceAndExit() {
DumpStackTrace(1, DebugWriteToStderr, NULL);
+ // TOOD(hamaji): Use signal instead of sigaction?
+#ifdef HAVE_SIGACTION
// Set the default signal handler for SIGABRT, to avoid invoking our
// own signal handler installed by InstallFailedSignalHandler().
struct sigaction sig_action;
@@ -143,6 +145,7 @@ static void DumpStackTraceAndExit() {
sigemptyset(&sig_action.sa_mask);
sig_action.sa_handler = SIG_DFL;
sigaction(SIGABRT, &sig_action, NULL);
+#endif // HAVE_SIGACTION
abort();
}