aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/Signals/Exts.hsc
blob: a8893404d690a4dbd6a4375161c8c35eb3718b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifdef __GLASGOW_HASKELL__
#if defined(SIGINFO) || defined(SIGWINCH)
{-# LANGUAGE Trustworthy #-}
#else
{-# LANGUAGE Safe #-}
#endif
#endif

-----------------------------------------------------------------------------
-- |
-- Module      :  System.Posix.Signals.Exts
-- Copyright   :  (c) The University of Glasgow 2002
-- License     :  BSD-style (see the file libraries/base/LICENSE)
-- 
-- Maintainer  :  libraries@haskell.org
-- Stability   :  provisional
-- Portability :  non-portable (requires POSIX, includes Linuxisms/BSDisms)
--
-- non-POSIX signal support commonly available
--
-----------------------------------------------------------------------------

#include "HsUnix.h"

module System.Posix.Signals.Exts (
  module System.Posix.Signals

#ifdef SIGINFO
  , infoEvent, sigINFO
#endif
#ifdef SIGWINCH
  , windowChange, sigWINCH
#endif

  ) where

import Foreign.C
import System.Posix.Signals

#ifdef __HUGS__
# ifdef SIGINFO
sigINFO   = (#const SIGINFO)   :: CInt
# endif
# ifdef SIGWINCH
sigWINCH  = (#const SIGWINCH)  :: CInt
# endif
#else /* !HUGS */
# ifdef SIGINFO
foreign import ccall unsafe "__hsunix_SIGINFO"   sigINFO   :: CInt
# endif
# ifdef SIGWINCH
foreign import ccall unsafe "__hsunix_SIGWINCH"   sigWINCH   :: CInt
# endif
#endif /* !HUGS */

#ifdef SIGINFO
infoEvent :: Signal
infoEvent = sigINFO
#endif

#ifdef SIGWINCH
windowChange :: Signal
windowChange = sigWINCH
#endif