From 16298053a2d285f9a06a02f298e389f20ebdc12c Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Sat, 7 Apr 2007 09:48:14 +0000 Subject: 20070407-1047 offsetof changes --- os/pc/fpi387.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'os/pc/fpi387.c') diff --git a/os/pc/fpi387.c b/os/pc/fpi387.c index d516bcf5..76677549 100644 --- a/os/pc/fpi387.c +++ b/os/pc/fpi387.c @@ -547,17 +547,16 @@ fstore(Ureg*, int op, void *mem, Internal *s, Internal*) } #define REG(x) (*(ulong*)(((char*)ur)+roff[(x)])) -#define offsetof(X) ((ulong)&((Ureg*)0)->X) static int roff[] = { - offsetof(ax), - offsetof(cx), - offsetof(dx), - offsetof(bx), - offsetof(ecode), /* ksp */ - offsetof(bp), - offsetof(si), - offsetof(di), + offsetof(Ureg, ax), + offsetof(Ureg, cx), + offsetof(Ureg, dx), + offsetof(Ureg, bx), + offsetof(Ureg, ecode), /* ksp */ + offsetof(Ureg, bp), + offsetof(Ureg, si), + offsetof(Ureg, di), }; static long -- cgit v1.2.3