On September 20, 2022 5:22 PM Paul Eggert wrote:
>Don't assume that time_t fits in long, as some hosts (e.g., glibc x86 -
>D_TIME_BITS=64) have 32-bit long and 64-bit time_t.
>This fix uses C99 sprintf/scanf %jd and %ju, which is safe to assume
nowadays.

I am sorry to say that the %j prefix is not safe or portable. There are
major production platforms where this is not supported. I work on one of
them. %l and %ll are supportable and can be selected with a configuration
knob that would be safer.
-Randall


Reply via email to