From owner-freebsd-arch Sat Jun 2 12:47:38 2001 Delivered-To: freebsd-arch@freebsd.org Received: from relay.nuxi.com (nuxi.cs.ucdavis.edu [169.237.7.38]) by hub.freebsd.org (Postfix) with ESMTP id AC77737B422 for ; Sat, 2 Jun 2001 12:47:33 -0700 (PDT) (envelope-from obrien@nuxi.ucdavis.edu) Received: from dragon.nuxi.com (root@trang.muxi.com [206.40.252.115] (may be forged)) by relay.nuxi.com (8.11.2/8.11.2) with ESMTP id f52JlXl83584; Sat, 2 Jun 2001 12:47:33 -0700 (PDT) (envelope-from obrien@NUXI.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.3/8.11.1) id f52JlWa82955; Sat, 2 Jun 2001 12:47:32 -0700 (PDT) (envelope-from obrien) Date: Sat, 2 Jun 2001 12:47:32 -0700 From: "David O'Brien" To: Matt Dillon Cc: David Wolfskill , arch@FreeBSD.ORG Subject: Re: time_t definition is worng Message-ID: <20010602124732.F31257@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG References: <200106012318.f51NI8w38590@bunrab.catwhisker.org> <200106020823.f528N5O98998@earth.backplane.com> <20010602085237.A73968@dragon.nuxi.com> <200106021739.f52Hd9V03943@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200106021739.f52Hd9V03943@earth.backplane.com>; from dillon@earth.backplane.com on Sat, Jun 02, 2001 at 10:39:09AM -0700 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 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 Sat, Jun 02, 2001 at 10:39:09AM -0700, Matt Dillon wrote: > Consistency is best, but breaking IA32 to match the already broken > Alpha port is the wrong solution. For consistency we should match Why is the Alpha port broken? time_t is 32-bits without question. Thus it must be an `int' on Alpha, IA-64, and sparc64. > what Solaris, Linux, and most other UNIX operating systems use, which > is 'long'. Our Alpha port is improperly using an int for time_t where > nearly every other 64 bit cpu port uses a (64 bit) long. I 100% disagree -- we should be consistent with FreeBSD and that matters more than other non-FreeBSD OS's. To get the same wrap around characteristics on our 64-bit platforms as our 32-bit ones, time_t must be an `int' on 64-bit platforms. BTW, NetBSD Alpha and sparc64 (ie, all their 64-bit platforms) have _BSD_TIME_T_ as `int'. HP-UX 11 defines it as `int32_t' so it is consistent across their 32-bit and 64-bit machines. > but we should absolutely not break the IA32 port because of that. > The IA32 port had it correct when it was 'long', allowing software > to be written in a portable manner between platforms and OSs > (except for our broken Alpha port) without any aches or pains. Why do you consider time_t == `int' on i386 broken? Just because of the printf() format string? > Certain core types like time_t > have serious limitations when declared as a fixed width type (int > nowadays). long is the perfect solution and you just blew that all to > hell with this commit. I am more than willing to define time_t as `long long' so it is 64-bits across the board. -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message