From owner-freebsd-arch Sun Oct 28 7:33:36 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 7B88237B405 for ; Sun, 28 Oct 2001 07:33:33 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id CAA02802; Mon, 29 Oct 2001 02:33:19 +1100 Date: Mon, 29 Oct 2001 02:32:20 +1100 (EST) From: Bruce Evans X-X-Sender: To: Bernd Walter Cc: Matthew Dillon , Subject: Re: illegal &time_t useage in /usr/src In-Reply-To: <20011028113509.A48670@cicely8.cicely.de> Message-ID: <20011029022409.P3648-100000@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 28 Oct 2001, Bernd Walter wrote: > What about struct timespec and struct timeval? > There is no functional need to have long defined tv_nsec and tv_usec > fields as long as no spec says so. Specs do say so. timespec is { time_t tv_sec; long tv_nsec; } (POSIX.1-1996). timeval is { time_t tv_sec; suseconds_t tv_usec; } (draft POSIX.1-200x). suseconds_t is a signed integer type capable of storing values at least in the range [-1, 1000000]. So you can change the type of tv_usec (but shouldn't, because it is specified to be long by old defacto standards), but you can't change tv_nsec (and neither can standards, because it is specified to be long by old standards). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message