aboutsummaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-10-14 17:20:58 +0000
committerUlrich Drepper <drepper@redhat.com>2005-10-14 17:20:58 +0000
commit3394d6320b96592d5a718100856e106736c8fcf1 (patch)
treeda4cce44bf218a94411012e17a319c5cead7f50f /stdlib
parentce982312e888ff1fd9b869240951805d281f7517 (diff)
downloadglibc-3394d6320b96592d5a718100856e106736c8fcf1.zip
glibc-3394d6320b96592d5a718100856e106736c8fcf1.tar.gz
glibc-3394d6320b96592d5a718100856e106736c8fcf1.tar.bz2
[BZ #1468]
* sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Fix values for oFPREGS, oSIGMASK, oFPREGSMEM, and oMXCSR. Patch by Nicholas Miell <nmiell@comcast.net>.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/Makefile3
-rw-r--r--stdlib/tst-ucontext-off.c35
2 files changed, 37 insertions, 1 deletions
diff --git a/stdlib/Makefile b/stdlib/Makefile
index 9a9ff8b..fa65c95 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -63,7 +63,8 @@ tests := tst-strtol tst-strtod testmb testrand testsort testdiv \
test-canon test-canon2 tst-strtoll tst-environ \
tst-xpg-basename tst-random tst-random2 tst-bsearch \
tst-limits tst-rand48 bug-strtod tst-setcontext \
- test-a64l tst-qsort tst-system testmb2 bug-strtod2
+ test-a64l tst-qsort tst-system testmb2 bug-strtod2 \
+ tst-ucontext-off
include ../Makeconfig
diff --git a/stdlib/tst-ucontext-off.c b/stdlib/tst-ucontext-off.c
new file mode 100644
index 0000000..2e97f21
--- /dev/null
+++ b/stdlib/tst-ucontext-off.c
@@ -0,0 +1,35 @@
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/ucontext.h>
+
+#include <ucontext_i.h>
+
+static int
+do_test (void)
+{
+ int nerrors = 0;
+ int ntests = 0;
+
+#define TEST(member, val) \
+ do { \
+ if (offsetof (struct ucontext, member) != val) \
+ { \
+ printf ("offsetof(%s) = %zu, %s = %zu\n", \
+ #member, offsetof (struct ucontext, member), \
+ #val, (size_t) val); \
+ ++nerrors; \
+ } \
+ ++ntests; \
+ } while (0)
+
+#ifdef TESTS
+ TESTS
+#endif
+
+ printf ("%d errors in %d tests\n", nerrors, ntests);
+
+ return nerrors != 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"