aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-01-20 09:09:24 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-01-20 09:09:24 +0000
commit013239afdf167d49f362908f081dfb48d9d489f6 (patch)
treee9338416a65b533a6c27ebb1cc0610fccacd002e
parentffe0efc2a9cd947854544d2b5a55c5535b70c2e0 (diff)
downloadsrc-013239afdf167d49f362908f081dfb48d9d489f6.tar.gz
src-013239afdf167d49f362908f081dfb48d9d489f6.zip
Suggested by: bde
Move sigjmp_buf and jmp_buf structure definitions to machine/setjmp.h so that i386 can continue to use int as the basic register type and alpha can use long. Bruce was concerned about possible differing alignment. I've left the definition of _JBLEN in machine/setjmp.h even though Bruce's example used the number directly. I don't know if any other code relies on _JBLEN, so I left it to avoid potential breakage.
Notes
Notes: svn path=/head/; revision=32641
-rw-r--r--include/setjmp.h11
-rw-r--r--sys/alpha/include/setjmp.h13
-rw-r--r--sys/amd64/include/setjmp.h13
-rw-r--r--sys/i386/include/setjmp.h13
4 files changed, 36 insertions, 14 deletions
diff --git a/include/setjmp.h b/include/setjmp.h
index 6a428c1f243c..50934479f61e 100644
--- a/include/setjmp.h
+++ b/include/setjmp.h
@@ -44,17 +44,6 @@
/* 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
- * compile-time diagnostics for mismatches. The structs are the same
- * internally to avoid some run-time errors for mismatches.
- */
-#ifndef _ANSI_SOURCE
-typedef struct { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
-#endif /* not ANSI */
-
-typedef struct { long _jb[_JBLEN + 1]; } jmp_buf[1];
-
#include <sys/cdefs.h>
__BEGIN_DECLS
diff --git a/sys/alpha/include/setjmp.h b/sys/alpha/include/setjmp.h
index bf081a502cc6..bf9bac25c528 100644
--- a/sys/alpha/include/setjmp.h
+++ b/sys/alpha/include/setjmp.h
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: setjmp.h,v 1.1 1998/01/10 23:00:06 jb Exp $ */
/* From: NetBSD: setjmp.h,v 1.2 1997/04/06 08:47:41 cgd Exp */
/*
@@ -33,3 +33,14 @@
*/
#define _JBLEN 81 /* size, in longs, of a jmp_buf */
+
+/*
+ * jmp_buf and sigjmp_buf are encapsulated in different structs to force
+ * compile-time diagnostics for mismatches. The structs are the same
+ * internally to avoid some run-time errors for mismatches.
+ */
+#ifndef _ANSI_SOURCE
+typedef struct { long _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+#endif /* not ANSI */
+
+typedef struct { long _jb[_JBLEN + 1]; } jmp_buf[1];
diff --git a/sys/amd64/include/setjmp.h b/sys/amd64/include/setjmp.h
index 2615a091cf5b..c0337c06ce6d 100644
--- a/sys/amd64/include/setjmp.h
+++ b/sys/amd64/include/setjmp.h
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: setjmp.h,v 1.1 1998/01/10 23:04:51 jb Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -33,3 +33,14 @@
*/
#define _JBLEN 8 /* Size of the jmp_buf on x86. */
+
+/*
+ * jmp_buf and sigjmp_buf are encapsulated in different structs to force
+ * compile-time diagnostics for mismatches. The structs are the same
+ * internally to avoid some run-time errors for mismatches.
+ */
+#ifndef _ANSI_SOURCE
+typedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+#endif /* not ANSI */
+
+typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];
diff --git a/sys/i386/include/setjmp.h b/sys/i386/include/setjmp.h
index 2615a091cf5b..c0337c06ce6d 100644
--- a/sys/i386/include/setjmp.h
+++ b/sys/i386/include/setjmp.h
@@ -1,4 +1,4 @@
-/* $Id$ */
+/* $Id: setjmp.h,v 1.1 1998/01/10 23:04:51 jb Exp $ */
/*
* Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -33,3 +33,14 @@
*/
#define _JBLEN 8 /* Size of the jmp_buf on x86. */
+
+/*
+ * jmp_buf and sigjmp_buf are encapsulated in different structs to force
+ * compile-time diagnostics for mismatches. The structs are the same
+ * internally to avoid some run-time errors for mismatches.
+ */
+#ifndef _ANSI_SOURCE
+typedef struct { int _sjb[_JBLEN + 1]; } sigjmp_buf[1];
+#endif /* not ANSI */
+
+typedef struct { int _jb[_JBLEN + 1]; } jmp_buf[1];