--- mstools/h/setjmp.h 2018/08/09 18:20:01 1.1 +++ mstools/h/setjmp.h 2018/08/09 18:20:27 1.1.1.2 @@ -1,7 +1,7 @@ /*** *setjmp.h - definitions/declarations for setjmp/longjmp routines * -* Copyright (c) 1985-1991, Microsoft Corporation. All rights reserved. +* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved. * *Purpose: * This file defines the machine-dependent buffer used by @@ -16,30 +16,50 @@ #ifndef __cplusplus +#ifndef MIPS #if (_MSC_VER <= 600) #define __cdecl _cdecl #endif +#endif -/* define the buffer type for holding the state information */ -#ifndef _JMP_BUF_DEFINED -typedef int jmp_buf[6]; -#define _JMP_BUF_DEFINED -#endif +#ifdef i386 +#define setjmp _setjmp +#define _JBLEN 8 + +#else /* * _setjmp compiler intrinsic does not work with current Win32 * implementation so map it to setjmp */ -#define _setjmp setjmp +#ifdef M_MRX000 +#pragma intrinsic(_setjmp) +#define setjmp _setjmp +#else +#define _setjmp setjmp +#endif +#ifdef MIPS +#define _JBLEN 2 /* virtual frame and target ip */ +#endif +#endif + +/* define the buffer type for holding the state information */ + +#ifndef _JMP_BUF_DEFINED +typedef int jmp_buf[_JBLEN]; +#define _JMP_BUF_DEFINED +#endif + + /* function prototypes */ int _setjmp(jmp_buf);