X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Finterpreter%2Fconnect.h;h=a93a265543b0e381667f6b1dc76d65e1d1cf022b;hb=525898a970c625753c33490318762c2b4c2770a9;hp=52d894aed21a72f2297070b2f2b75c12d941751f;hpb=9f0b4b7582b3e98ea80c20a142e1b97825c92a99;p=ghc-hetmet.git diff --git a/ghc/interpreter/connect.h b/ghc/interpreter/connect.h index 52d894a..a93a265 100644 --- a/ghc/interpreter/connect.h +++ b/ghc/interpreter/connect.h @@ -9,8 +9,8 @@ * included in the distribution. * * $RCSfile: connect.h,v $ - * $Revision: 1.42 $ - * $Date: 2000/05/12 11:59:38 $ + * $Revision: 1.44 $ + * $Date: 2000/06/28 10:42:17 $ * ------------------------------------------------------------------------*/ /* -------------------------------------------------------------------------- @@ -362,7 +362,7 @@ extern Void machdep ( Int ); extern Void liftControl ( Int ); extern Void substitution ( Int ); extern Void typeChecker ( Int ); -extern Void interface ( Int ); +extern Void interfayce ( Int ); extern Void storage ( Int ); @@ -566,6 +566,9 @@ extern HugsBreakAction setBreakAction ( HugsBreakAction ); to get the signal mask to a sane state each time. */ #include + +#if !defined(mingw32_TARGET_OS) + #define setHandler(bh) { sigset_t mask; \ signal(SIGINT,bh); \ sigemptyset(&mask); \ @@ -573,6 +576,13 @@ extern HugsBreakAction setBreakAction ( HugsBreakAction ); sigprocmask(SIG_UNBLOCK, &mask, NULL); \ } +#else + +#define setHandler(bh) { void* old_hdlr = signal(SIGINT,bh);\ + if (old_hdlr == SIG_ERR) internal("setHandler"); \ + } + +#endif /* !defined(mingw32_TARGET_OS) */ /*--------------------------------------------------------------------------- * Environment variables and the registry