I noticed (during [0]) to some uses of the function atol() seem
inappropriate. Either they assume that sizeof(long)==8 and so might
truncate data if not, or they are gratuitous because the surrounding
code does not use the long type. This patch fixes these, by using
atoll() or atoi() instead. (There are still some atol() calls left
after this, which seemed ok to me.)
In the past, Windows didn't have atoll(), but the online documentation
appears to indicate that this now works in VS 2015 and later, which is
what we support at the moment. The Cirrus CI passes.
[0]:
https://www.postgresql.org/message-id/flat/5d216d1c-91f6-4cbe-95e2-b4cbd930520c@ewie.name