bitcoin/bitcoin — pull request #3735 by laanwj (2014-02-24 08:17:51+00:00)
Title: Remove PRIx64 usage completely

Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so our definition collided with the system header definition. We cannot fix this with just macro redefinition so we need to change the usage sites.

First commit: apply the following script to all .cpp and .h files:

# Middle
sed -i 's/"PRIx64"/x/g' "$1"
sed -i 's/"PRIu64"/u/g' "$1"
sed -i 's/"PRId64"/d/g' "$1"
# Initial
sed -i 's/PRIx64"/"x/g' "$1"
sed -i 's/PRIu64"/"u/g' "$1"
sed -i 's/PRId64"/"d/g' "$1"
# Trailing
sed -i 's/"PRIx64/x"/g' "$1"
sed -i 's/"PRIu64/u"/g' "$1"
sed -i 's/"PRId64/d"/g' "$1"

Second commit removes the definitions from `util.h`. The remaining definitions for PRIsz/PRIpd are our own, so keep them.