mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-22 13:00:06 +00:00
3394d6320b
* sysdeps/unix/sysv/linux/x86_64/ucontext_i.h: Fix values for oFPREGS, oSIGMASK, oFPREGSMEM, and oMXCSR. Patch by Nicholas Miell <nmiell@comcast.net>.
36 lines
652 B
C
36 lines
652 B
C
#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"
|