From owner-freebsd-arch@FreeBSD.ORG Wed Jul 9 16:48:35 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5424E4D3 for ; Wed, 9 Jul 2014 16:48:35 +0000 (UTC) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 271022221 for ; Wed, 9 Jul 2014 16:48:34 +0000 (UTC) Received: from jre-mbp.elischer.org (ppp121-45-250-191.lns20.per2.internode.on.net [121.45.250.191]) (authenticated bits=0) by vps1.elischer.org (8.14.9/8.14.9) with ESMTP id s69GmOWM055050 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 9 Jul 2014 09:48:28 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <53BD7252.1010605@freebsd.org> Date: Thu, 10 Jul 2014 00:48:18 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-arch@freebsd.org Subject: Re: sys/proc.h inclusion of sys/time.h References: <53BC4F49.7000903@FreeBSD.org> <20140708210727.GA63071@stack.nl> In-Reply-To: <20140708210727.GA63071@stack.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 16:48:35 -0000 On 7/9/14, 5:07 AM, Jilles Tjoelker wrote: > On Tue, Jul 08, 2014 at 03:06:33PM -0500, Bryan Drewery wrote: >> In r34924 sys/proc.h was changed to only include sys/time.h if not >> building in kernel. >> [snip] >> (Why am I doing this? I need PID_MAX and NO_PID for a tcpdump change I >> am testing that is intended for upstreaming. Perhaps I can use >> kern.pid_max in __FreeBSD__ and other hacks on other platforms, I have >> not yet decided on this.) which I do every so often (*).. it's also needed for ibsc binaries (SCO?) which I have NEVER done. (*) about a year ago, compilinga freebsd-1.1 system on a fast modern system took just a few minutes. > The kern.pid_max sysctl is mostly intended for running FreeBSD 1.0 > binaries, which have a 16-bit pid_t. Therefore, it is run-time > adjustable and existing processes may have a pid higher than its value. > > Ideally, you do not need PID_MAX and NO_PID; try to use a variable of > type pid_t only for a process ID and store flags elsewhere. There may be > a problem if you need to read pid_t from an internal structure or > message, though. >