From owner-freebsd-hackers@FreeBSD.ORG Thu Feb 1 18:45:55 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EFDDC16A400 for ; Thu, 1 Feb 2007 18:45:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 931C013C48E for ; Thu, 1 Feb 2007 18:45:55 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l11IiD2u062721; Thu, 1 Feb 2007 11:44:14 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 01 Feb 2007 11:44:44 -0700 (MST) Message-Id: <20070201.114444.29501661.imp@bsdimp.com> To: freebsd-listen@fabiankeil.de From: "M. Warner Losh" In-Reply-To: <20070131153114.4e76a6ea@localhost> References: <86odofjyua.fsf@dwp.des.no> <20070131105024.L91177@fledge.watson.org> <20070131153114.4e76a6ea@localhost> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 01 Feb 2007 11:44:14 -0700 (MST) Cc: freebsd-hackers@freebsd.org Subject: Re: a question regarding X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2007 18:45:56 -0000 In message: <20070131153114.4e76a6ea@localhost> Fabian Keil writes: : Robert Watson wrote: : = : > On Wed, 31 Jan 2007, Dag-Erling Sm=F8rgrav wrote: : > = : > > Pascal Hofstee writes: : > >> Any additional sugestions/objections are always greatly apprecia= ted. : > > : > > On 32-bit platforms (i386, powerpc), int is a 32-bit signed integ= er while = : > > size_t is a 32-bit unsigned integer. : > > : > > On 64-bit platforms (amd64, sparc64 etc), int is a 32-bit signed = integer = : > > while size_t is a 64-bit unsigned integer. : > > : > > In both cases, changing this structure member from int to size_t = will break = : > > the ABI. : > > : > > This doesn't mean you shouldn't do it, just that it should be don= e with = : > > care. : > = : > If we do decide to go ahead with the ABI change, there are a number= of other = : > things that should be done simultaneously, such as changing the uid= and gid = : > fields to uid_t and gid_t. : = : struct tm's members could be changed as well. struct tm doesn't have a member that's tv_sec. Maybe you mean struct timeval and struct timespec? : Quoting a response I got from Juliusz Chroboczek : (the author of Polipo) after reporting a compiler : warning: : = : |By the way, IEEE 1003.1-2003 says that tv_sec should be a time_t, : |hence by making it a long, FreeBSD and NetBSD are violating the POSI= X : |standard. Could you please file a bug report with them? : = : I didn't find any claims about FreeBSD being IEEE 1003.1-2003 : compliant and therefore didn't consider it a bug, but given that : the topic is *_t changes and time_t hasn't come up yet, : I'd like to mention it anyway. I think this is already fixed: /* * Structure returned by gettimeofday(2) system call, and used in other= calls. */ struct timeval { time_t tv_sec; /* seconds */ suseconds_t tv_usec; /* and microseconds */ }; as is timespec: struct timespec { time_t tv_sec; /* seconds */ long tv_nsec; /* and nanoseconds */ }; Warner