diff options
| author | Charles.Forsyth <devnull@localhost> | 2007-04-07 09:48:14 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2007-04-07 09:48:14 +0000 |
| commit | 16298053a2d285f9a06a02f298e389f20ebdc12c (patch) | |
| tree | 6f6c15ee31d9d2b337ac8f8d2801898f2fe66523 /os/pc | |
| parent | b5eeadad52f7e620402f85c9606f45be13323b8d (diff) | |
20070407-1047 offsetof changes
Diffstat (limited to 'os/pc')
| -rw-r--r-- | os/pc/fpi387.c | 17 | ||||
| -rw-r--r-- | os/pc/sd53c8xx.c | 2 |
2 files changed, 8 insertions, 11 deletions
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 diff --git a/os/pc/sd53c8xx.c b/os/pc/sd53c8xx.c index 88a679c8..2d1329af 100644 --- a/os/pc/sd53c8xx.c +++ b/os/pc/sd53c8xx.c @@ -1879,8 +1879,6 @@ static Variant variant[] = { { SYM_1011_DID, 0xff, "SYM53C1010", Burst128, 16, 64, Prefetch|LocalRAM|BigFifo|Wide|Ultra|Ultra2 }, }; -#define offsetof(s, t) ((ulong)&((s *)0)->t) - static int xfunc(Controller *c, enum na_external x, unsigned long *v) { |
