aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-16 10:20:06 -0700
committerH.J. Lu <hjl.tools@gmail.com>2012-05-16 10:20:06 -0700
commit23dfb58b4d868e3c90cdb472e4e6e6d7469f0ee1 (patch)
treed7a41b9f88c322a9d9e0cb39453cd91935270e88
parentce5d54b0d6b097c74835dd1df660720223284373 (diff)
downloadglibc-23dfb58b4d868e3c90cdb472e4e6e6d7469f0ee1.zip
glibc-23dfb58b4d868e3c90cdb472e4e6e6d7469f0ee1.tar.gz
glibc-23dfb58b4d868e3c90cdb472e4e6e6d7469f0ee1.tar.bz2
Add x32 support to sys/procfs.h
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/procfs.h8
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 133ed98..4ecd85a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
+ * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h (elf_greg_t): Use
+ "unsigned long long int" if __x86_64__ is defined.
+ (elf_fpregset_t): Check __x86_64__ instead of __WORDSIZE.
+
+2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
+
* sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h: Don't include
<bits/wordsize.h>. Check __x86_64__ instead of __WORDSIZE.
(DR_CONTROL_RESERVED): Use ULL instead of UL suffix.
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h b/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
index bfb7d8c..c907d35 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2004, 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
@@ -35,7 +35,11 @@
__BEGIN_DECLS
/* Type for a general-purpose register. */
+#ifdef __x86_64__
+typedef unsigned long long elf_greg_t;
+#else
typedef unsigned long elf_greg_t;
+#endif
/* And the whole bunch of them. We could have used `struct
user_regs_struct' directly in the typedef, but tradition says that
@@ -44,7 +48,7 @@ typedef unsigned long elf_greg_t;
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-#if __WORDSIZE == 32
+#ifndef __x86_64__
/* Register set for the floating-point registers. */
typedef struct user_fpregs_struct elf_fpregset_t;