From owner-freebsd-current@FreeBSD.ORG Tue Oct 17 01:39:13 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AE4F716A403; Tue, 17 Oct 2006 01:39:13 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EDF643D53; Tue, 17 Oct 2006 01:39:13 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id 342D4509051; Tue, 17 Oct 2006 11:39:11 +1000 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 20B752742C; Tue, 17 Oct 2006 11:39:10 +1000 (EST) Date: Tue, 17 Oct 2006 11:39:09 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200610161431.25228.jhb@freebsd.org> Message-ID: <20061017113234.V67620@delplex.bde.org> References: <20061015135710.A28897E98D@FreeBSD.csie.nctu.edu.tw> <20061016011559.W61639@delplex.bde.org> <200610161431.25228.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Mailman-Approved-At: Tue, 17 Oct 2006 02:20:17 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-bugs@freebsd.org, Cheng-Lung Sung , FreeBSD-gnats-submit@freebsd.org, freebsd-current@freebsd.org Subject: Re: kern/104436: [PATCH] sys/sem.h should include sys/types.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Oct 2006 01:39:13 -0000 [This is still being sent to too many mailing lists since I don't know which ones it should go to except gnats.] On Mon, 16 Oct 2006, John Baldwin wrote: >> 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). > > Is this better? > > Index: sem.h > =================================================================== > RCS file: /usr/cvs/src/sys/sys/sem.h,v > retrieving revision 1.29 > diff -c -r1.29 sem.h > *** sem.h 17 Nov 2004 13:12:06 -0000 1.29 > --- sem.h 16 Oct 2006 18:30:05 -0000 > *************** > *** 111,116 **** > --- 111,121 ---- > #define _SIZE_T_DECLARED > #endif > > + #ifndef _TIME_T_DECLARED > + typedef __time_t time_t; > + #define _TIME_T_DECLARED > + #endif > + > #ifndef _PID_T_DECLARED > typedef __pid_t pid_t; > #define _PID_T_DECLARED > > (it looks like pid_t should be before size_t in sem.h btw) Good. (I didn't check if there are any other missing typedefs.) Please commit. The old typedefs also have non-KNF whitespace. sys/ipc.h is better. Bruce