kern/104436: [PATCH] sys/sem.h should include sys/types.h

Cheng-Lung Sung clsung at FreeBSD.org
Sun Oct 15 18:21:01 PDT 2006


On Mon, Oct 16, 2006 at 01:21:59AM +1000, Bruce Evans wrote:
> On Sun, 15 Oct 2006, Cheng-Lung Sung wrote:
> 
> >System: FreeBSD.csie.nctu.edu.tw 6.1-STABLE FreeBSD 6.1-STABLE #9: Thu May 
> >11 14:31:45 CST 2006     
> >root at FreeBSD.csie.nctu.edu.tw:/home/usr.obj/usr/src/sys/FREEBSD  i386
> >
> >>Description:
> >- sys/sem.h has included sys/ipc.h, which includes sys/_types.h
> > but it (and its including files) does not include sys/types.h
> >- therefore, in sys/sem.h struct semid_ds declares "time_t sem_otime;" 
> >...etc
> >- if we only compile a program which do not include sys/types.h, it will 
> >fail.
> 
> Including sys/types.h would add lots of namespace pollution which
> sys/ipc.h and sys/sem.h are trying hard to avoid.   sem.h is trying too
> hard -- POSIX requires it to declare time_t (and pid_t, key_t and size_t,
> which it already declares).
> 
> Bruce

    You're right, I should try to pass COMMON_HEADERS to ruby-sysipc 
    instead of polluting namespace.

    Thanks,

-- 
Cheng-Lung Sung - clsung@
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061016/8da7814c/attachment.pgp


More information about the freebsd-hackers mailing list