Date: Sun, 28 Oct 2001 03:25:23 -0800 From: Mike Smith <msmith@freebsd.org> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: Mike Smith <msmith@FreeBSD.ORG>, arch@FreeBSD.ORG Subject: Re: 64 bit times revisited.. Message-ID: <200110281125.f9SBPNv26553@mass.dis.org> In-Reply-To: Your message of "Sat, 27 Oct 2001 21:03:57 PDT." <200110280403.f9S43vm88827@apollo.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> :
> :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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110281125.f9SBPNv26553>
