[Top][All Lists]

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

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

From: Aharon Robbins
Subject: Re: [bug-gawk] gawk with dates before 1970
Date: Tue, 14 Apr 2015 21:25:30 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi Eli.

> I don't think we want to burden users of Gawk with intimate knowledge
> about the details of time functions on their system.  It is a simple
> test to see that the FP value fits into time_t limitations, so I don't
> see why not add that test, right where we test for negative values
> now.
> 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...



reply via email to

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