On Monday, December 22, 2003, at 03:51 PM, Eljay Love-Jensen wrote:
Hi Rich,Thanks, I don't know why but it takes me a bit of effort to accept the need for a cast--especially after all the effort that went into typedefs for int32_t, __time_t, etc.
Try this: printf ( "%ld seconds into the epoch\n", (long int)now.tv_sec );
I rationalize the cast as producing "what printf" expects rather than what "the data is". It also helps to realize that it will work with 64-bit architectures, no matter what __time_t is defined to be.
--rich