]> sourceware.org Git - glibc.git/commitdiff
Add x32 support to sys/ucontext.h
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 16 May 2012 19:52:45 +0000 (12:52 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 16 May 2012 19:52:45 +0000 (12:52 -0700)
ChangeLog
sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h

index 8d4506a57918eff9369cac373034616fd10ebe17..738be2d85a9a3e012e0e6743967e759e54f2136d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h: Don't
+       include <bits/wordsize.h>.  Check __x86_64__ instead of
+       __WORDSIZE.
+       (greg_t): Use "__extension__ long long int" if __x86_64__ is
+       defined.
+       (mcontext_t): Replace "unsigned long" with "unsigned long long".
+
 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/unix/sysv/linux/x86_64/sys/user.h: Don't
index a3976205893e6cad76f41da51b286b1c7614db31..7a3938cbcdaa348027e7cddf4e3540b1a1d8c187 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2012 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
 
 #include <features.h>
 #include <signal.h>
-#include <bits/wordsize.h>
 
 /* We need the signal context definitions even if they are not used
    included in <signal.h>.  */
 #include <bits/sigcontext.h>
 
-#if __WORDSIZE == 64
+#ifdef __x86_64__
 
 /* Type for general register.  */
-typedef long int greg_t;
+__extension__ typedef long long int greg_t;
 
 /* Number of general registers.  */
 #define NGREG  23
@@ -127,7 +126,7 @@ typedef struct
     gregset_t gregs;
     /* Note that fpregs is a pointer.  */
     fpregset_t fpregs;
-    unsigned long __reserved1 [8];
+    __extension__ unsigned long long __reserved1 [8];
 } mcontext_t;
 
 /* Userlevel context.  */
@@ -141,7 +140,7 @@ typedef struct ucontext
     struct _libc_fpstate __fpregs_mem;
   } ucontext_t;
 
-#else /* __WORDSIZE == 32 */
+#else /* !__x86_64__ */
 
 /* Type for general register.  */
 typedef int greg_t;
@@ -242,6 +241,6 @@ typedef struct ucontext
     struct _libc_fpstate __fpregs_mem;
   } ucontext_t;
 
-#endif /* __WORDSIZE == 32 */
+#endif /* !__x86_64__ */
 
 #endif /* sys/ucontext.h */
This page took 0.116837 seconds and 5 git commands to generate.