1 /* $Id: linux_genassym.c,v 1.7 1998/02/01 18:47:56 bde Exp $ */ 2 3 #include <sys/param.h> 4 5 #include <i386/linux/linux.h> 6 7 #define offsetof(type, member) ((size_t)(&((type *)0)->member)) 8 #define OS(s, m) ((u_int)offsetof(struct s, m)) 9 10 int main __P((void)); 11 int printf __P((const char *, ...)); 12 13 int 14 main() 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_FS %u\n", OS(linux_sigcontext, sc_fs)); 20 printf("#define\tLINUX_SC_GS %u\n", OS(linux_sigcontext, sc_gs)); 21 printf("#define\tLINUX_SC_EFLAGS %u\n", 22 OS(linux_sigcontext, sc_eflags)); 23 24 return (0); 25 } 26