|
|
1.1 root 1: /***
2: *setjmp.h - definitions/declarations for setjmp/longjmp routines
3: *
1.1.1.2 root 4: * Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
1.1 root 5: *
6: *Purpose:
7: * This file defines the machine-dependent buffer used by
8: * setjmp/longjmp to save and restore the program state, and
9: * declarations for those routines.
10: * [ANSI/System V]
11: *
1.1.1.3 ! root 12: ****/
1.1 root 13:
14: #ifndef _INC_SETJMP
15:
16: #ifndef __cplusplus
17:
18:
1.1.1.3 ! root 19: /*
! 20: * Conditional macro definition for function calling type and variable type
! 21: * qualifiers.
! 22: */
! 23: #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
! 24:
! 25: /*
! 26: * Definitions for MS C8-32 (386/486) compiler
! 27: */
! 28: #define _CRTAPI1 __cdecl
! 29: #define _CRTAPI2 __cdecl
! 30:
! 31: #elif ( _MSC_VER == 600 )
! 32:
! 33: /*
! 34: * Definitions for old MS C6-386 compiler
! 35: */
! 36: #define _CRTAPI1 _cdecl
! 37: #define _CRTAPI2 _cdecl
! 38: #define _M_IX86 300
! 39:
! 40: #else
! 41:
! 42: /*
! 43: * Other compilers (e.g., MIPS)
! 44: */
! 45: #define _CRTAPI1
! 46: #define _CRTAPI2
! 47:
1.1.1.2 root 48: #endif
1.1 root 49:
50:
51:
52:
1.1.1.3 ! root 53: /*
! 54: * Definitions specific to particular setjmp implementations.
! 55: */
! 56: #ifdef _M_IX86
1.1 root 57:
1.1.1.3 ! root 58: /*
! 59: * MS C8-32 or older MS C6-386 compilers
! 60: */
! 61: #define setjmp _setjmp
1.1.1.2 root 62: #define _JBLEN 8
63:
64: #else
1.1 root 65:
1.1.1.3 ! root 66: #ifdef M_MRX000
1.1 root 67: /*
1.1.1.3 ! root 68: * Old prototype MS-MIPS compiler
1.1 root 69: */
1.1.1.2 root 70: #pragma intrinsic(_setjmp)
71: #define setjmp _setjmp
1.1.1.3 ! root 72:
1.1.1.2 root 73: #else
1.1.1.3 ! root 74: /*
! 75: * Assume compiler implements setjmp as a function
! 76: */
! 77: #define _setjmp setjmp
1.1 root 78:
1.1.1.2 root 79: #endif
1.1.1.3 ! root 80: #endif
! 81:
! 82:
! 83: #if ( defined(_M_RX000) || defined(M_MRX000) || defined(MIPS) || defined(MIPS) )
! 84: /*
! 85: * All MIPS implementation need _JBLEN of 2
! 86: */
! 87: #define _JBLEN 2
1.1 root 88:
1.1.1.2 root 89: #endif
1.1 root 90:
91:
92:
1.1.1.2 root 93:
94: /* define the buffer type for holding the state information */
95:
96: #ifndef _JMP_BUF_DEFINED
97: typedef int jmp_buf[_JBLEN];
98: #define _JMP_BUF_DEFINED
99: #endif
100:
101:
1.1 root 102: /* function prototypes */
103:
1.1.1.3 ! root 104: int _CRTAPI1 _setjmp(jmp_buf);
! 105: void _CRTAPI1 longjmp(jmp_buf, int);
1.1 root 106:
107: #endif /* __cplusplus */
108:
109: #define _INC_SETJMP
110: #endif /* _INC_SETJMP */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.