Last change
on this file since 1111 was 1046, checked in by alloc, 8 years ago |
Daodan: Added Windows MinGW and build batch file
|
File size:
1.4 KB
|
Line | |
---|
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.
|
---|
6 | *
|
---|
7 | * Declarations supporting setjmp and longjump, a method for avoiding
|
---|
8 | * the normal function call return sequence. (Bleah!)
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 | #ifndef _SETJMP_H_
|
---|
13 | #define _SETJMP_H_
|
---|
14 |
|
---|
15 | /* All the headers include this file. */
|
---|
16 | #include <_mingw.h>
|
---|
17 |
|
---|
18 | #ifndef RC_INVOKED
|
---|
19 |
|
---|
20 | #ifdef __cplusplus
|
---|
21 | extern "C" {
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | /*
|
---|
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.
|
---|
30 | */
|
---|
31 | #define _JBLEN 16
|
---|
32 | #define _JBTYPE int
|
---|
33 | typedef _JBTYPE jmp_buf[_JBLEN];
|
---|
34 |
|
---|
35 | /*
|
---|
36 | * The function provided by CRTDLL which appears to do the actual work
|
---|
37 | * of setjmp.
|
---|
38 | */
|
---|
39 | _CRTIMP int __cdecl __MINGW_NOTHROW _setjmp (jmp_buf);
|
---|
40 |
|
---|
41 | #define setjmp(x) _setjmp(x)
|
---|
42 |
|
---|
43 | /*
|
---|
44 | * Return to the last setjmp call and act as if setjmp had returned
|
---|
45 | * nVal (which had better be non-zero!).
|
---|
46 | */
|
---|
47 | _CRTIMP void __cdecl __MINGW_NOTHROW longjmp (jmp_buf, int) __MINGW_ATTRIB_NORETURN;
|
---|
48 |
|
---|
49 | #ifdef __cplusplus
|
---|
50 | }
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | #endif /* Not RC_INVOKED */
|
---|
54 |
|
---|
55 | #endif /* Not _SETJMP_H_ */
|
---|
56 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.