remove printf redefinition from bitcoinrpc.cpp
- as the redefiniton of printf happens in util.h, which is included in
bitcoinrpc.cpp, we don't need another redefinition
Are you sure this is a no-op? Maybe one of the included header files between the undef and the define needs the original, or tries to define printf by itself?
It was this pull, who included this change 69d605f, but as you see between the #undef and the #define are only boost or std headers, well I'm not sure it's a no-op, but compilation and running the client is working fine. We include util.h quite often and it's mostly before boost headers...
@laanwj It was your pull, perhaps you can enlighten this?
That line is actually ancient.
It's showing up the text as being from me because I renamed src/rpc.cpp to src/bitcoinrpc.cpp. However, the line was in there way before that.
Some deeper git forensics shows that the first commit in which the printf redefinition was in src/rpc.cpp was 84c3fb0. This appears to be also a reorganization commit, in which /rpc.cpp was renamed to src/rpc.cpp.
Digging even deeper, 22f721d was really the first commit in which it was introduced (by Satoshi himself).
Looks like it was added for "MSVC 8 compatibility".
FYI, the git command to grep a while throughout all commits:
git grep OutputDebugStringF $(git log --pretty=format:%h) -- rpc.cpp
Thanks for digging, although I'm still not sure if it's needed there or not. MSVC 8 is ancient, also.
No one knows. I'm ok with removing it. After all, as you say, all the rpc*.cpp spinoffs work fine without it.
Though my real preference would still be to remove the re-definition of printf, rename OutputDebugStringF to some sane name such as debug_log(), and use that throughout the source code. But I don't think everyone agrees.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/ed552cfae078778ebaebf1786bad0305ee730479 for binaries and test log.