Make <struct.h> #error instead of #warn that it is going away on jan 1st.

This commit is contained in:
Poul-Henning Kamp 2000-12-01 22:15:56 +00:00
parent 8fd61eaf91
commit 82e078d8f9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69498

View file

@ -39,19 +39,7 @@
#define _STRUCT_H_
#if __GNUC__
#warning "this file includes <struct.h> which is deprecated, use <stddef.h> instead"
#error "this file includes <struct.h> which is deprecated, use <stddef.h> instead"
#endif
/* Offset of the field in the structure. */
#define fldoff(name, field) \
((int)&(((struct name *)0)->field))
/* Size of the field in the structure. */
#define fldsiz(name, field) \
(sizeof(((struct name *)0)->field))
/* Address of the structure from a field. */
#define strbase(name, addr, field) \
((struct name *)((char *)(addr) - fldoff(name, field)))
#endif /* !_STRUCT_H_ */