Date: Mon, 4 Jun 2001 03:24:25 +1000 (EST) From: Bruce Evans <bde@zeta.org.au> To: "David O'Brien" <obrien@FreeBSD.ORG> Cc: John Polstra <jdp@polstra.com>, arch@FreeBSD.ORG, drosih@rpi.edu Subject: Re: time_t definition is wrong Message-ID: <Pine.BSF.4.21.0106040307050.50919-100000@besplex.bde.org> In-Reply-To: <20010603011621.A88949@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106040307050.50919-100000>