Use (u)int64_t instead of long.