From: Christopher Dykes Date: Mon, 30 May 2016 23:05:21 +0000 (-0700) Subject: Switch uses of networking headers to X-Git-Tag: 2016.07.26~178 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=46f3788d8acb3d351698d9ffff551807c807caa7;p=folly.git Switch uses of networking headers to Summary: Diff #14 of 14. This just switches the includes of the headers, it does not make the adjustments actually required to work for MSVC. Reviewed By: mzlee Differential Revision: D3249009 fbshipit-source-id: 434f58a7b8f4d0b7d142bc6a4abed8d95c953a7f --- diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index 9d50e82a..71eee1d8 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -17,10 +17,10 @@ #include #include -#include #include #include +#include #include namespace folly { diff --git a/folly/SocketAddress.h b/folly/SocketAddress.h index 1953e213..d48f3ccc 100644 --- a/folly/SocketAddress.h +++ b/folly/SocketAddress.h @@ -17,10 +17,6 @@ #pragma once #include -#include -#include -#include -#include #include #include #include @@ -28,6 +24,7 @@ #include #include #include +#include namespace folly { diff --git a/folly/Subprocess.cpp b/folly/Subprocess.cpp index c208de51..1e294ba7 100644 --- a/folly/Subprocess.cpp +++ b/folly/Subprocess.cpp @@ -24,7 +24,6 @@ #include #endif #include -#include #include #include @@ -41,6 +40,7 @@ #include #include #include +#include #include constexpr int kExecFailure = 127; diff --git a/folly/detail/IPAddress.h b/folly/detail/IPAddress.h index 19dba372..b92ce657 100644 --- a/folly/detail/IPAddress.h +++ b/folly/detail/IPAddress.h @@ -26,25 +26,11 @@ #include #include #include - -extern "C" { -#ifndef _MSC_VER -#include -#include -#include -#else -#include -#include -// missing in socket headers -#define sa_family_t ADDRESS_FAMILY -#endif - #include -#include -} #include #include +#include // BSDish platforms don't provide standard access to s6_addr16 #ifndef s6_addr16 diff --git a/folly/detail/SocketFastOpen.h b/folly/detail/SocketFastOpen.h index a372a902..1295a1e6 100644 --- a/folly/detail/SocketFastOpen.h +++ b/folly/detail/SocketFastOpen.h @@ -16,7 +16,7 @@ #pragma once -#include +#include #include #if !defined(FOLLY_ALLOW_TFO) && defined(TCP_FASTOPEN) && defined(MSG_FASTOPEN) diff --git a/folly/experimental/io/test/AsyncIOTest.cpp b/folly/experimental/io/test/AsyncIOTest.cpp index e117ebdb..eae19c1d 100644 --- a/folly/experimental/io/test/AsyncIOTest.cpp +++ b/folly/experimental/io/test/AsyncIOTest.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include namespace fs = folly::fs; using folly::AsyncIO; diff --git a/folly/io/ShutdownSocketSet.cpp b/folly/io/ShutdownSocketSet.cpp index 024d1455..9114c8f0 100644 --- a/folly/io/ShutdownSocketSet.cpp +++ b/folly/io/ShutdownSocketSet.cpp @@ -16,7 +16,6 @@ #include -#include #include #include @@ -26,6 +25,7 @@ #include #include +#include namespace folly { diff --git a/folly/io/async/AsyncSSLSocket.cpp b/folly/io/async/AsyncSSLSocket.cpp index c972c877..1656589c 100644 --- a/folly/io/async/AsyncSSLSocket.cpp +++ b/folly/io/async/AsyncSSLSocket.cpp @@ -17,17 +17,15 @@ #include #include +#include #include #include #include -#include -#include #include #include #include #include -#include #include #include diff --git a/folly/io/async/AsyncSSLSocket.h b/folly/io/async/AsyncSSLSocket.h index af3fd06b..b4e4ca47 100644 --- a/folly/io/async/AsyncSSLSocket.h +++ b/folly/io/async/AsyncSSLSocket.h @@ -16,7 +16,6 @@ #pragma once -#include #include #include @@ -33,6 +32,7 @@ #include #include #include +#include namespace folly { diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp index 5d15ff49..bc68a309 100644 --- a/folly/io/async/AsyncServerSocket.cpp +++ b/folly/io/async/AsyncServerSocket.cpp @@ -26,12 +26,11 @@ #include #include #include +#include #include #include -#include #include -#include #include namespace folly { diff --git a/folly/io/async/AsyncServerSocket.h b/folly/io/async/AsyncServerSocket.h index 9214d231..d2f5002b 100644 --- a/folly/io/async/AsyncServerSocket.h +++ b/folly/io/async/AsyncServerSocket.h @@ -24,9 +24,10 @@ #include #include #include +#include + #include #include -#include #include #include #include diff --git a/folly/io/async/AsyncSocket.cpp b/folly/io/async/AsyncSocket.cpp index c35d7b47..0fe8e886 100644 --- a/folly/io/async/AsyncSocket.cpp +++ b/folly/io/async/AsyncSocket.cpp @@ -21,17 +21,14 @@ #include #include #include +#include #include #include -#include #include #include #include #include -#include -#include -#include #include using std::string; diff --git a/folly/io/async/AsyncSocket.h b/folly/io/async/AsyncSocket.h index 37fdf08e..2a77ac3b 100644 --- a/folly/io/async/AsyncSocket.h +++ b/folly/io/async/AsyncSocket.h @@ -25,7 +25,8 @@ #include #include #include -#include +#include + #include #include diff --git a/folly/io/async/AsyncUDPSocket.cpp b/folly/io/async/AsyncUDPSocket.cpp index 236e60e6..2166f848 100644 --- a/folly/io/async/AsyncUDPSocket.cpp +++ b/folly/io/async/AsyncUDPSocket.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/folly/io/async/NotificationQueue.h b/folly/io/async/NotificationQueue.h index 0f26d88d..625d64ed 100644 --- a/folly/io/async/NotificationQueue.h +++ b/folly/io/async/NotificationQueue.h @@ -16,7 +16,6 @@ #pragma once -#include #include #include @@ -35,6 +34,7 @@ #include #include #include +#include #include #include diff --git a/folly/io/async/SSLContext.h b/folly/io/async/SSLContext.h index e3ebaf5f..81c8a210 100644 --- a/folly/io/async/SSLContext.h +++ b/folly/io/async/SSLContext.h @@ -24,12 +24,12 @@ #include #include +// This has to come before SSL. +#include + #include #include -#include -#include - #include #ifndef FOLLY_NO_CONFIG diff --git a/folly/io/async/ssl/OpenSSLUtils.cpp b/folly/io/async/ssl/OpenSSLUtils.cpp index c276f6d6..4df8b3b0 100644 --- a/folly/io/async/ssl/OpenSSLUtils.cpp +++ b/folly/io/async/ssl/OpenSSLUtils.cpp @@ -15,15 +15,13 @@ */ #include #include +#include #include #include #include #include -#include -#include - #include namespace folly { diff --git a/folly/io/async/ssl/OpenSSLUtils.h b/folly/io/async/ssl/OpenSSLUtils.h index 5d232c44..7f211bfd 100644 --- a/folly/io/async/ssl/OpenSSLUtils.h +++ b/folly/io/async/ssl/OpenSSLUtils.h @@ -15,10 +15,9 @@ */ #pragma once -#include +#include -#include -#include +#include namespace folly { namespace ssl { diff --git a/folly/io/async/test/AsyncSSLSocketTest.cpp b/folly/io/async/test/AsyncSSLSocketTest.cpp index 2e5f2462..d4078e56 100644 --- a/folly/io/async/test/AsyncSSLSocketTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketTest.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -32,10 +33,7 @@ #include #include #include -#include #include -#include -#include #include using std::string; diff --git a/folly/io/async/test/AsyncSSLSocketTest.h b/folly/io/async/test/AsyncSSLSocketTest.h index 5c0fe437..43ada249 100644 --- a/folly/io/async/test/AsyncSSLSocketTest.h +++ b/folly/io/async/test/AsyncSSLSocketTest.h @@ -27,16 +27,14 @@ #include #include #include +#include #include #include #include #include #include -#include #include -#include -#include namespace folly { diff --git a/folly/io/async/test/AsyncSocketTest.h b/folly/io/async/test/AsyncSocketTest.h index fe03fa6f..a0087c13 100644 --- a/folly/io/async/test/AsyncSocketTest.h +++ b/folly/io/async/test/AsyncSocketTest.h @@ -17,9 +17,9 @@ #include #include +#include #include -#include enum StateEnum { STATE_WAITING, diff --git a/folly/io/async/test/AsyncSocketTest2.cpp b/folly/io/async/test/AsyncSocketTest2.cpp index 927d74f7..23b806ad 100644 --- a/folly/io/async/test/AsyncSocketTest2.cpp +++ b/folly/io/async/test/AsyncSocketTest2.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -31,10 +32,7 @@ #include #include #include -#include #include -#include -#include #include using namespace boost; diff --git a/folly/io/async/test/SocketPair.cpp b/folly/io/async/test/SocketPair.cpp index eff35d76..7d0cafd1 100644 --- a/folly/io/async/test/SocketPair.cpp +++ b/folly/io/async/test/SocketPair.cpp @@ -19,12 +19,12 @@ #include #include +#include #include #include #include #include -#include #include namespace folly { diff --git a/folly/io/test/ShutdownSocketSetTest.cpp b/folly/io/test/ShutdownSocketSetTest.cpp index 88b9e989..63dd96c4 100644 --- a/folly/io/test/ShutdownSocketSetTest.cpp +++ b/folly/io/test/ShutdownSocketSetTest.cpp @@ -19,13 +19,11 @@ #include #include -#include -#include -#include - #include #include +#include + using folly::ShutdownSocketSet; namespace folly { namespace test { diff --git a/folly/test/IPAddressTest.h b/folly/test/IPAddressTest.h index ef50c134..01aa3c49 100644 --- a/folly/test/IPAddressTest.h +++ b/folly/test/IPAddressTest.h @@ -20,13 +20,10 @@ #include -extern "C" { #include -#include -#include -} #include +#include namespace folly { diff --git a/folly/test/SocketAddressTestHelper.cpp b/folly/test/SocketAddressTestHelper.cpp index ae29c2e3..62110239 100644 --- a/folly/test/SocketAddressTestHelper.cpp +++ b/folly/test/SocketAddressTestHelper.cpp @@ -16,8 +16,7 @@ #include -#include -#include +#include #include namespace folly {