Make offsetof equivalent with <stddef.h>. This paves the way for
further enhancements/reorganisations. Discussed with: bde
This commit is contained in:
parent
7c1df76bc2
commit
e8c295abe6
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <i386/linux/linux.h>
|
#include <i386/linux/linux.h>
|
||||||
|
|
||||||
ASSYM(LINUX_SIGF_HANDLER, offsetof(linux_sigframe, sf_handler));
|
ASSYM(LINUX_SIGF_HANDLER, offsetof(struct linux_sigframe, sf_handler));
|
||||||
ASSYM(LINUX_SIGF_SC, offsetof(linux_sigframe, sf_sc));
|
ASSYM(LINUX_SIGF_SC, offsetof(struct linux_sigframe, sf_sc));
|
||||||
ASSYM(LINUX_SC_GS, offsetof(linux_sigcontext, sc_gs));
|
ASSYM(LINUX_SC_GS, offsetof(struct linux_sigcontext, sc_gs));
|
||||||
ASSYM(LINUX_SC_EFLAGS, offsetof(linux_sigcontext, sc_eflags));
|
ASSYM(LINUX_SC_EFLAGS, offsetof(struct linux_sigcontext, sc_eflags));
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include <i386/linux/linux.h>
|
#include <i386/linux/linux.h>
|
||||||
|
|
||||||
ASSYM(LINUX_SIGF_HANDLER, offsetof(linux_sigframe, sf_handler));
|
ASSYM(LINUX_SIGF_HANDLER, offsetof(struct linux_sigframe, sf_handler));
|
||||||
ASSYM(LINUX_SIGF_SC, offsetof(linux_sigframe, sf_sc));
|
ASSYM(LINUX_SIGF_SC, offsetof(struct linux_sigframe, sf_sc));
|
||||||
ASSYM(LINUX_SC_GS, offsetof(linux_sigcontext, sc_gs));
|
ASSYM(LINUX_SC_GS, offsetof(struct linux_sigcontext, sc_gs));
|
||||||
ASSYM(LINUX_SC_EFLAGS, offsetof(linux_sigcontext, sc_eflags));
|
ASSYM(LINUX_SC_EFLAGS, offsetof(struct linux_sigcontext, sc_eflags));
|
||||||
|
|
|
@ -15,8 +15,11 @@ struct proc;
|
||||||
#define SVR4_MACHDEP_JUST_REGS
|
#define SVR4_MACHDEP_JUST_REGS
|
||||||
#include <i386/svr4/svr4_machdep.h>
|
#include <i386/svr4/svr4_machdep.h>
|
||||||
|
|
||||||
ASSYM(SVR4_SIGF_HANDLER, offsetof(svr4_sigframe, sf_handler));
|
ASSYM(SVR4_SIGF_HANDLER, offsetof(struct svr4_sigframe, sf_handler));
|
||||||
ASSYM(SVR4_SIGF_UC, offsetof(svr4_sigframe, sf_uc));
|
ASSYM(SVR4_SIGF_UC, offsetof(struct svr4_sigframe, sf_uc));
|
||||||
ASSYM(SVR4_UC_FS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_FS]));
|
ASSYM(SVR4_UC_FS, offsetof(struct svr4_ucontext,
|
||||||
ASSYM(SVR4_UC_GS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_GS]));
|
uc_mcontext.greg[SVR4_X86_FS]));
|
||||||
ASSYM(SVR4_UC_EFLAGS, offsetof(svr4_ucontext, uc_mcontext.greg[SVR4_X86_EFL]));
|
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]));
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#define _SYS_ASSYM_H_
|
#define _SYS_ASSYM_H_
|
||||||
|
|
||||||
#ifndef offsetof
|
#ifndef offsetof
|
||||||
#define offsetof(s, m) (&((struct s*)0)->m)
|
#define offsetof(t, m) (&((t *)0)->m)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __assym
|
#ifndef __assym
|
||||||
|
|
Loading…
Reference in New Issue