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