FW: Definition of time_t changed from signed to unsigned...
Clive D.W. Feather
clive at demon.net
Mon Jul 19 08:38:10 UTC 2004
Guy Harris said:
> o time_t and clock_t shall be integer or real-floating types.
> I infer from "size_t shall be an unsigned integer type" that "integer
> type" means "signed integer type" as opposed to "unsigned integer type";
"signed integer type" means signed integer type.
"integer type" means integer type, which can be signed, unsigned, or
neither. [Read the C Standard if "neither" is unclear.]
> if that inference is correct, use of "unsigned long" would violate the
It's wrong, and there is no such violation.
>> My question is: am I just using an obsolete version of the timezone source
>> or should I just change the time_t typedef in the OS?
> If you can, I'd change the time_t typedef in the OS.
Changing an OS-supplied definition is EXTREMELY DUMB. You're risking
breaking the OS interfaces.
If the tz code needs a signed type, it should invent its own name for it
and change all the definitions. If it needs the actual time_t type, then
the code should not be making assumptions about signedness or number of
Clive D.W. Feather | Work: <clive at demon.net> | Tel: +44 20 8495 6138
Internet Expert | Home: <clive at davros.org> | Fax: +44 870 051 9937
Demon Internet | WWW: http://www.davros.org | Mobile: +44 7973 377646
Thus plc | |
More information about the tz