int and long are 32-bit on Windows, causing overflows. (cherry picked from commit 85b1978408)
85b1978408