bitcoin/bitcoin — pull request #4636 by Diapolo (2014-08-05 11:42:11+00:00)
Title: small cleanup - use of CloseSocket()

- call CloseSocket() before printing any text (ensure consistent
usage in the code), exception is when using NetworkErrorString()
- also use same form and comment for disabling sigpipe

Includes also a minor compat.h cleanup (leftover from the old pull #4348).