Merge #20221: net: compat.h related cleanup

cadb77a6ab net: Add compat.h header for htonl function (Hennadii Stepanov)
f796f0057b net: Drop unneeded headers when compat.h included (Hennadii Stepanov)
467c346448 net: Drop unneeded Windows headers in compat.h (Hennadii Stepanov)

Pull request description:

  It is the `compat.h` header's job to provide platform-agnostic interfaces for internet operations.
  No need in `#include <arpa/inet.h>` scattered around.

ACKs for top commit:
  practicalswift:
    re-ACK cadb77a6ab: patch looks even better
  laanwj:
    Code review ACK cadb77a6ab

Tree-SHA512: 625ff90b2806310ab856a6ca1ddb6d9a85aa70f342b323e8525a711dd12219a1ecec8373ec1dca5a0653ffb11f9b421753887b25615d991ba3132c1cca6a3c6e
This commit is contained in:
Wladimir J. van der Laan 2020-12-03 14:52:23 +01:00
commit a0489f3472
No known key found for this signature in database
GPG Key ID: 1E4AED62986CD25D
4 changed files with 2 additions and 17 deletions

View File

@ -18,11 +18,7 @@
#undef FD_SETSIZE // prevent redefinition compiler warning
#endif
#define FD_SETSIZE 1024 // max number of fds in fd_set
#include <winsock2.h> // Must be included before mswsock.h and windows.h
#include <mswsock.h>
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <stdint.h>
#else

View File

@ -33,13 +33,6 @@
#include <support/events.h>
#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>
#ifdef _XOPEN_SOURCE_EXTENDED
#include <arpa/inet.h>
#endif
#endif
/** Maximum size of http request (request line + headers) */
static const size_t MAX_HEADERS_SIZE = 8192;

View File

@ -33,11 +33,6 @@
#include <memory>
#include <condition_variable>
#ifndef WIN32
#include <arpa/inet.h>
#endif
class CScheduler;
class CNode;
class BanMan;

View File

@ -7,6 +7,7 @@
#include <chainparams.h>
#include <chainparamsbase.h>
#include <compat.h>
#include <crypto/hmac_sha256.h>
#include <net.h>
#include <netaddress.h>