home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / gcl-1.000 / gcl-1 / gcl-1.0 / dos / signal.h < prev   
Encoding:
C/C++ Source or Header  |  1992-11-23  |  4.7 KB  |  138 lines

  1. /* This is file signal.h */
  2. /* This file may have been modified by DJ Delorie (Jan 1991).  If so,
  3. ** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave,
  4. ** Rochester NH, 03867-2954, USA.
  5. */
  6.  
  7. /* This may look like C code, but it is really -*- C++ -*- */
  8. /* 
  9. Copyright (C) 1989 Free Software Foundation
  10.     written by Doug Lea (dl@rocky.oswego.edu)
  11.  
  12. This file is part of GNU CC.
  13.  
  14. GNU CC is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY.  No author or distributor
  16. accepts responsibility to anyone for the consequences of using it
  17. or for whether it serves any particular purpose or works at all,
  18. unless he says so in writing.  Refer to the GNU CC General Public
  19. License for full details.
  20.  
  21. Everyone is granted permission to copy, modify and redistribute
  22. GNU CC, but only under the conditions described in the
  23. GNU CC General Public License.   A copy of this license is
  24. supposed to have been given to you along with GNU CC so you
  25. can know your rights and responsibilities.  It should be in a
  26. file named COPYING.  Among other things, the copyright notice
  27. and this notice must be preserved on all copies.  
  28. */
  29.  
  30. #ifndef _signal_h
  31. #pragma once
  32.  
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. /* This #define KERNEL hack gets around bad function prototypes on most */
  39. /* systems. If not, you need to do some real work... */
  40. /*******************
  41. * #define KERNEL
  42. * #include <sys/signal.h>
  43. * #undef KERNEL
  44. ********************/
  45.  
  46. #ifndef _signal_h
  47. #define _signal_h 1
  48. #endif
  49.  
  50. /* The Interviews folks call this SignalHandler. Might as well conform. */
  51. /* Beware: some systems think that SignalHandler returns int. */
  52. typedef void (*SignalHandler) ();
  53.  
  54. extern SignalHandler signal(int sig, SignalHandler action);
  55. extern SignalHandler sigset(int sig, SignalHandler action);
  56. extern SignalHandler ssignal(int sig, SignalHandler action);
  57. extern int           gsignal (int sig);
  58. extern int           kill (int pid, int sig);
  59.  
  60. #ifndef hpux /* Interviews folks claim that hpux doesn't like these */
  61. struct sigvec;
  62. extern int           sigsetmask(int mask);
  63. extern int           sigblock(int mask);
  64. extern int           sigpause(int mask);
  65. extern int           sigvec(int sig, struct sigvec* v, struct sigvec* prev);
  66. #endif
  67.  
  68. /* The Interviews version also has these ... */
  69.  
  70. #define SignalBad ((SignalHandler)-1)
  71. #define SignalDefault ((SignalHandler)0)
  72. #define SignalIgnore ((SignalHandler)1)
  73.  
  74. #ifdef __cplusplus
  75. }
  76. #endif
  77. #define _SIGNAL_H
  78. /** #include <signum.h>    **/
  79. #ifdef    _SIGNAL_H
  80.  
  81. /* This file defines the fake signal functions and signal
  82.    number constants for 4.2 or 4.3 BSD-derived Unix system.  */
  83.  
  84. #define    SIG_DFL    0
  85. #if 0
  86. /*#ifndef SIG_DFL*/
  87. /* Fake signal functions.
  88.    These lines MUST be split!  m4 will not change them otherwise.  */
  89. #define    SIG_ERR    /* Error return.  */    \
  90.     ((void EXFUN((*), (int sig))) -1)
  91. #define    SIG_DFL    /* Default action.  */    \
  92.     ((void EXFUN((*), (int sig))) 0)
  93. #define    SIG_IGN    /* Ignore signal.  */    \
  94.     ((void EXFUN((*), (int sig))) 1)
  95.  
  96. #endif
  97. /* Signals.  */
  98. #define    SIGHUP        1    /* Hangup (POSIX).  */
  99. #define    SIGINT        2    /* Interrupt (ANSI).  */
  100. #define    SIGQUIT        3    /* Quit (POSIX).  */
  101. #define    SIGILL        4    /* Illegal instruction (ANSI).  */
  102. #define    SIGABRT        SIGIOT    /* Abort (ANSI).  */
  103. #define    SIGTRAP        5    /* Trace trap (POSIX).  */
  104. #define    SIGIOT        6    /* IOT trap (4.2 BSD).  */
  105. #define    SIGEMT        7    /* EMT trap (4.2 BSD).  */
  106. #define    SIGFPE        8    /* Floating-point exception (ANSI).  */
  107. #define    SIGKILL        9    /* Kill, unblockable (POSIX).  */
  108. #define    SIGBUS        10    /* Bus error (4.2 BSD).  */
  109. #define    SIGSEGV        11    /* Segmentation violation (ANSI).  */
  110. #define    SIGSYS        12    /* Bad argument to system call (4.2 BSD)*/
  111. #define    SIGPIPE        13    /* Broken pipe (POSIX).  */
  112. #define    SIGALRM        14    /* Alarm clock (POSIX).  */
  113. #define    SIGTERM        15    /* Termination (ANSI).  */
  114. #define    SIGURG        16    /* Urgent condition on socket (4.2 BSD).*/
  115. #define    SIGSTOP        17    /* Stop, unblockable (POSIX).  */
  116. #define    SIGTSTP        18    /* Keyboard stop (POSIX).  */
  117. #define    SIGCONT        19    /* Continue (POSIX).  */
  118. #define    SIGCHLD        20    /* Child status has changed (POSIX).  */
  119. #define    SIGCLD        SIGCHLD    /* Same as SIGCHLD (System V).  */
  120. #define    SIGTTIN        21    /* Background read from tty (POSIX).  */
  121. #define    SIGTTOU        22    /* Background write to tty (POSIX).  */
  122. #define    SIGIO        23    /* I/O now possible (4.2 BSD).  */
  123. #define    SIGPOLL        SIGIO    /* Same as SIGIO? (SVID).  */
  124. #define    SIGXCPU        24    /* CPU limit exceeded (4.2 BSD).  */
  125. #define    SIGXFSZ        25    /* File size limit exceeded (4.2 BSD).  */
  126. #define    SIGVTALRM    26    /* Virtual alarm clock (4.2 BSD).  */
  127. #define    SIGPROF        27    /* Profiling alarm clock (4.2 BSD).  */
  128. #define    SIGWINCH    28    /* Window size change (4.3 BSD, Sun).  */
  129. #define    SIGUSR1        30    /* User-defined signal 1 (POSIX).  */
  130. #define    SIGUSR2        31    /* User-defined signal 2 (POSIX).  */
  131.  
  132. #endif    /* <signal.h> included.  */
  133.  
  134. #define    _NSIG        32    /* Biggest signal number + 1.  */
  135.  
  136. #endif
  137.  
  138.