setjmp.h revision 1539
1263970Sdes/*- 2180744Sdes * Copyright (c) 1990, 1993 3180744Sdes * The Regents of the University of California. All rights reserved. 4180744Sdes * (c) UNIX System Laboratories, Inc. 5180744Sdes * All or some portions of this file are derived from material licensed 6180744Sdes * to the University of California by American Telephone and Telegraph 7180744Sdes * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8180744Sdes * the permission of UNIX System Laboratories, Inc. 9180744Sdes * 10180744Sdes * Redistribution and use in source and binary forms, with or without 11180744Sdes * modification, are permitted provided that the following conditions 12180744Sdes * are met: 13180744Sdes * 1. Redistributions of source code must retain the above copyright 14180744Sdes * notice, this list of conditions and the following disclaimer. 15180744Sdes * 2. Redistributions in binary form must reproduce the above copyright 16180744Sdes * notice, this list of conditions and the following disclaimer in the 17180744Sdes * documentation and/or other materials provided with the distribution. 18180744Sdes * 3. All advertising materials mentioning features or use of this software 19180744Sdes * must display the following acknowledgement: 20180744Sdes * This product includes software developed by the University of 21180744Sdes * California, Berkeley and its contributors. 22180744Sdes * 4. Neither the name of the University nor the names of its contributors 23180744Sdes * may be used to endorse or promote products derived from this software 24180744Sdes * without specific prior written permission. 25180744Sdes * 26180744Sdes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 27180744Sdes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 28180744Sdes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 29180744Sdes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 30180744Sdes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31180744Sdes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32180744Sdes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33180744Sdes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34180744Sdes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35180744Sdes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36180744Sdes * SUCH DAMAGE. 37180744Sdes * 38180744Sdes * @(#)setjmp.h 8.2 (Berkeley) 1/21/94 39180744Sdes */ 40180744Sdes 41180744Sdes#ifndef _SETJMP_H_ 42180744Sdes#define _SETJMP_H_ 43180744Sdes 44180744Sdes#if defined(hp300) || defined(__hp300__) || defined(luna68k) || defined(__luna68k__) 45180744Sdes#define _JBLEN 17 46180744Sdes#endif 47180744Sdes 48180744Sdes#if defined(i386) || defined(__i386__) 49180744Sdes#define _JBLEN 10 50180744Sdes#endif 51180744Sdes 52180744Sdes#if defined(mips) || defined(__mips__) 53180744Sdes#define _JBLEN 83 54180744Sdes#endif 55251135Sdes 56180744Sdes#if defined(sparc) || defined(__sparc__) 57251135Sdes#define _JBLEN 10 58251135Sdes#endif 59251135Sdes 60251135Sdes#if defined(tahoe) || defined(__tahoe__) 61251135Sdes#define _JBLEN 10 62251135Sdes#endif 63251135Sdes 64180744Sdes#if defined(vax) || defined(__vax__) 65180744Sdes#define _JBLEN 10 66180744Sdes#endif 67180744Sdes 68180744Sdes#ifndef _ANSI_SOURCE 69180744Sdes/* 70180744Sdes * WARNING: sigsetjmp() isn't supported yet, this is a placeholder. 71180744Sdes */ 72180744Sdestypedef int sigjmp_buf[_JBLEN + 1]; 73180744Sdes#endif /* not ANSI */ 74180744Sdes 75180744Sdestypedef int jmp_buf[_JBLEN]; 76180744Sdes 77180746Sdes#include <sys/cdefs.h> 78180744Sdes 79180744Sdes__BEGIN_DECLS 80180744Sdesint setjmp __P((jmp_buf)); 81180744Sdesvoid longjmp __P((jmp_buf, int)); 82180744Sdes 83180744Sdes#ifndef _ANSI_SOURCE 84180744Sdes/* 85180744Sdes * WARNING: sigsetjmp() isn't supported yet, this is a placeholder. 86180744Sdes */ 87180744Sdesint sigsetjmp __P((sigjmp_buf, int)); 88180744Sdesvoid siglongjmp __P((sigjmp_buf, int)); 89180744Sdes#endif /* not ANSI */ 90180744Sdes 91180744Sdes#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 92180744Sdesint _setjmp __P((jmp_buf)); 93180744Sdesvoid _longjmp __P((jmp_buf, int)); 94180744Sdesvoid longjmperror __P((void)); 95180744Sdes#endif /* neither ANSI nor POSIX */ 96180744Sdes__END_DECLS 97180744Sdes 98180744Sdes#endif /* !_SETJMP_H_ */ 99180744Sdes