home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / GNU_1OF3.ZIP / HEADERS.ZIP / g++-include / signal.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-04  |  2.3 KB  |  73 lines

  1. // This may look like C code, but it is really -*- C++ -*-
  2. /* 
  3. Copyright (C) 1989 Free Software Foundation
  4.     written by Doug Lea (dl@rocky.oswego.edu)
  5.  
  6. This file is part of the GNU C++ Library.  This library is free
  7. software; you can redistribute it and/or modify it under the terms of
  8. the GNU Library General Public License as published by the Free
  9. Software Foundation; either version 2 of the License, or (at your
  10. option) any later version.  This library is distributed in the hope
  11. that it will be useful, but WITHOUT ANY WARRANTY; without even the
  12. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  13. PURPOSE.  See the GNU Library General Public License for more details.
  14. You should have received a copy of the GNU Library General Public
  15. License along with this library; if not, write to the Free Software
  16. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18.  
  19. #ifndef _signal_h
  20.  
  21. extern "C" {
  22.  
  23. #ifdef __signal_h_recursive
  24. #include_next <signal.h>
  25. #else
  26.  
  27. #define __signal_h_recursive
  28.  
  29. #define signal __hide_signal
  30. #include_next <signal.h>
  31. #undef signal
  32.  
  33. #define _signal_h 1
  34.  
  35. // The Interviews folks call this SignalHandler. Might as well conform.
  36. // Beware: some systems think that SignalHandler returns int.
  37. typedef void (*SignalHandler) (...);
  38.  
  39. extern SignalHandler signal(int sig, SignalHandler action);
  40. extern SignalHandler sigset(int sig, SignalHandler action);
  41. extern SignalHandler ssignal(int sig, SignalHandler action);
  42. extern int           gsignal (int sig);
  43. extern int           kill (pid_t, int);
  44. extern int           killpg(pid_t, int);
  45. extern int           siginterrupt(int, int);
  46. extern void          psignal(unsigned, const char*);
  47.  
  48. #ifndef hpux // Interviews folks claim that hpux doesn't like these
  49. extern int           sigsetmask(int mask);
  50. extern int           sigblock(int mask);
  51. extern int           sigpause(int mask);
  52. extern int           sigvec(int sig, struct sigvec* v, struct sigvec* prev);
  53. #endif
  54.  
  55. // The Interviews version also has these ...
  56.  
  57. #define SignalBad ((SignalHandler)-1)
  58. #define SignalDefault ((SignalHandler)0)
  59. #define SignalIgnore ((SignalHandler)1)
  60.  
  61. #undef BADSIG
  62. #undef SIG_DFL
  63. #undef SIG_IGN
  64. #define BAD_SIG SignalBad
  65. #define SIG_DFL SignalDefault
  66. #define SIG_IGN SignalIgnore
  67.  
  68. #endif
  69. }
  70.  
  71. #endif
  72.  
  73.