Commit Graph

6 Commits

Author SHA1 Message Date
Mike Barcroft
ba5fe51088 Move __offsetof() macro from <machine/ansi.h> to <sys/cdefs.h>. It's
hardly MD, since all our platforms share the same macro.  It's not
really compiler dependent either, but this helps in reducing
<machine/ansi.h> to only type definitions.
2002-07-08 16:43:35 +00:00
David E. O'Brien
640f0e5d3c Back out rev 1.4 (wint_t and mbstate_t) as I am tired of the complaints.
The STLport will probably become broken again, but I'll work on fixing it
later.

I wish someone would explain why the NetBSD Cirtus branch has the types
in their stddef.h...

Requested by:	bde, ru
PR:		27606
Submitted by:	Naohiko Tsuji <yakisoba@f2.dion.ne.jp>
2001-05-24 19:29:15 +00:00
David E. O'Brien
ada3b4c366 Add mbstate_t and wint_t. 2001-05-18 05:50:26 +00:00
Poul-Henning Kamp
46aa3347cb 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
2000-10-27 11:45:49 +00:00
Bruce Evans
cdd84b0211 Fixed longstanding namespace convolution involving rune_t vs wchar_t.
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to
be included before <stddef.h> or <stdlib.h> to get rune_t declared.
Now rune_t is declared perfectly bogusly in all cases when <ctype.h>
is included.

This change breaks similar (but more convoluted) convolutions in the
stddef.h in gcc distributions.  Ports of gcc should avoid using the
gcc headers.
1996-05-01 00:40:10 +00:00
Rodney W. Grimes
59deaec541 BSD 4.4 Lite Include Sources 1994-05-24 09:57:34 +00:00