Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Oct 2006 15:30:31 GMT
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/104436: [PATCH] sys/sem.h should include sys/types.h
Message-ID:  <200610151530.k9FFUVkP015105@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/104436; it has been noted by GNATS.

From: Bruce Evans <bde@zeta.org.au>
To: Cheng-Lung Sung <clsung@FreeBSD.org>
Cc: FreeBSD-gnats-submit@FreeBSD.org, freebsd-hackers@FreeBSD.org, 
    freebsd-current@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject: Re: kern/104436: [PATCH] sys/sem.h should include sys/types.h
Date: Mon, 16 Oct 2006 01:21:59 +1000 (EST)

 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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610151530.k9FFUVkP015105>