bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] gawk with dates before 1970


From: Eli Zaretskii
Subject: Re: [bug-gawk] gawk with dates before 1970
Date: Tue, 14 Apr 2015 21:37:24 +0300

> From: Aharon Robbins <address@hidden>
> Date: Tue, 14 Apr 2015 21:25:30 +0300
> Cc: address@hidden, address@hidden, address@hidden
> 
> > IOW, it's a simple generalization of the current test: instead of
> > looking only at the sign, make sure the value is between the minimum
> > and the maximum allowed limits, and if not, yell bloody murder.
> 
> I'm not so sure it's simple. You have to know
> 
> - time_t is signed / unsigned / floating point
> - time_t is 32 or 64 bits if integer
> 
> Sounds like a bunch of autoconf machinery to determine these things
> and then a bunch of ugly tests to check if you have the macros for
> min/max signed/unsigned long/longlong and then if the values are in range.
> (GNULIB fodder, essentially.)
> 
> If it really is simple, please show me the code...

There are 2 macros in Gnulib's intprops.h, called TYPE_MINIMUM and
TYPE_MAXIMUM, which is all that we need.  Never mind their insanely
complex definitions, we just need to steal them, put them on some Gawk
header, and then use them.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]