about summary refs log tree commit diff
path: root/sysdeps/powerpc/bits
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-09-20 20:06:45 +0000
committerRoland McGrath <roland@gnu.org>2002-09-20 20:06:45 +0000
commitfcdc67f963a44603553e52a0f883e5d0e5727b34 (patch)
tree64b68e8749cca4a3a7630d9e3b63874ca5845be0 /sysdeps/powerpc/bits
parent51104ec01415a078b6d8ab2717721b578dd5d1b3 (diff)
downloadglibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.tar.gz
glibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.tar.xz
glibc-fcdc67f963a44603553e52a0f883e5d0e5727b34.zip
* sysdeps/powerpc/bits/setjmp.h [__WORDSIZE]: Add 64-bit jmpbuf.
	* sysdeps/powerpc/bits/wordsize.h: New file.
	* sysdeps/powerpc/fpu/bits/mathinline.h (lrint, lrintf): Change long
	array to int array for 32-/64-bit compatibility.

2002-09-20  Roland McGrath  <roland@redhat.com>

	* login/programs/utmpdump.c: Don't include <error.h>, <errno.h>.

	* sysdeps/generic/utimes.c (__utimes): Don't check TVP for null.
	Reported by Bruno Haible <bruno@clisp.org>.

	* sysdeps/generic/ifreq.h (__ifreq): Compute termination condition
	before doubling RQ_LEN.
	* sysdeps/unix/sysv/linux/ifreq.h (__ifreq): Likewise.
	Reported by Bruno Haible <bruno@clisp.org>.

2002-09-18  Bruno Haible  <bruno@clisp.org>

	* login/logout.c (logout): Don't assume ut_time has the same size as
	a time_t.
	* login/logwtmp.c (logwtmp): Likewise.

	* sysdeps/pthread/configure: New file, moved here from
	linuxthreads/sysdeps/unix/sysv/linux/configure.
Diffstat (limited to 'sysdeps/powerpc/bits')
-rw-r--r--sysdeps/powerpc/bits/setjmp.h19
-rw-r--r--sysdeps/powerpc/bits/wordsize.h7
2 files changed, 22 insertions, 4 deletions
diff --git a/sysdeps/powerpc/bits/setjmp.h b/sysdeps/powerpc/bits/setjmp.h
index b53cdea3b2..3a0a0a0d61 100644
--- a/sysdeps/powerpc/bits/setjmp.h
+++ b/sysdeps/powerpc/bits/setjmp.h
@@ -31,14 +31,25 @@
 # 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. */
+#  define JB_FPRS   22 /* FPRs 14 through 31 are saved, 18*2 words total.  */
+#  define JB_SIZE   (40*8)
+# 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   (58*4)
+# endif 
 #endif
 
 #ifndef	_ASM
+# if __WORDSIZE == 64
+typedef long int __jmp_buf[40];
+# else
 typedef long int __jmp_buf[58];
+# endif
 #endif
 
 /* Test if longjmp to JMPBUF would unwind the frame
diff --git a/sysdeps/powerpc/bits/wordsize.h b/sysdeps/powerpc/bits/wordsize.h
new file mode 100644
index 0000000000..d856583cbf
--- /dev/null
+++ b/sysdeps/powerpc/bits/wordsize.h
@@ -0,0 +1,7 @@
+/* Determine the wordsize from the preprocessor defines.  */
+
+#if defined __powerpc64__
+# define __WORDSIZE	64
+#else
+# define __WORDSIZE	32
+#endif