aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-16 12:52:45 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-16 12:52:45 -0700
commitd5e051198503e74256b72fee7b93e681f1de6b57 (patch)
tree10a14baafa13f30aa21f995b16acd50a7368af4d /sysdeps
parentf62ee380a1007441e4600f837b9a40ec8c43ba2d (diff)
downloadglibc-d5e051198503e74256b72fee7b93e681f1de6b57.tar
glibc-d5e051198503e74256b72fee7b93e681f1de6b57.tar.gz
glibc-d5e051198503e74256b72fee7b93e681f1de6b57.tar.bz2
glibc-d5e051198503e74256b72fee7b93e681f1de6b57.zip
Add x32 support to sys/ucontext.h
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h b/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
index a397620589..7a3938cbcd 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h
@@ -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
@@ -20,16 +20,15 @@
#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 */