home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 25.ddi / root.2 / usr / ucbinclude / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.1 KB  |  86 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10.  
  11. #ident    "@(#)//usr/ucbinclude/setjmp.h.sl 1.1 4.0 12/08/90 19574 AT&T-USL"
  12.  
  13. /*******************************************************************
  14.  
  15.         PROPRIETARY NOTICE (Combined)
  16.  
  17. This source code is unpublished proprietary information
  18. constituting, or derived under license from AT&T's UNIX(r) System V.
  19. In addition, portions of such source code were derived from Berkeley
  20. 4.3 BSD under license from the Regents of the University of
  21. California.
  22.  
  23.  
  24.  
  25.         Copyright Notice 
  26.  
  27. Notice of copyright on this source code product does not indicate 
  28. publication.
  29.  
  30.     (c) 1986,1987,1988,1989  Sun Microsystems, Inc
  31.     (c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
  32.               All rights reserved.
  33. ********************************************************************/ 
  34.  
  35. /*
  36.  * 4.3BSD setjmp compatibility header
  37.  *
  38.  * 4.3BSD setjmp/longjmp is equivalent to SVR4 sigsetjmp/siglongjmp -
  39.  * 4.3BSD _setjmp/_longjmp is equivalent to SVR4 setjmp/longjmp
  40.  */
  41.  
  42. #ifndef _SETJMP_H
  43. #define _SETJMP_H
  44.  
  45. #include <sys/types.h>
  46. #include <sys/signal.h>
  47. #include <sys/siginfo.h>
  48. #ifdef i386
  49. #include <sys/tss.h>
  50. #else
  51. #include <sys/psw.h>
  52. #include <sys/pcb.h>
  53. #include <sys/mau.h>
  54. #endif
  55. #include <sys/ucontext.h>
  56.  
  57. #define _JBLEN        ((sizeof(ucontext_t)+sizeof(int)-1)/sizeof(int))
  58. #define _SIGJBLEN    _JBLEN
  59.  
  60. typedef int jmp_buf[_JBLEN];
  61.  
  62. #define sigjmp_buf     jmp_buf
  63.  
  64. #if defined(__STDC__)
  65.  
  66. #if __STDC__ == 0    /* non-ANSI standard compilation */
  67. extern int    _setjmp(jmp_buf);
  68. extern void    _longjmp(jmp_buf, int);
  69. extern int    setjmp(jmp_buf);
  70. extern void    longjmp(jmp_buf, int);
  71. extern int    sigsetjmp(sigjmp_buf, int);
  72. extern void    siglongjmp(sigjmp_buf, int);
  73.  
  74. #else
  75. extern int    _setjmp();
  76. extern void    _longjmp();
  77. extern int    setjmp();
  78. extern void    longjmp();
  79. extern int    sigsetjmp();
  80. extern void    siglongjmp();
  81. #endif  /* __STDC__ */
  82.  
  83. #endif
  84.  
  85. #endif  /* _SETJMP_H */
  86.