Reorganized declarations to accommodate both ANSI and POSIX. We still
[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 *
5 * %sccs.include.redist.c%
6 *
c37e28c6 7 * @(#)setjmp.h 5.4 (Berkeley) %G%
9f015abc 8 */
21e51ba9 9
91befe9c
KB
10#ifndef _SETJMP_H_
11#define _SETJMP_H_
caf5d079 12
a96588ae
KB
13#ifdef hp300
14#define _JBLEN 17
15#endif
16
17#ifdef i386
caf5d079
KM
18#define _JBLEN 10
19#endif
20
21#ifdef tahoe
22#define _JBLEN 10
23#endif
24
a96588ae
KB
25#ifdef vax
26#define _JBLEN 10
caf5d079
KM
27#endif
28
59c161d4 29#ifndef _ANSI_SOURCE
a96588ae 30/*
59c161d4 31 * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
a96588ae
KB
32 */
33typedef int sigjmp_buf[_JBLEN + 1];
59c161d4 34#endif /* not ANSI */
a96588ae 35
caf5d079
KM
36typedef int jmp_buf[_JBLEN];
37
91befe9c
KB
38#include <sys/cdefs.h>
39
40__BEGIN_DECLS
59c161d4
DS
41int setjmp __P((jmp_buf));
42void longjmp __P((jmp_buf, int));
43
44#ifndef _ANSI_SOURCE
45/*
46 * WARNING: sigsetjmp() isn't supported yet, this is a placeholder.
47 */
48int sigsetjmp __P((sigjmp_buf, int));
49void siglongjmp __P((sigjmp_buf, int));
50#endif /* not ANSI */
51
52#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
53int _setjmp __P((jmp_buf));
54void _longjmp __P((jmp_buf, int));
55void longjmperror __P((void));
56#endif /* neither ANSI nor POSIX */
91befe9c
KB
57__END_DECLS
58
59#endif /* !_SETJMP_H_ */