From owner-svn-src-all@FreeBSD.ORG Thu May 21 09:55:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F6196ED; Thu, 21 May 2015 09:55:00 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id D8C691256; Thu, 21 May 2015 09:54:59 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id D02251046DDD; Thu, 21 May 2015 19:54:35 +1000 (AEST) Date: Thu, 21 May 2015 19:54:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Baptiste Daroussin cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r283197 - head/usr.bin/soelim In-Reply-To: <201505210826.t4L8QOjm046615@svn.freebsd.org> Message-ID: <20150521190838.P1128@besplex.bde.org> References: <201505210826.t4L8QOjm046615@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=L/MkHYj8 c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=WW2Sk5bqCcaVpx34-WcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 May 2015 09:55:00 -0000 On Thu, 21 May 2015, Baptiste Daroussin wrote: > Log: > add an include on sys/types.h because we do explicitly use size_t > remove unused stdbool.h sys/types.h may be needed for some other typedef, but not for size_t. size_t is already declared in at least 3 other of the included headers: - and (C90 standard) - (POSIX.1-2001 standard) is a prerequisite for in POSIX.1-1990, and most section 2 man pages still document it as a prerequiste for their syscalls. They place it before the include of but are too fuzzy to document if it is a prerequisite for includes and thus gets size_t and lots of pollution. was cleaned up a bit in 2002, but the ifdefs for things like _SIZE_T_DECLARED in this cleanup are still nonsense, because still includes before these ifdefs and thus gets size_t and lots of pollution, much the same as in FreeBSD-1. Some of the section 2 headers were bogusly changed to say that sys/types.h is a prerequisite for their syscalls _after_ POSIX.1-2001 standardized it not being a prerequisite for for the syscalls declared there. It is needed for portability to pre-POSIX.1-2001 systems that are not polluted like FreeBSD, if any. IIRC, even POSIX.1-1990 permits (or any POSIX header) to declare any typedef ending in _t, so can declare size_t for itself and might even work without its prerequisite. Applications just cannot depend on this. In the previous change, the use of MAXPATHLEN regressed to use of PATH_MAX. MAXPATHLEN was honestly unportable. It defined in all (?) BSD systems. PATH_MAX only defined if {PATH_MAX} is constant. It is better to be honestly unportable than to use PATH_MAX incorrectly. MAXPATHLEN required the include of . That gave and lots of undocumented pollution. Apparently, none of the pollution was needed, not even . Bruce