summaryrefslogtreecommitdiffstats
path: root/include/setjmp.h
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-01-11 03:46:26 +0000
committerjb <jb@FreeBSD.org>1998-01-11 03:46:26 +0000
commit8e6eb00a8e1aaa599e9a73fe473d0211c68784ec (patch)
tree03f62742e53a36b70b0d59213d847de6d8b7e4bb /include/setjmp.h
parent003a004c3913cb110e71d5dc731fd7cd489ba396 (diff)
downloadFreeBSD-src-8e6eb00a8e1aaa599e9a73fe473d0211c68784ec.zip
FreeBSD-src-8e6eb00a8e1aaa599e9a73fe473d0211c68784ec.tar.gz
Move _JBLEN definition to <machine/setjmp.h> like on NetBSD. Remove
definitions for architectures that we don't have libc MD source for. Change 'int' to 'long' in sigjmp_buf and jmp_buf structures so that they are suitable for the register size on both i386 and alpha. Although FreeBSD defines these structures differently to NetBSD, the element size is now the same. If Bruce doesn't like this [8-)], we'll need to add a typedef to each <machine/setjmp.h> and use that in <setjmp.h>.
Diffstat (limited to 'include/setjmp.h')
-rw-r--r--include/setjmp.h29
1 files changed, 4 insertions, 25 deletions
diff --git a/include/setjmp.h b/include/setjmp.h
index 5dcc8ee..6a428c1 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -41,29 +41,8 @@
#ifndef _SETJMP_H_
#define _SETJMP_H_
-#if defined(__hp300__) || defined(__luna68k__)
-#define _JBLEN 17
-#endif
-
-#if defined(__i386__)
-#define _JBLEN 8
-#endif
-
-#if defined(__mips__)
-#define _JBLEN 83
-#endif
-
-#if defined(__sparc__)
-#define _JBLEN 10
-#endif
-
-#if defined(__tahoe__)
-#define _JBLEN 10
-#endif
-
-#if defined(__vax__)
-#define _JBLEN 10
-#endif
+/* The size of the jmp_buf is machine dependent: */
+#include <machine/setjmp.h>
/*
* jmp_buf and sigjmp_buf are encapsulated in different structs to force
@@ -71,10 +50,10 @@
* internally to avoid some run-time errors for mismatches.
*/
#ifndef _ANSI_SOURCE
-typedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+typedef struct { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
#endif /* not ANSI */
-typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];
+typedef struct { long _jb[_JBLEN + 1]; } jmp_buf[1];
#include <sys/cdefs.h>
OpenPOWER on IntegriCloud