This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Check __x86_64__ instead of __WORDSIZE in bits/setjmp.h


On Mon, Mar 19, 2012 at 3:38 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> -typedef long int __jmp_buf[8];
>> +# if __x86_64__
>
> ifdef

Here is the updated patch.  OK to install?

>> +typedef long long int __jmp_buf[8];
>
> We need to be very sure this cannot perturb anyone's ABI,
> e.g. mangled names and the like.
>
> I'm not aware of any such issue with __jmp_buf in particular, but
> we must be circumspect.
>

Agreed.

Thanks.

-- 
H.J.
2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>

	* sysdeps/x86_64/bits/setjmp.h: Don't include <bits/wordsize.h>.
	(__jmp_buf): Check __x86_64__ instead of __WORDSIZE.  Use long
	long int.

diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h
index a66ca0f..fe900f5 100644
--- a/sysdeps/x86_64/bits/setjmp.h
+++ b/sysdeps/x86_64/bits/setjmp.h
@@ -23,12 +23,10 @@
 # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
 #endif
 
-#include <bits/wordsize.h>
-
 #ifndef _ASM
 
-# if __WORDSIZE == 64
-typedef long int __jmp_buf[8];
+# ifdef __x86_64__
+typedef long long int __jmp_buf[8];
 # else
 typedef int __jmp_buf[6];
 # endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]