X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fwin32%2Fseh_excn.h;h=8829e840b7aa70f679d31b4ed01ccd0f97e92eb5;hb=b2bd63f99d643f6b3eb30bb72bb9ae26d4183252;hp=410d4308717b21f2f55172cd2fe02ddf6513117a;hpb=49b8105e8d56c90099234e31c32ba3f1643276fe;p=ghc-hetmet.git diff --git a/rts/win32/seh_excn.h b/rts/win32/seh_excn.h index 410d430..8829e84 100644 --- a/rts/win32/seh_excn.h +++ b/rts/win32/seh_excn.h @@ -1,5 +1,6 @@ -#ifndef __SEH_EXCN_H__ -#define __SEH_EXCN_H__ +#ifndef WIN32_SEH_EXCN_H +#define WIN32_SEH_EXCN_H + #include #include @@ -24,11 +25,11 @@ * * seh_excn provides two macros, BEGIN_CATCH and END_CATCH, which * will catch such exceptions in the code they bracket and die by - * printing a message and calling exit(1). + * printing a message and calling stg_exit(1). */ -#define ON_DIV_ZERO fprintf(stdout,"divide by zero\n"); fflush(stdout);exit(1) -#define ON_STACK_OVERFLOW fprintf(stdout,"C stack overflow in generated code\n"); fflush(stdout); exit(1) -#define ON_SIGSEGV fprintf(stdout,"Segmentation fault/access violation in generated code\n"); fflush(stdout); exit(1) +#define ON_DIV_ZERO fprintf(stdout,"divide by zero\n"); fflush(stdout);stg_exit(1) +#define ON_STACK_OVERFLOW fprintf(stdout,"C stack overflow in generated code\n"); fflush(stdout); stg_exit(1) +#define ON_SIGSEGV fprintf(stdout,"Segmentation fault/access violation in generated code\n"); fflush(stdout); stg_exit(1) #if defined(__MINGW32__) extern jmp_buf seh_unwind_to; @@ -84,8 +85,8 @@ catchDivZero(struct _EXCEPTION_RECORD*, } \ } #else -#error Don't know what sort of Windows system this is +#error Cannot determine what sort of Windows system this is #endif -#endif /* __SEH_EXCN_H__ */ +#endif /* WIN32_SEH_EXCN_H */