diff options
author | phk <phk@FreeBSD.org> | 2000-10-27 11:45:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2000-10-27 11:45:49 +0000 |
commit | 54ca48450cf20c453a092aa95d086cd5c5751fcf (patch) | |
tree | 479cfa046c848adf9e8ada76b004eeda743154db /sys/dev/sym | |
parent | ea5581599fd86937f5f773c8e66aedd6a3524383 (diff) | |
download | FreeBSD-src-54ca48450cf20c453a092aa95d086cd5c5751fcf.zip FreeBSD-src-54ca48450cf20c453a092aa95d086cd5c5751fcf.tar.gz |
Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various.
Significant brucifications by: bde
Diffstat (limited to 'sys/dev/sym')
-rw-r--r-- | sys/dev/sym/sym_hipd.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index fa6fcc2..45f148a 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -62,7 +62,6 @@ /* #define SYM_DEBUG_GENERIC_SUPPORT */ #include <pci.h> -#include <stddef.h> /* For offsetof */ #include <sys/param.h> /* @@ -393,9 +392,6 @@ static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head) /* * These ones should have been already defined. */ -#ifndef offsetof -#define offsetof(t, m) ((size_t) (&((t *)0)->m)) -#endif #ifndef MIN #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif |