C
Chris McDonald
Apologies if the answer is staring me in the face.
Is there a preferred way to define the maximum value that may be held in a
variable of type time_t ?
On the two common machine-types and operating systems that I use, using
an equally common compiler, time_t is defined to be a signed 32-bit long.
On these platforms I can, thus, use the constant INT32_MAX.
However, I'd feel more comfortable using a constant named TIME_T_MAX, or
similar. Is there any advice along these lines?
(More accurately, I'm really seeking the maximum value that the runtime
environment will ever return from time(NULL); )
Thanks,
Is there a preferred way to define the maximum value that may be held in a
variable of type time_t ?
On the two common machine-types and operating systems that I use, using
an equally common compiler, time_t is defined to be a signed 32-bit long.
On these platforms I can, thus, use the constant INT32_MAX.
However, I'd feel more comfortable using a constant named TIME_T_MAX, or
similar. Is there any advice along these lines?
(More accurately, I'm really seeking the maximum value that the runtime
environment will ever return from time(NULL); )
Thanks,