setjmp.h revision 66739
10Sstevel@tonic-gate/* $FreeBSD: head/sys/amd64/include/setjmp.h 66739 2000-10-06 11:53:32Z bde $ */
20Sstevel@tonic-gate/*
30Sstevel@tonic-gate * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
40Sstevel@tonic-gate * All rights reserved.
50Sstevel@tonic-gate *
60Sstevel@tonic-gate * Redistribution and use in source and binary forms, with or without
70Sstevel@tonic-gate * modification, are permitted provided that the following conditions
80Sstevel@tonic-gate * are met:
90Sstevel@tonic-gate * 1. Redistributions of source code must retain the above copyright
100Sstevel@tonic-gate *    notice, this list of conditions and the following disclaimer.
110Sstevel@tonic-gate * 2. Redistributions in binary form must reproduce the above copyright
120Sstevel@tonic-gate *    notice, this list of conditions and the following disclaimer in the
130Sstevel@tonic-gate *    documentation and/or other materials provided with the distribution.
140Sstevel@tonic-gate * 3. All advertising materials mentioning features or use of this software
150Sstevel@tonic-gate *    must display the following acknowledgement:
160Sstevel@tonic-gate *	This product includes software developed by John Birrell.
170Sstevel@tonic-gate * 4. Neither the name of the author nor the names of any co-contributors
180Sstevel@tonic-gate *    may be used to endorse or promote products derived from this software
190Sstevel@tonic-gate *    without specific prior written permission.
200Sstevel@tonic-gate *
210Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
220Sstevel@tonic-gate * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
230Sstevel@tonic-gate * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
240Sstevel@tonic-gate * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
250Sstevel@tonic-gate * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
260Sstevel@tonic-gate * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
270Sstevel@tonic-gate * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
280Sstevel@tonic-gate * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 */
34
35#define	_JBLEN	11		/* Size of the jmp_buf on x86. */
36
37/*
38 * jmp_buf and sigjmp_buf are encapsulated in different structs to force
39 * compile-time diagnostics for mismatches.  The structs are the same
40 * internally to avoid some run-time errors for mismatches.
41 */
42#ifndef _ANSI_SOURCE
43typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
44#endif /* not ANSI */
45
46typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1];
47