From 3653528ae517d4b8f875226fe2cc6bda155e66b1 Mon Sep 17 00:00:00 2001 From: David Williams Date: Wed, 26 Dec 2012 16:44:34 +0100 Subject: [PATCH] POLYVOX_HALT() implementation for Linux. --- .../include/PolyVoxCore/Impl/ErrorHandling.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h index b99f0278..15570bb9 100644 --- a/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h +++ b/library/PolyVoxCore/include/PolyVoxCore/Impl/ErrorHandling.h @@ -24,11 +24,17 @@ freely, subject to the following restrictions: #ifndef __PolyVox_ErrorHandling_H__ #define __PolyVox_ErrorHandling_H__ -#include +#include //For std::exit +#include //For std::cerr #define POLYVOX_ASSERTS_ENABLED -#define POLYVOX_HALT() __debugbreak() +#if defined(_MSC_VER) + #define POLYVOX_HALT() __debugbreak() +#else + #define POLYVOX_HALT() std::exit(EXIT_FAILURE) +#endif + #define POLYVOX_UNUSED(x) do { (void)sizeof(x); } while(0) /*