Andy Jackman wrote:
Hi,
I'm using redhat 7.4 and in bits/types.h time_t is defined as long int.
This causes a wrap in 2038 (as I'm sure you all know).

That's only true if your "long int" is 32 bits. On a 64 bit platform, which you're quite likely to be using in less than 35 years, a long int is probably 64 bits, and you will never have cause for concern.


I need both date and time. I can write my own date
to/from string routines.

For the love of everyone who will ever be associated with your code: don't do that. You will probably be using a 64 bit platform such as PPC, Itanium, or Opteron very soon, and on that platform your clock will outlive the sun. Stick with the libc date functions, and you'll be fine.


> Is there a 64 bit
version of time() available for the current version(s) of linux?

On 64 bit platforms, yes.




--
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to