BSD 4_3_Reno release
[unix-history] / usr / src / include / setjmp.h
CommitLineData
9f015abc
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
1c15e888
C
5 * Redistribution and use in source and binary forms are permitted
6 * provided that: (1) source distributions retain this entire copyright
7 * notice and comment, and (2) distributions including binaries display
8 * the following acknowledgement: ``This product includes software
9 * developed by the University of California, Berkeley and its contributors''
10 * in the documentation or other materials provided with the distribution
11 * and in all advertising materials mentioning features or use of this
12 * software. Neither the name of the University nor the names of its
13 * contributors may be used to endorse or promote products derived
14 * from this software without specific prior written permission.
15 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
9f015abc 18 *
1c15e888 19 * @(#)setjmp.h 5.2 (Berkeley) 5/29/90
9f015abc 20 */
21e51ba9 21
caf5d079
KM
22#ifndef _SETJMP_
23#define _SETJMP_
24
a96588ae
KB
25#ifdef hp300
26#define _JBLEN 17
27#endif
28
29#ifdef i386
caf5d079
KM
30#define _JBLEN 10
31#endif
32
33#ifdef tahoe
34#define _JBLEN 10
35#endif
36
a96588ae
KB
37#ifdef vax
38#define _JBLEN 10
caf5d079
KM
39#endif
40
a96588ae
KB
41/*
42 * sigsetjmp/siglongjmp use the first int to decide if the
43 * signal mask was saved or not.
44 */
45typedef int sigjmp_buf[_JBLEN + 1];
46
47#ifndef _POSIX_SOURCE
caf5d079 48typedef int jmp_buf[_JBLEN];
a96588ae 49#endif
caf5d079 50
6670c0eb 51#if __STDC__ || c_plusplus
a96588ae
KB
52int sigsetjmp(sigjmp_buf, int);
53void siglongjmp(sigjmp_buf, int);
54#ifndef _POSIX_SOURCE
55extern int setjmp(jmp_buf);
56extern int _setjmp(jmp_buf);
57extern void longjmp(jmp_buf, int);
58extern void _longjmp(jmp_buf, int);
59#endif
9f015abc 60#else
a96588ae
KB
61int sigsetjmp();
62void siglongjmp();
63#ifndef _POSIX_SOURCE
64extern int setjmp();
65extern int _setjmp();
66extern void longjmp();
67extern void _longjmp();
68#endif
9f015abc 69#endif
caf5d079 70#endif