> As that link shows ... The link explains, that one should not assume any datatype for time_t. Therefore, I would use it like an abstract data-type. However, the Asterisk project might have assumptions about the platform. Then, difftime(.) could be used: <http://stackoverflow.com/a/34108260>. Or even a typecast to uintmax_t plus %ju might be used instead: <http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html>.
> ... head off nuisance compiler messages ... With the wrong typecast, one could end up in Year 2038 problems. Therefore, instead of %lu, at least %llu is to be used. > ... some compilers are stupid enough to still complain ... On the latest OpenBSD with its base compiler clang, I get several compiler warnings related to this. I have to fix those now. So, it is more about the platform in my case. Therefore, I am asking. Looking at those code parts, I prefer %ju plus a typecast to uintmax_t right now. -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
