From owner-freebsd-arch Sun Oct 28 3:12:55 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mass.dis.org (mass.dis.org [216.240.45.41]) by hub.freebsd.org (Postfix) with ESMTP id 1D74237B401; Sun, 28 Oct 2001 03:12:49 -0800 (PST) Received: from mass.dis.org (localhost [127.0.0.1]) by mass.dis.org (8.11.6/8.11.3) with ESMTP id f9SBPNv26553; Sun, 28 Oct 2001 03:25:35 -0800 (PST) (envelope-from msmith@mass.dis.org) Message-Id: <200110281125.f9SBPNv26553@mass.dis.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Matthew Dillon Cc: Mike Smith , arch@FreeBSD.ORG Subject: Re: 64 bit times revisited.. In-reply-to: Your message of "Sat, 27 Oct 2001 21:03:57 PDT." <200110280403.f9S43vm88827@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 28 Oct 2001 03:25:23 -0800 From: Mike Smith 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 > : > :Please write a library routine that detects and compensates for: > : > : > : int t; > : > : time(&t); > : > :Until you can do this, sorry, no. > > Sorry, your statement makes no sense. I'm sorry you can't parse this; it's a simplified version of Garrett's perfectly valid point that prototypes won't save you from pass-by-reference, which is a major problem here. > Besides, if the programmer > includes time.h the above will generate compiler warnings, so > that's actually the easiest case to catch. You (mistakenly) assume that the programmer is going to be looking at these warnings, let alone enable them in the first place. The above code has worked for decades, why should it change now? > I'll tell you what, why don't YOU write a library routine that > detects this: > > /* no includes */ > int x; > > lseek(fd, x, 0); > > Oops! That doesn't work either! Are you going to change our off_t > from 64 back to 32 bits? No? Well, then I'm afraid you are going > to have to just live with it. The two cases aren't comparable. The first is typically written int t; time((time_t *)&t); to shut the compiler up in the first place, and even with a prototype for time() in scope, will still generate broken code. Again I say; you are introducing a gratuitous and evil change to satisfy a vested minority interest. Though I don't know why I bother trying to convince you, since you're not in a position to recognise this anyway. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message