Addresses comment #17379 (comment)
This replaces direct use of (often locale dependent) C library functions with our own integer parsing and formatting functions., as the developer notes recommend.
For parsing this introduces parse error checking that was not there before. In many cases it’s clear what to do on failure, but sometimes it’s not. It also adds explicitly sized types everywhere. Please pay attention to this while reviewing.
See individual commits for details.
This leaves the following “known violations”:
"src/bitcoin-tx.cpp.*trim_right"
boost function, out of scope"src/dbwrapper.cpp:.*vsnprintf"
copied function, the comment addresses this: https://github.com/bitcoin/bitcoin/blob/master/src/dbwrapper.cpp#L19"src/httprpc.cpp.*trim"
another boost function, out of scope"src/torcontrol.cpp:.*strtol"
octal parsing, out of scope"src/util/strencodings.cpp:.*strtol"
part ofParseInt32
andParseUInt32
, gated by our own checks"src/util/strencodings.cpp:.*strtoul"
part ofParseInt64
andParseUInt64