From 2d8f1ea62a9cb73d46a1097e15ad9da4a6d13538 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Thu, 28 Feb 2013 16:42:21 +0000 Subject: [PATCH] * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of sigjmp_buf size if _JBTYPE is defined. --- newlib/ChangeLog | 5 +++++ newlib/libc/include/machine/setjmp.h | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 2851b60be..fdb3489a8 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2013-02-28 Corinna Vinschen + + * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of + sigjmp_buf size if _JBTYPE is defined. + 2013-02-26 Corinna Vinschen * libc/include/malloc.h (struct mallinfo): Convert type of all members diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 48361763d..31a8032d8 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -305,7 +305,8 @@ extern "C" { /* POSIX sigsetjmp/siglongjmp macros */ #ifdef _JBTYPE -typedef _JBTYPE sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (_JBTYPE))]; +typedef _JBTYPE sigjmp_buf[_JBLEN+1+((sizeof (_JBTYPE) + sizeof (sigset_t) - 1) + /sizeof (_JBTYPE))]; #else typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))]; #endif