Subject: Re: struct msgbuf contents.
To: Chris G. Demetriou <>
From: Simon Burge <simonb@NetBSD.ORG>
List: tech-kern
Date: 06/15/2000 10:45:34
Chris G. Demetriou wrote:

> Simon Burge <simonb@NetBSD.ORG> writes:
> > That crossed my mind, but what if some random file included
> > <sys/msgbuf.h> before <sys/types.h> and then didn't see the define?
> > By making it a mandatory define you wouldn't get this problem...
> i'm sure that some would say "if sys/msgbuf.h needs sys/types.h
> included first, then it should include it...

At the moment, <sys/msgbuf.h> doesn't need <sys/types.h> to be included
first - look at the current dmesg.c for example.  I guess we could do a

	#ifndef _KERNEL
	#include <sys/types.h>

at the top of <sys/msgbuf.h> to fix this...

> for the kernel, at least, it _does_ need defns of caddr_t and size_t,
> as well as __P...

Same as above - technically there's no reason why a kernel file doesn't:

	#include <sys/msgbuf.h>
	#include <sys/types.h>