aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-02-28 16:42:21 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-02-28 16:42:21 +0000
commit2d8f1ea62a9cb73d46a1097e15ad9da4a6d13538 (patch)
tree4c036f45ba320c0affdac7e452105f999e3cc758
parentc2e3ff288d758534194e339a5d675e6ce05bcb77 (diff)
downloadnewlib-2d8f1ea62a9cb73d46a1097e15ad9da4a6d13538.zip
newlib-2d8f1ea62a9cb73d46a1097e15ad9da4a6d13538.tar.gz
newlib-2d8f1ea62a9cb73d46a1097e15ad9da4a6d13538.tar.bz2
* libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
sigjmp_buf size if _JBTYPE is defined.
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/include/machine/setjmp.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 2851b60..fdb3489 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+2013-02-28 Corinna Vinschen <vinschen@redhat.com>
+
+ * libc/include/machine/setjmp.h (sigjmp_buf): Fix definition of
+ sigjmp_buf size if _JBTYPE is defined.
+
2013-02-26 Corinna Vinschen <vinschen@redhat.com>
* 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 4836176..31a8032 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