This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][AArch64] change greg_t definition in ucontext.h
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>
- Date: Thu, 21 May 2015 17:36:22 +0100
- Subject: [PATCH][AArch64] change greg_t definition in ucontext.h
- Authentication-results: sourceware.org; auth=none
This change assumes greg_t is not used outside of libc.
In glibc it is usually used for defining gregset_t, but
on aarch64 elf_greg_t is used for that, greg_t is not
used anywhere (so it is meant to be a cosmetic fix).
If greg_t is used outside of libc, then this is an ABI
change, but
typedef int greg_t;
is not a useful definition on aarch64.
Some targets (powerpc) don't define greg_t at all so
removing it should be a valid fix too. It seems the
signedness of greg_t varies between targets so i settled
for using elf_greg_t (unsigned long) for the typedef to
be consistent with the members of gregset_t.
Changelog:
2015-05-07 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h (greg_t): Change the
definition to elf_greg_t.
diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
index db7a7c1..e7268ce 100644
--- a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
@@ -29,7 +29,7 @@
included in <signal.h>. */
#include <bits/sigcontext.h>
-typedef int greg_t;
+typedef elf_greg_t greg_t;
/* Container for all general registers. */
typedef elf_gregset_t gregset_t;