Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/lib/libc/time
On Thu, 01 Aug 2013, David Holland wrote:
(I thought time_t was required to be an integer type, but I suppose
there's some legacy platform where it isn't.)
C99 requires time_t to be an arithmetic type.
C99 section 7.23.1 point 3 "The types declared are ... clock_t and
time_t which are arithmetic types capable of representing
times; ..."
POSIX adds that time_t must be an integer type.
<http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html>
"clock_t shall be an integer or real-floating type. [CX] [Option
Start] time_t shall be an integer type. [Option End]"
(The "[CX][Option Start]...[Option End]" just means "Extension to he
ISO C standard".)
The tzcode implementation goes to some trouble to be portable to
environments with integer or floating point types for time_t.
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index