From 17abf1a78a4ab33375b910ba07e88929b14abd5e Mon Sep 17 00:00:00 2001 From: eck Date: Fri, 26 Oct 1990 11:31:27 +0000 Subject: [PATCH] changed definition of jmp_buf (alignment problems) --- lang/cem/libcc.ansi/headers/setjmp.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lang/cem/libcc.ansi/headers/setjmp.h b/lang/cem/libcc.ansi/headers/setjmp.h index 804c91b39..b15673d86 100644 --- a/lang/cem/libcc.ansi/headers/setjmp.h +++ b/lang/cem/libcc.ansi/headers/setjmp.h @@ -1,5 +1,5 @@ /* - * setjmp.h - restore calling environment + * setjmp.h - save/restore calling environment * * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". @@ -12,11 +12,18 @@ /* In a jmp_buf, there is room for: 1 mask (long), 1 flag (int) and 3 * pointers (stack-pointer, local base and program-counter). This may be * too big, but that doesn't matter. It could also be too small, when - * sigset_t is larger than a long. + * sigset_t is larger than a long. The fields is in the structure have no + * meaning, they just get the size right. * The identifier __setjmp has a special meaning to the compiler. */ -typedef char jmp_buf[ sizeof(long) + sizeof(int) + 3 * sizeof(void *)]; +typedef struct { + long __mask; + int __flag; + void (*__pc)(); + void *__sp; + void *__lb; +} jmp_buf[1]; int __setjmp(jmp_buf _env, int _savemask); -- 2.34.1