home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 March B / SCO_CASTOR4RRT.iso / uccs / root.14 / udk / usr / include / setjmp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-19  |  1.5 KB  |  67 lines

  1. /*
  2.  * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved. 
  3.  *                                                                         
  4.  *        THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE               
  5.  *                   SANTA CRUZ OPERATION INC.                             
  6.  *                                                                         
  7.  *   The copyright notice above does not evidence any actual or intended   
  8.  *   publication of such source code.                                      
  9.  */
  10.  
  11. #ifndef _JBLEN
  12. #ident    "@(#)sgs-head:i386/head/setjmp.h    1.9.5.7"
  13.  
  14. #if #machine(i860)
  15. #define _JBLEN        22
  16. #elif #machine(m68k)
  17. #define _JBLEN        40
  18. #elif #machine(m88k)
  19. #define _JBLEN        24
  20. #elif #machine(sparc)
  21. #define _JBLEN        12
  22. #else
  23. #define _JBLEN        10
  24. #endif
  25.  
  26. typedef int    jmp_buf[_JBLEN];
  27.  
  28. #if #machine(i386)
  29. #define _SIGJBLEN    128    /* (sizeof(ucontext_t) / sizeof (int)) */
  30. #elif #machine(i860)
  31. #define _SIGJBLEN    137
  32. #elif #machine(sparc)
  33. #define _SIGJBLEN    19
  34. #else
  35. #define _SIGJBLEN    64
  36. #endif
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42. extern int    setjmp(jmp_buf);
  43. extern void    longjmp(jmp_buf, int);
  44.  
  45. extern int    _setjmp(jmp_buf);
  46. extern void    _longjmp(jmp_buf, int);
  47.  
  48. #if __STDC__ - 0 == 0 || defined(_XOPEN_SOURCE) \
  49.     || defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE)
  50.  
  51. typedef int    sigjmp_buf[_SIGJBLEN];
  52.  
  53. extern int    sigsetjmp(sigjmp_buf, int);
  54. extern void    siglongjmp(sigjmp_buf, int);
  55.  
  56. #endif /*__STDC__ - 0 == 0 || ...*/
  57.  
  58. #if __STDC__ - 0 != 0
  59. #define setjmp(env)    setjmp(env)
  60. #endif
  61.  
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65.  
  66. #endif /*_JBLEN*/
  67.