vfs: check userland buffers before reading them.
[haiku.git] / src / libs / libunwind / tilegx / gen-offsets.c
blob8704bb215e3cb7f93a56a8fc2cfb38b8fc151f63
1 #include <stdio.h>
2 #include <stddef.h>
3 #include <ucontext.h>
5 #define UC(N,X) \
6 printf ("#define LINUX_UC_" N "_OFF\t0x%X\n", offsetof (ucontext_t, X))
8 #define SC(N,X) \
9 printf ("#define LINUX_SC_" N "_OFF\t0x%X\n", offsetof (struct sigcontext, X))
11 int
12 main (void)
14 printf (
15 "/* Linux-specific definitions: */\n\n"
17 "/* Define various structure offsets to simplify cross-compilation. */\n\n"
19 "/* Offsets for TILEGX Linux \"ucontext_t\": */\n\n");
21 UC ("FLAGS", uc_flags);
22 UC ("LINK", uc_link);
23 UC ("STACK", uc_stack);
24 UC ("MCONTEXT", uc_mcontext);
25 UC ("SIGMASK", uc_sigmask);
27 UC ("MCONTEXT_GREGS", uc_mcontext.gregs);
29 return 0;