Make offsetof equivalent with <stddef.h>. This paves the way for

further enhancements/reorganisations.

Discussed with: bde
This commit is contained in:
Marcel Moolenaar 2000-01-03 16:49:39 +00:00
parent 7c1df76bc2
commit e8c295abe6
4 changed files with 17 additions and 14 deletions

View File

@ -5,7 +5,7 @@
#include <i386/linux/linux.h>
ASSYM(LINUX_SIGF_HANDLER, offsetof(linux_sigframe, sf_handler));
ASSYM(LINUX_SIGF_SC, offsetof(linux_sigframe, sf_sc));
ASSYM(LINUX_SC_GS, offsetof(linux_sigcontext, sc_gs));
ASSYM(LINUX_SC_EFLAGS, offsetof(linux_sigcontext, sc_eflags));
ASSYM(LINUX_SIGF_HANDLER, offsetof(struct linux_sigframe, sf_handler));
ASSYM(LINUX_SIGF_SC, offsetof(struct linux_sigframe, sf_sc));
ASSYM(LINUX_SC_GS, offsetof(struct linux_sigcontext, sc_gs));
ASSYM(LINUX_SC_EFLAGS, offsetof(struct linux_sigcontext, sc_eflags));

View File

@ -5,7 +5,7 @@
#include <i386/linux/linux.h>
ASSYM(LINUX_SIGF_HANDLER, offsetof(linux_sigframe, sf_handler));
ASSYM(LINUX_SIGF_SC, offsetof(linux_sigframe, sf_sc));
ASSYM(LINUX_SC_GS, offsetof(linux_sigcontext, sc_gs));
ASSYM(LINUX_SC_EFLAGS, offsetof(linux_sigcontext, sc_eflags));
ASSYM(LINUX_SIGF_HANDLER, offsetof(struct linux_sigframe, sf_handler));
ASSYM(LINUX_SIGF_SC, offsetof(struct linux_sigframe, sf_sc));
ASSYM(LINUX_SC_GS, offsetof(struct linux_sigcontext, sc_gs));
ASSYM(LINUX_SC_EFLAGS, offsetof(struct linux_sigcontext, sc_eflags));

View File

@ -15,8 +15,11 @@ struct proc;
#define SVR4_MACHDEP_JUST_REGS
#include <i386/svr4/svr4_machdep.h>
ASSYM(SVR4_SIGF_HANDLER, offsetof(svr4_sigframe, sf_handler));
ASSYM(SVR4_SIGF_UC, offsetof(svr4_sigframe, sf_uc));
ASSYM(SVR4_UC_FS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS]));
ASSYM(SVR4_UC_GS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS]));
ASSYM(SVR4_UC_EFLAGS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler));
ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc));
ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext,
uc_mcontext.greg[SVR4_X86_FS]));
ASSYM(SVR4_UC_GS, offsetof(struct svr4_ucontext,
uc_mcontext.greg[SVR4_X86_GS]));
ASSYM(SVR4_UC_EFLAGS, offsetof(struct svr4_ucontext,
uc_mcontext.greg[SVR4_X86_EFL]));

View File

@ -32,7 +32,7 @@
#define _SYS_ASSYM_H_
#ifndef offsetof
#define offsetof(s, m) (&((struct s*)0)->m)
#define offsetof(t, m) (&((t *)0)->m)
#endif
#ifndef __assym