home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / libc / signal.h < prev    next >
Text File  |  1999-03-15  |  3KB  |  86 lines

  1. #if __IBMC__ || __IBMCPP__
  2. #pragma info( none )
  3. #ifndef __CHKHDR__
  4.    #pragma info( none )
  5. #endif
  6. #pragma info( restore )
  7. #endif
  8.  
  9. #ifndef __signal_h
  10.    #define __signal_h
  11.  
  12.    #ifdef __cplusplus
  13.       extern "C" {
  14.    #endif
  15.  
  16.    #ifndef  _LNK_CONV
  17.       #if __IBMC__ || __IBMCPP__ || defined(_OPTLINK_SUPPORTED)
  18.          #define _LNK_CONV   _Optlink
  19.       #else
  20.          #define _LNK_CONV
  21.       #endif
  22.    #endif
  23.  
  24.    #ifndef _IMPORT
  25.       #ifdef __IMPORTLIB__
  26.          #define _IMPORT _Import
  27.       #else
  28.          #define _IMPORT
  29.       #endif
  30.    #endif
  31.  
  32.    /********************************************************************/
  33.    /*  <signal.h> header file                                          */
  34.    /*                                                                  */
  35.    /*  (C) Copyright IBM Corp. 1991, 1995.                             */
  36.    /*  - Licensed Material - Program-Property of IBM                   */
  37.    /*  - All rights reserved                                           */
  38.    /*                                                                  */
  39.    /********************************************************************/
  40.  
  41.    #ifndef __sig_atomic_t
  42.       typedef int sig_atomic_t;
  43.       #define __sig_atomic_t
  44.    #endif
  45.  
  46.    /* signal types */
  47.    #define SIGILL       1       /* illegal instruction - invalid function image    */
  48.    #define SIGSEGV      2       /* invalid access to memory                        */
  49.    #define SIGFPE       3       /* floating point exception                        */
  50.    #define SIGTERM      4       /* OS/2 SIGTERM (killprocess) signal               */
  51.    #define SIGABRT      5       /* abort() signal                                  */
  52.    #define SIGINT       6       /* OS/2 SIGINTR signal                             */
  53.    #define SIGUSR1      7       /* user exception in range 0xa0000000 - 0xbfffffff */
  54.    #define SIGUSR2      8       /* user exception in range 0xc0000000 - 0xdfffffff */
  55.    #define SIGUSR3      9       /* user exception in range 0xe0000000 - 0xffffffff */
  56.    #define SIGBREAK    10       /* OS/2 Ctrl-Break sequence                        */
  57.  
  58.    typedef void (*_SigFunc)(int);
  59.  
  60.    /* signal action codes */
  61.    #define SIG_DFL ((_SigFunc)0)   /* default signal action */
  62.    #define SIG_IGN ((_SigFunc)1)   /* ignore */
  63.  
  64.    /* signal error value (returned by signal call on error) */
  65.    #define SIG_ERR ((_SigFunc)-1)  /* signal error value */
  66.  
  67.    /* function prototypes */
  68.  
  69.    extern _SigFunc _IMPORT _LNK_CONV signal( int, _SigFunc );
  70.    extern int _IMPORT _LNK_CONV raise( int );
  71.  
  72.    #ifdef __cplusplus
  73.       }
  74.    #endif
  75.  
  76. #endif
  77.  
  78. #if __IBMC__ || __IBMCPP__
  79. #pragma info( none )
  80. #ifndef __CHKHDR__
  81.    #pragma info( restore )
  82. #endif
  83. #pragma info( restore )
  84. #endif
  85.  
  86.