time_t definition
Michael Sierchio
kudzu at tenebras.com
Mon Jan 21 05:47:29 UTC 2013
On Sun, Jan 20, 2013 at 8:07 PM, Garance A Drosehn <gad at freebsd.org> wrote:
> Yes, this means that the only reliable way to printf a time_t is
> to use a cast. That has been true for at least a decade. It may
> be true that you happened to avoid this issue before, but the only
> *RELIABLE* platform-independent way to print time_t's is via a cast.
Especially for variadic functions like printf. You can reasonably
assume that arithmetic expressions will automagically promote a type
to the proper size, but you (Garance) ably reinforce what we've been
trying to convey about this particular example.
Well, Brahma said, even after ten thousand explanations, a fool is no
wiser, but an intelligent man requires only two thousand five hundred.
- The Mahābhārata.
More information about the freebsd-questions
mailing list