Re: __TIME_MIN/__TIME_MAX
From: Bruce Evans (bde_at_zeta.org.au)
Date: 11/15/03
- Previous message: Jacques A. Vidrine: "__TIME_MIN/__TIME_MAX"
- In reply to: Jacques A. Vidrine: "__TIME_MIN/__TIME_MAX"
- Next in thread: Jacques Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Reply: Jacques Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 15 Nov 2003 11:54:33 +1100 (EST) To: "Jacques A. Vidrine" <nectar@FreeBSD.org>
On Fri, 14 Nov 2003, Jacques A. Vidrine wrote:
> In at least one place in libc, it is necessary to range check a time_t
> value. One most platforms, time_t has the same range as `int', but
> on at least amd64, it has a larger range. Any objections to adding
> definitions of __TIME_MIN and __TIME_MAX to sys/${arch}/_limits.h?
>
> I could just do the usual check for lossage after casting, except that
> in theory time_t could be a floating-point value (but not in reality
> in FreeBSD). It seems cleaner to me to have an explicit range.
I prefer the cast. It doesn't require nonstandard infrastructure that
would need to be maintained forever, and works even better for floating
point too (assuming a C99 compiler, but not in reality in FreeBSD :)
(min/max checks don't work right for floating point because precision
may be just as important as range).
Bruce
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Jacques A. Vidrine: "__TIME_MIN/__TIME_MAX"
- In reply to: Jacques A. Vidrine: "__TIME_MIN/__TIME_MAX"
- Next in thread: Jacques Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Reply: Jacques Vidrine: "Re: __TIME_MIN/__TIME_MAX"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- [PATCH][PPC64] Handle altivec assist exception properly
... This is the PPC64 counterpart of the PPC32 Altivec assist exception ... Fortunately
there are only a limited set of altivec instructions ... +static unsigned int eexp2
... +/* Round to floating integer, ... (Linux-Kernel) - Re: sched_ule performance on single CPU
... SCHED_ULE and FreeBSD 7.0 on ... At this very moment I use a private AMD64
box, ... CPU 3500+ at 2,2 ... waiter (in computing, the CPU) to serve. ...
(freebsd-stable) - Re: [moderator] server upgrade
... from the current Pentium-II 300MHz server it runs on to an AMD64. ... FreeBSD
will be jumping from 4.x to 6.x. ... but the AMD64 support in 6.0-STABLE seems ...
(talk.origins) - Re: AMD64 Desktop Support
... Flash - The 32 bit Linux binary of Flash 7 works in linux-firefox or ... the
i386 version of FreeBSD, although I've found it to be somewhat ... I have not tested it
on my amd64 one (I just use ... since I have a decent video card, but the Flash
and Java I don't really ... (freebsd-questions) - FreeBSD on AMD64 3000+ - amd64 or i386 version of FreeBSD?
... motherboard comes back from it's RMA. ... I have an AMD64 3000+ processor.
... the amd64 version of FreeBSD. ... FreeBSD for my hardware for FreeBSD
5.4. ... (comp.unix.bsd.freebsd.misc)