Replace %ld/%lu with %jd/%ju and cast to intmax_t/uintmax_t