setjmp.h revision 32641
132641Sjb/* $Id: setjmp.h,v 1.1 1998/01/10 23:04:51 jb Exp $ */
232411Sjb/*
332411Sjb * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
432411Sjb * All rights reserved.
532411Sjb *
632411Sjb * Redistribution and use in source and binary forms, with or without
732411Sjb * modification, are permitted provided that the following conditions
832411Sjb * are met:
932411Sjb * 1. Redistributions of source code must retain the above copyright
1032411Sjb *    notice, this list of conditions and the following disclaimer.
1132411Sjb * 2. Redistributions in binary form must reproduce the above copyright
1232411Sjb *    notice, this list of conditions and the following disclaimer in the
1332411Sjb *    documentation and/or other materials provided with the distribution.
1432411Sjb * 3. All advertising materials mentioning features or use of this software
1532411Sjb *    must display the following acknowledgement:
1632411Sjb *	This product includes software developed by John Birrell.
1732411Sjb * 4. Neither the name of the author nor the names of any co-contributors
1832411Sjb *    may be used to endorse or promote products derived from this software
1932411Sjb *    without specific prior written permission.
2032411Sjb *
2132411Sjb * THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
2232411Sjb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2332411Sjb * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2432411Sjb * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2532411Sjb * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2632411Sjb * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2732411Sjb * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2832411Sjb * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2932411Sjb * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3032411Sjb * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3132411Sjb * SUCH DAMAGE.
3232411Sjb *
3332411Sjb */
3432411Sjb
3532411Sjb#define	_JBLEN	8		/* Size of the jmp_buf on x86. */
3632641Sjb
3732641Sjb/*
3832641Sjb * jmp_buf and sigjmp_buf are encapsulated in different structs to force
3932641Sjb * compile-time diagnostics for mismatches.  The structs are the same
4032641Sjb * internally to avoid some run-time errors for mismatches.
4132641Sjb */
4232641Sjb#ifndef _ANSI_SOURCE
4332641Sjbtypedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
4432641Sjb#endif /* not ANSI */
4532641Sjb
4632641Sjbtypedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];
47