merge in netbsd changes.
[unix-history] / usr / src / include / setjmp.h
CommitLineData
9f015abc 1/*-
56559b70
KB
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
af8b0f8a
KB
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9f015abc
KB
9 *
10 * %sccs.include.redist.c%
11 *
af8b0f8a 12 * @(#)setjmp.h 8.2 (Berkeley) %G%
9f015abc 13 */
21e51ba9 14
91befe9c
KB
15#ifndef _SETJMP_H_
16#define _SETJMP_H_
caf5d079 17
473c3377 18#if defined(hp300) || defined(__hp300__) || defined(luna68k) || defined(__luna68k__)
a96588ae
KB
19#define _JBLEN 17
20#endif
21
b1bbedcc 22#if defined(i386) || defined(__i386__)
caf5d079
KM
23#define _JBLEN 10
24#endif
25
8b171282
RC
26#if defined(mips) || defined(__mips__)
27#define _JBLEN 83
28#endif
29
3543c52f
CT
30#if defined(sparc) || defined(__sparc__)
31#define _JBLEN 10
32#endif
33
b1bbedcc 34#if defined(tahoe) || defined(__tahoe__)
caf5d079
KM
35#define _JBLEN 10
36#endif
37
b1bbedcc 38#if defined(vax) || defined(__vax__)
a96588ae 39#define _JBLEN 10
caf5d079
KM
40#endif
41
59c161d4 42#ifndef _ANSI_SOURCE
a96588ae 43/*
59c161d4 44 * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
a96588ae
KB
45 */
46typedef int sigjmp_buf[_JBLEN + 1];
59c161d4 47#endif /* not ANSI */
a96588ae 48
caf5d079
KM
49typedef int jmp_buf[_JBLEN];
50
91befe9c
KB
51#include <sys/cdefs.h>
52
53__BEGIN_DECLS
59c161d4
DS
54int setjmp __P((jmp_buf));
55void longjmp __P((jmp_buf, int));
56
57#ifndef _ANSI_SOURCE
58/*
59 * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
60 */
61int sigsetjmp __P((sigjmp_buf, int));
62void siglongjmp __P((sigjmp_buf, int));
63#endif /* not ANSI */
64
65#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
66int _setjmp __P((jmp_buf));
67void _longjmp __P((jmp_buf, int));
68void longjmperror __P((void));
69#endif /* neither ANSI nor POSIX */
91befe9c
KB
70__END_DECLS
71
72#endif /* !_SETJMP_H_ */