setjmp.h 1.62 KB
Newer Older
1 2 3 4
/*
 * Setjmp/Longjmp definitions
 *
 * Copyright 2001 Francois Gouget.
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 20 21
 */
#ifndef __WINE_SETJMP_H
#define __WINE_SETJMP_H
22 23

#include <crtdefs.h>
24

25 26
#include <pshpack8.h>

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
#ifdef __i386__

typedef struct __JUMP_BUFFER
{
    unsigned long Ebp;
    unsigned long Ebx;
    unsigned long Edi;
    unsigned long Esi;
    unsigned long Esp;
    unsigned long Eip;
    unsigned long Registration;
    unsigned long TryLevel;
    /* Start of new struct members */
    unsigned long Cookie;
    unsigned long UnwindFunc;
    unsigned long UnwindData[6];
} _JUMP_BUFFER;

#endif /* __i386__ */

47 48 49
#define _JBLEN                     16
#define _JBTYPE                    int
typedef _JBTYPE                    jmp_buf[_JBLEN];
50 51 52 53 54 55


#ifdef __cplusplus
extern "C" {
#endif

56 57
int __cdecl _setjmp(jmp_buf);
int __cdecl longjmp(jmp_buf,int);
58 59 60 61 62 63 64

#ifdef __cplusplus
}
#endif

#define setjmp _setjmp

65 66
#include <poppack.h>

67
#endif /* __WINE_SETJMP_H */