Updated for Git 1.7.3.2
[msysgit/mtrensch.git] / mingw / include / setjmp.h
blob96eb5bd659d4457bd50271c966ae895261e431a2
1 /*
2 * setjmp.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
7 * Declarations supporting setjmp and longjump, a method for avoiding
8 * the normal function call return sequence. (Bleah!)
12 #ifndef _SETJMP_H_
13 #define _SETJMP_H_
15 /* All the headers include this file. */
16 #include <_mingw.h>
18 #ifndef RC_INVOKED
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
25 * The buffer used by setjmp to store the information used by longjmp
26 * to perform it's evil goto-like work. The size of this buffer was
27 * determined through experimentation; it's contents are a mystery.
28 * NOTE: This was determined on an i386 (actually a Pentium). The
29 * contents could be different on an Alpha or something else.
31 #define _JBLEN 16
32 #define _JBTYPE int
33 typedef _JBTYPE jmp_buf[_JBLEN];
36 * The function provided by CRTDLL which appears to do the actual work
37 * of setjmp.
39 _CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
41 #define setjmp(x) _setjmp(x)
44 * Return to the last setjmp call and act as if setjmp had returned
45 * nVal (which had better be non-zero!).
47 _CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN;
49 #ifdef __cplusplus
51 #endif
53 #endif /* Not RC_INVOKED */
55 #endif /* Not _SETJMP_H_ */