From 07ad5f34aad62c79e67053e2d58bbb5052953437 Mon Sep 17 00:00:00 2001
From: James Turner <zakalawe@mac.com>
Date: Sun, 9 May 2010 12:23:35 +0100
Subject: [PATCH] Fix MinGW compilation of TerraSync

---
 utils/TerraSync/terrasync.cxx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/utils/TerraSync/terrasync.cxx b/utils/TerraSync/terrasync.cxx
index 7404530e1..c8138e708 100644
--- a/utils/TerraSync/terrasync.cxx
+++ b/utils/TerraSync/terrasync.cxx
@@ -269,7 +269,7 @@ void sync_tree(const char* dir) {
     }
 }
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
 typedef void (__cdecl * sighandler_t)(int);
 #elif defined( __APPLE__ )
 typedef sig_t sighandler_t;
@@ -278,10 +278,10 @@ typedef sig_t sighandler_t;
 bool terminating = false;
 sighandler_t prior_signal_handlers[32];
 int termination_triggering_signals[] = {
-#ifndef _MSC_VER
-    SIGHUP, SIGINT, SIGQUIT, SIGKILL,
-#else
+#if defined(_MSC_VER) || defined(__MINGW32__)
     SIGINT, SIGILL, SIGFPE, SIGSEGV, SIGTERM, SIGBREAK, SIGABRT,
+#else
+    SIGHUP, SIGINT, SIGQUIT, SIGKILL,
 #endif
     0};  // zero terminated