summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/alpha/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/arm/bits/setjmp.h6
-rw-r--r--libc/sysdeps/linux/bfin/bits/setjmp.h22
-rw-r--r--libc/sysdeps/linux/cris/bits/setjmp.h22
-rw-r--r--libc/sysdeps/linux/e1/bits/setjmp.h6
-rw-r--r--libc/sysdeps/linux/frv/bits/setjmp.h25
-rw-r--r--libc/sysdeps/linux/h8300/bits/setjmp.h7
-rw-r--r--libc/sysdeps/linux/hppa/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/i386/bits/setjmp.h8
-rw-r--r--libc/sysdeps/linux/i960/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/m68k/bits/setjmp.h27
-rw-r--r--libc/sysdeps/linux/microblaze/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/mips/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/nios/bits/setjmp.h22
-rw-r--r--libc/sysdeps/linux/nios2/bits/setjmp.h7
-rw-r--r--libc/sysdeps/linux/powerpc/bits/setjmp.h47
-rw-r--r--libc/sysdeps/linux/sh/bits/setjmp.h4
-rw-r--r--libc/sysdeps/linux/sh64/bits/setjmp.h22
-rw-r--r--libc/sysdeps/linux/sparc/bits/setjmp.h10
-rw-r--r--libc/sysdeps/linux/v850/bits/setjmp.h9
-rw-r--r--libc/sysdeps/linux/x86_64/bits/setjmp.h4
21 files changed, 206 insertions, 87 deletions
diff --git a/libc/sysdeps/linux/alpha/bits/setjmp.h b/libc/sysdeps/linux/alpha/bits/setjmp.h
index fcd57d61d..441313cba 100644
--- a/libc/sysdeps/linux/alpha/bits/setjmp.h
+++ b/libc/sysdeps/linux/alpha/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1997, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -80,3 +83,5 @@ typedef long int __jmp_buf[17];
#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
((void *)(_address) < (void *)((_jmpbuf)[JB_SP]))
#endif
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/arm/bits/setjmp.h b/libc/sysdeps/linux/arm/bits/setjmp.h
index e1d51468f..ad42f96cd 100644
--- a/libc/sysdeps/linux/arm/bits/setjmp.h
+++ b/libc/sysdeps/linux/arm/bits/setjmp.h
@@ -17,8 +17,10 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. ARM version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -38,3 +40,5 @@ typedef int __jmp_buf[22];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf[__JMP_BUF_SP]))
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/bfin/bits/setjmp.h b/libc/sysdeps/linux/bfin/bits/setjmp.h
index abb7db6a0..ee3f5e787 100644
--- a/libc/sysdeps/linux/bfin/bits/setjmp.h
+++ b/libc/sysdeps/linux/bfin/bits/setjmp.h
@@ -2,23 +2,25 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. bfin version. Lineo, Inc. 2001*/
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -51,3 +53,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)->__pregs[6])
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/cris/bits/setjmp.h b/libc/sysdeps/linux/cris/bits/setjmp.h
index ba9cbc93c..2a29c8ca9 100644
--- a/libc/sysdeps/linux/cris/bits/setjmp.h
+++ b/libc/sysdeps/linux/cris/bits/setjmp.h
@@ -2,23 +2,25 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. CRIS version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -61,4 +63,4 @@ typedef int __jmp_buf[_JBLEN];
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)[JB_SP])
-
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/e1/bits/setjmp.h b/libc/sysdeps/linux/e1/bits/setjmp.h
index 88ded3837..88fa76fdf 100644
--- a/libc/sysdeps/linux/e1/bits/setjmp.h
+++ b/libc/sysdeps/linux/e1/bits/setjmp.h
@@ -3,7 +3,10 @@
* Yannis Mitsos <yannis.mitsos@gdt.gr>
*/
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -16,3 +19,4 @@ typedef struct {
unsigned long ReturnValue;
} __jmp_buf[1];
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/frv/bits/setjmp.h b/libc/sysdeps/linux/frv/bits/setjmp.h
index 5c20c4f54..d49ad7b71 100644
--- a/libc/sysdeps/linux/frv/bits/setjmp.h
+++ b/libc/sysdeps/linux/frv/bits/setjmp.h
@@ -2,23 +2,26 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. FRV version. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -50,4 +53,6 @@ __attribute__((__aligned__(8)))
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((unsigned long) (address) < (jmpbuf)->__sp)
+ ((void *) (address) < (void *) (jmpbuf)->__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/h8300/bits/setjmp.h b/libc/sysdeps/linux/h8300/bits/setjmp.h
index 024861440..15f8d8445 100644
--- a/libc/sysdeps/linux/h8300/bits/setjmp.h
+++ b/libc/sysdeps/linux/h8300/bits/setjmp.h
@@ -2,7 +2,10 @@
/* Copyright (C) 2004, Yoshinori Sato <ysato@users.sourceforge.jp> */
/* Define the machine-dependent type `jmp_buf'. H8/300 version. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -25,3 +28,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)->__regs[3])
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/hppa/bits/setjmp.h b/libc/sysdeps/linux/hppa/bits/setjmp.h
index 53ca4be87..253e92603 100644
--- a/libc/sysdeps/linux/hppa/bits/setjmp.h
+++ b/libc/sysdeps/linux/hppa/bits/setjmp.h
@@ -17,8 +17,8 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. HPPA version. */
-#ifndef _BITS_SETJMP_H_
-#define _BITS_SETJMP_H_
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
@@ -40,7 +40,6 @@ typedef double __jmp_buf[21];
/* Test if longjmp to JMPBUF would unwind the frame containing a local
variable at ADDRESS. */
#define _JMPBUF_UNWINDS(_jmpbuf, _address) \
- ((void *)(_address) > (void *)(((unsigned long *) _jmpbuf)[JB_SP]))
-
-#endif
+ ((void *)(_address) > (void *)(_jmpbuf[JB_SP]))
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/i386/bits/setjmp.h b/libc/sysdeps/linux/i386/bits/setjmp.h
index e5e493bca..107fe58b3 100644
--- a/libc/sysdeps/linux/i386/bits/setjmp.h
+++ b/libc/sysdeps/linux/i386/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +17,10 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. Intel 386 version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -40,3 +42,5 @@ typedef int __jmp_buf[6];
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)[JB_SP])
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/i960/bits/setjmp.h b/libc/sysdeps/linux/i960/bits/setjmp.h
index 29fe2439f..f90e4cec7 100644
--- a/libc/sysdeps/linux/i960/bits/setjmp.h
+++ b/libc/sysdeps/linux/i960/bits/setjmp.h
@@ -1,6 +1,9 @@
/* Define the machine-dependent type `jmp_buf'. i960 version. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -29,5 +32,7 @@ typedef struct __jmp_buf__ {
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (jmpbuf)[0].__sp)
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
#endif
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/m68k/bits/setjmp.h b/libc/sysdeps/linux/m68k/bits/setjmp.h
index 9969aba02..efad14c13 100644
--- a/libc/sysdeps/linux/m68k/bits/setjmp.h
+++ b/libc/sysdeps/linux/m68k/bits/setjmp.h
@@ -1,8 +1,27 @@
-
/* Copyright (C) 2002, David McCullough <davidm@snapgear.com> */
-/* This file is released under the LGPL, any version you like */
+/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
-#ifndef _SETJMP_H
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Define the machine-dependent type `jmp_buf'. m68k version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -41,3 +60,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)->__aregs[5])
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/microblaze/bits/setjmp.h b/libc/sysdeps/linux/microblaze/bits/setjmp.h
index 80cddb05d..09f9c9666 100644
--- a/libc/sysdeps/linux/microblaze/bits/setjmp.h
+++ b/libc/sysdeps/linux/microblaze/bits/setjmp.h
@@ -12,7 +12,10 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -35,4 +38,6 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((__ptr_t) (address) < &(jmpbuf)[0].__sp)
+ ((void *) (address) < (void *) &(jmpbuf)[0].__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/mips/bits/setjmp.h b/libc/sysdeps/linux/mips/bits/setjmp.h
index 8cb53ee29..4eb8e9f2a 100644
--- a/libc/sysdeps/linux/mips/bits/setjmp.h
+++ b/libc/sysdeps/linux/mips/bits/setjmp.h
@@ -17,7 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -54,4 +57,6 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((void *) (address) < (jmpbuf)[0].__sp)
+ ((void *) (address) < (void *) (jmpbuf)[0].__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/nios/bits/setjmp.h b/libc/sysdeps/linux/nios/bits/setjmp.h
index 33467f7d7..807ebea02 100644
--- a/libc/sysdeps/linux/nios/bits/setjmp.h
+++ b/libc/sysdeps/linux/nios/bits/setjmp.h
@@ -2,23 +2,25 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. Nios version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -71,4 +73,4 @@ typedef struct
#endif /* _ASM */
-
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/nios2/bits/setjmp.h b/libc/sysdeps/linux/nios2/bits/setjmp.h
index ea7699d09..5d33caa98 100644
--- a/libc/sysdeps/linux/nios2/bits/setjmp.h
+++ b/libc/sysdeps/linux/nios2/bits/setjmp.h
@@ -17,7 +17,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -65,3 +68,5 @@ typedef struct
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void*)(jmpbuf)->__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/powerpc/bits/setjmp.h b/libc/sysdeps/linux/powerpc/bits/setjmp.h
index b53cdea3b..dad90c74c 100644
--- a/libc/sysdeps/linux/powerpc/bits/setjmp.h
+++ b/libc/sysdeps/linux/powerpc/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,8 +17,10 @@
02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. PowerPC version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -27,21 +29,52 @@
assembler easier. Naturally, user code should not depend on
either representation. */
+#include <bits/wordsize.h>
+
#if defined __USE_MISC || defined _ASM
# define JB_GPR1 0 /* Also known as the stack pointer */
# define JB_GPR2 1
# define JB_LR 2 /* The address we will return to */
-# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total */
-# define JB_CR 21 /* Condition code registers. */
-# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total */
-# define JB_SIZE (58*4)
+# if __WORDSIZE == 64
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_CR 21 /* Condition code registers with the VRSAVE at */
+ /* offset 172 (low half of the double word. */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_SIZE (64 * 8) /* As per PPC64-VMX ABI. */
+# define JB_VRSAVE 21 /* VRSAVE shares a double word with the CR at offset */
+ /* 168 (high half of the double word). */
+# define JB_VRS 40 /* VRs 20 through 31 are saved, 12*4 words total. */
+# else
+# define JB_GPRS 3 /* GPRs 14 through 31 are saved, 18 in total. */
+# define JB_CR 21 /* Condition code registers. */
+# define JB_FPRS 22 /* FPRs 14 through 31 are saved, 18*2 words total. */
+# define JB_SIZE ((64 + (12 * 4)) * 4)
+# define JB_VRSAVE 62
+# define JB_VRS 64
+# endif
#endif
+
+/* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI
+ the vrsave must be at byte 248 & v20 at byte 256. So we must pad this
+ correctly on 32 bit. It also insists that vecregs are only gauranteed
+ 4 byte alignment so we need to use vperm in the setjmp/longjmp routines.
+ We have to version the code because members like int __mask_was_saved
+ in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We
+ cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */
#ifndef _ASM
-typedef long int __jmp_buf[58];
+# if __WORDSIZE == 64
+typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16)));
+# else
+/* The alignment is not essential, i.e.the buffer can be copied to a 4 byte
+ aligned buffer as per the ABI it is just added for performance reasons. */
+typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
+# endif
#endif
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) (jmpbuf)[JB_GPR1])
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/sh/bits/setjmp.h b/libc/sysdeps/linux/sh/bits/setjmp.h
index cb141bb66..c9d7d8fcd 100644
--- a/libc/sysdeps/linux/sh/bits/setjmp.h
+++ b/libc/sysdeps/linux/sh/bits/setjmp.h
@@ -18,7 +18,7 @@
/* Define the machine-dependent type `jmp_buf'. SH version. */
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
@@ -53,4 +53,4 @@ typedef struct
#define _JMPBUF_UNWINDS(jmpbuf, address) \
((void *) (address) < (void *) &(jmpbuf)[0].__regs[7])
-#endif /* bits/setjmp.h */
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/sh64/bits/setjmp.h b/libc/sysdeps/linux/sh64/bits/setjmp.h
index 08ffbc78c..ad1ec9d4b 100644
--- a/libc/sysdeps/linux/sh64/bits/setjmp.h
+++ b/libc/sysdeps/linux/sh64/bits/setjmp.h
@@ -2,23 +2,25 @@
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ Lesser General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
/* Define the machine-dependent type `jmp_buf'. SH-5 version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -45,4 +47,4 @@ typedef struct
} __jmp_buf[1];
#endif
-
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/sparc/bits/setjmp.h b/libc/sysdeps/linux/sparc/bits/setjmp.h
index 664a06f60..574085664 100644
--- a/libc/sysdeps/linux/sparc/bits/setjmp.h
+++ b/libc/sysdeps/linux/sparc/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1999,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1999,2000,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -16,8 +16,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
-#ifndef _SETJMP_H
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -75,6 +77,8 @@ typedef int __jmp_buf[3];
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((int) (address) < (jmpbuf)[JB_SP])
+ ((void *) (address) < (void *) (jmpbuf)[JB_SP])
#endif
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/v850/bits/setjmp.h b/libc/sysdeps/linux/v850/bits/setjmp.h
index 3e4214a27..97cb11784 100644
--- a/libc/sysdeps/linux/v850/bits/setjmp.h
+++ b/libc/sysdeps/linux/v850/bits/setjmp.h
@@ -11,7 +11,10 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#ifndef _SETJMP_H
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
#endif
@@ -34,4 +37,6 @@ typedef struct
/* Test if longjmp to JMPBUF would unwind the frame
containing a local variable at ADDRESS. */
#define _JMPBUF_UNWINDS(jmpbuf, address) \
- ((__ptr_t) (address) < &(jmpbuf)[0].__sp)
+ ((void *) (address) < (void *) &(jmpbuf)[0].__sp)
+
+#endif /* bits/setjmp.h */
diff --git a/libc/sysdeps/linux/x86_64/bits/setjmp.h b/libc/sysdeps/linux/x86_64/bits/setjmp.h
index 96646efdd..515d769be 100644
--- a/libc/sysdeps/linux/x86_64/bits/setjmp.h
+++ b/libc/sysdeps/linux/x86_64/bits/setjmp.h
@@ -18,7 +18,7 @@
/* Define the machine-dependent type `jmp_buf'. x86-64 version. */
#ifndef _BITS_SETJMP_H
-#define _BITS_SETJMP_H 1
+#define _BITS_SETJMP_H 1
#if !defined _SETJMP_H && !defined _PTHREAD_H
# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
@@ -75,4 +75,4 @@ typedef int __jmp_buf[6];
# endif
#endif
-#endif /* bits/setjmp.h */
+#endif /* bits/setjmp.h */