From owner-freebsd-arch Sun Jun 3 10:26: 9 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 64EB137B401; Sun, 3 Jun 2001 10:26:06 -0700 (PDT) (envelope-from bde@zeta.org.au) 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 DAA11684; Mon, 4 Jun 2001 03:26:02 +1000 Date: Mon, 4 Jun 2001 03:24:25 +1000 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: "David O'Brien" Cc: John Polstra , arch@FreeBSD.ORG, drosih@rpi.edu Subject: Re: time_t definition is wrong In-Reply-To: <20010603011621.A88949@dragon.nuxi.com> Message-ID: 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, 3 Jun 2001, David O'Brien wrote: > On Sat, Jun 02, 2001 at 01:43:15PM -0700, John Polstra wrote: > > I'd prefer to keep it as "long" at least on the i386, because that's > > what the type was for years before ANSI renamed it to "time_t". > > We will have to special case all of our code that uses time_t and > printf() since our 64-bit types will be "%d", not "%ld", and we'll have > to hope all the i386 users remember that when they change things in > /usr/src/. I still think it is better to use a consistent time_t > definition (and printf format specifier) across all FreeBSD platforms. Both would be broken. > But if the wind is really swaying that way... I'll concede. Just back out the change in released versions. BTW, no one complained when similar changes were made to daddr_t, dev_t, gid_t, ino_t, pid_t and uid_t. These had type long or "unsigned long" in 4.4BSD-Lite and FreeBSD-2.x. They were changed to fixed-width types in 4.4BSD-Lite2 and FreeBSD-3.0 (and earlier in NetBSD?). They all have width 32 bits, so they all changed on i386's, because int32_t and uint32_t are declared as int and "unsigned int", respectively. Bug for bug compatibility with Lite1 would have required int32_t to have the unnatural type "long" on i386's. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message