From 46aa3347cb72a78253d66cee79e17413af61804c Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 27 Oct 2000 11:45:49 +0000 Subject: 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 Define offsetof() in terms of __offsetof() in and Remove myriad of local offsetof() definitions. Remove includes of in kernel code. NB: Kernelcode should *never* include from /usr/include ! Make include to avoid polluting the API. Deprecate 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 --- sys/dev/sym/sym_hipd.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sys/dev/sym') diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index fa6fcc2c203d..45f148abd3b1 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 -#include /* For offsetof */ #include /* @@ -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 -- cgit v1.3