pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mktime() problem when building print/a2ps
Am Fri, Oct 14, 2022 at 05:55:00PM +0200 schrieb Martin Husemann:
> The other part of the puzzle: the code tries to find the maximum and the
> minimum values representable as time_t, which would be for unsigned time_t
> simply: (timt_t)0 and (time_t)~0, but for signed time_t are a bit more tricky
> to find, something like:
time_t time_max = (((time_t)1 << (CHAR_BIT * (sizeof (time_t)) - 2)) - 1) * 2 + 1;
time_t time_min = -(((time_t)1 << (CHAR_BIT * (sizeof (time_t)) - 2))) * 2;
Joerg
Home |
Main Index |
Thread Index |
Old Index