]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: MinGW does not define system function death()
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 15 Sep 2014 12:46:55 +0000 (05:46 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 15 Sep 2014 12:46:55 +0000 (05:46 -0700)
... try using raise() instead as used by other exception cases.

Also, fix include file order and wrapping to match squid-3 coding
guidelines and available HAVE_ macro wrappers.

src/win32.cc

index 52b7e496280847f8c97f78f52979f0dd98e399dc..7d68a2b8ae31725d797f44c4ef983255dbd169a4 100644 (file)
@@ -9,16 +9,19 @@
 /* Inspired by previous work by Romeo Anghelache & Eric Stern. */
 
 #include "squid.h"
-#include "win32.h"
 
 #if _SQUID_WINDOWS_
+
+#include "fde.h"
+#include "win32.h"
+
+#include <csignal>
 #if HAVE_WIN32_PSAPI
 #include <psapi.h>
 #endif
-#ifndef _MSWSOCK_
+#if HAVE_MSWSOCK_H
 #include <mswsock.h>
 #endif
-#include <fde.h>
 
 SQUIDCEXTERN LPCRITICAL_SECTION dbg_mutex;
 void WIN32_ExceptionHandlerCleanup(void);
@@ -50,7 +53,7 @@ LONG CALLBACK WIN32_ExceptionHandler(EXCEPTION_POINTERS* ep)
     case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
 
     case EXCEPTION_IN_PAGE_ERROR:
-        death(SIGBUS);
+        raise(SIGBUS);
         break;
 
     default: