mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55343
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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]));
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user