1/* $FreeBSD: head/sys/i386/linux/linux_genassym.c 50477 1999-08-28 01:08:13Z peter $ */
|
1/* $FreeBSD: head/sys/i386/linux/linux_genassym.c 55062 1999-12-23 19:59:47Z marcel $ */ |
2
|
3#include <sys/assym.h> |
4#include <sys/param.h> 5 6#include <i386/linux/linux.h> 7
|
7#define offsetof(type, member) ((size_t)(&((type *)0)->member))
8#define OS(s, m) ((u_int)offsetof(struct s, m))
9
10int main __P((void));
11int printf __P((const char *, ...));
12
13int
14main()
15{
16 printf("#define\tLINUX_SIGF_HANDLER %u\n",
17 OS(linux_sigframe, sf_handler));
18 printf("#define\tLINUX_SIGF_SC %u\n", OS(linux_sigframe, sf_sc));
19 printf("#define\tLINUX_SC_GS %u\n", OS(linux_sigcontext, sc_gs));
20 printf("#define\tLINUX_SC_EFLAGS %u\n",
21 OS(linux_sigcontext, sc_eflags));
22
23 return (0);
24}
|
8ASSYM(LINUX_SIGF_HANDLER, offsetof(linux_sigframe, sf_handler)); 9ASSYM(LINUX_SIGF_SC, offsetof(linux_sigframe, sf_sc)); 10ASSYM(LINUX_SC_GS, offsetof(linux_sigcontext, sc_gs)); 11ASSYM(LINUX_SC_EFLAGS, offsetof(linux_sigcontext, sc_eflags)); |
|