Commit 46f3788d authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 6

Switch uses of networking headers to <folly/portability/Sockets.h>

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
parent 5c321256
......@@ -17,10 +17,10 @@
#include <folly/FileUtil.h>
#include <cerrno>
#include <sys/socket.h>
#include <folly/detail/FileUtilDetail.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/SysFile.h>
namespace folly {
......
......@@ -17,10 +17,6 @@
#pragma once
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <netdb.h>
#include <cstddef>
#include <iostream>
#include <string>
......@@ -28,6 +24,7 @@
#include <folly/IPAddress.h>
#include <folly/Portability.h>
#include <folly/Range.h>
#include <folly/portability/Sockets.h>
namespace folly {
......
......@@ -24,7 +24,6 @@
#include <sys/prctl.h>
#endif
#include <fcntl.h>
#include <poll.h>
#include <array>
#include <algorithm>
......@@ -41,6 +40,7 @@
#include <folly/String.h>
#include <folly/io/Cursor.h>
#include <folly/portability/Environment.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
constexpr int kExecFailure = 127;
......
......@@ -26,25 +26,11 @@
#include <sstream>
#include <type_traits>
#include <vector>
extern "C" {
#ifndef _MSC_VER
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
// missing in socket headers
#define sa_family_t ADDRESS_FAMILY
#endif
#include <sys/types.h>
#include <netdb.h>
}
#include <folly/Conv.h>
#include <folly/Format.h>
#include <folly/portability/Sockets.h>
// BSDish platforms don't provide standard access to s6_addr16
#ifndef s6_addr16
......
......@@ -16,7 +16,7 @@
#pragma once
#include <sys/socket.h>
#include <folly/portability/Sockets.h>
#include <sys/types.h>
#if !defined(FOLLY_ALLOW_TFO) && defined(TCP_FASTOPEN) && defined(MSG_FASTOPEN)
......
......@@ -19,7 +19,6 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
#include <poll.h>
#include <cstdlib>
#include <cstdio>
......@@ -34,6 +33,7 @@
#include <folly/experimental/io/FsUtil.h>
#include <folly/ScopeGuard.h>
#include <folly/String.h>
#include <folly/portability/Sockets.h>
namespace fs = folly::fs;
using folly::AsyncIO;
......
......@@ -16,7 +16,6 @@
#include <folly/io/ShutdownSocketSet.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <chrono>
......@@ -26,6 +25,7 @@
#include <folly/FileUtil.h>
#include <folly/Malloc.h>
#include <folly/portability/Sockets.h>
namespace folly {
......
......@@ -17,17 +17,15 @@
#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/EventBase.h>
#include <folly/portability/Sockets.h>
#include <boost/noncopyable.hpp>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <openssl/err.h>
#include <openssl/asn1.h>
#include <openssl/ssl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <chrono>
#include <folly/Bits.h>
......
......@@ -16,7 +16,6 @@
#pragma once
#include <arpa/inet.h>
#include <iomanip>
#include <folly/Optional.h>
......@@ -33,6 +32,7 @@
#include <folly/Bits.h>
#include <folly/io/IOBuf.h>
#include <folly/io/Cursor.h>
#include <folly/portability/Sockets.h>
namespace folly {
......
......@@ -26,12 +26,11 @@
#include <folly/io/async/EventBase.h>
#include <folly/io/async/NotificationQueue.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <errno.h>
#include <netinet/tcp.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
namespace folly {
......
......@@ -24,9 +24,10 @@
#include <folly/io/async/EventBase.h>
#include <folly/io/async/EventHandler.h>
#include <folly/io/async/NotificationQueue.h>
#include <folly/portability/Sockets.h>
#include <limits.h>
#include <stddef.h>
#include <sys/socket.h>
#include <exception>
#include <memory>
#include <vector>
......
......@@ -21,17 +21,14 @@
#include <folly/SocketAddress.h>
#include <folly/io/IOBuf.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/SysUio.h>
#include <folly/portability/Unistd.h>
#include <poll.h>
#include <errno.h>
#include <limits.h>
#include <thread>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <boost/preprocessor/control/if.hpp>
using std::string;
......
......@@ -25,7 +25,8 @@
#include <folly/io/async/AsyncTransport.h>
#include <folly/io/async/DelayedDestruction.h>
#include <folly/io/async/EventHandler.h>
#include <sys/socket.h>
#include <folly/portability/Sockets.h>
#include <sys/types.h>
#include <chrono>
......
......@@ -19,6 +19,7 @@
#include <folly/io/async/EventBase.h>
#include <folly/Likely.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <errno.h>
......
......@@ -16,7 +16,6 @@
#pragma once
#include <poll.h>
#include <sys/types.h>
#include <algorithm>
......@@ -35,6 +34,7 @@
#include <folly/ScopeGuard.h>
#include <folly/SpinLock.h>
#include <folly/portability/Fcntl.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <glog/logging.h>
......
......@@ -24,12 +24,12 @@
#include <string>
#include <random>
// This has to come before SSL.
#include <folly/portability/Sockets.h>
#include <openssl/ssl.h>
#include <openssl/tls1.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <glog/logging.h>
#ifndef FOLLY_NO_CONFIG
......
......@@ -15,15 +15,13 @@
*/
#include <folly/io/async/ssl/OpenSSLUtils.h>
#include <folly/ScopeGuard.h>
#include <folly/portability/Sockets.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#include <openssl/ssl.h>
#include <openssl/x509v3.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <glog/logging.h>
namespace folly {
......
......@@ -15,10 +15,9 @@
*/
#pragma once
#include <openssl/x509v3.h>
#include <folly/portability/Sockets.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <openssl/x509v3.h>
namespace folly {
namespace ssl {
......
......@@ -21,6 +21,7 @@
#include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/EventBase.h>
#include <folly/SocketAddress.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <folly/io/async/test/BlockingSocket.h>
......@@ -32,10 +33,7 @@
#include <set>
#include <fcntl.h>
#include <openssl/bio.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <folly/io/Cursor.h>
using std::string;
......
......@@ -27,16 +27,14 @@
#include <folly/io/async/AsyncTransport.h>
#include <folly/io/async/EventBase.h>
#include <folly/io/async/ssl/SSLErrors.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <gtest/gtest.h>
#include <iostream>
#include <list>
#include <fcntl.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
namespace folly {
......
......@@ -17,9 +17,9 @@
#include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/test/BlockingSocket.h>
#include <folly/portability/Sockets.h>
#include <boost/scoped_array.hpp>
#include <poll.h>
enum StateEnum {
STATE_WAITING,
......
......@@ -24,6 +24,7 @@
#include <folly/io/IOBuf.h>
#include <folly/io/async/test/AsyncSocketTest.h>
#include <folly/io/async/test/Util.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <folly/test/SocketAddressTestHelper.h>
......@@ -31,10 +32,7 @@
#include <boost/scoped_array.hpp>
#include <iostream>
#include <fcntl.h>
#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <thread>
using namespace boost;
......
......@@ -19,12 +19,12 @@
#include <folly/io/async/test/SocketPair.h>
#include <folly/Conv.h>
#include <folly/portability/Sockets.h>
#include <folly/portability/Unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdexcept>
namespace folly {
......
......@@ -19,13 +19,11 @@
#include <chrono>
#include <thread>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <folly/portability/Sockets.h>
using folly::ShutdownSocketSet;
namespace folly { namespace test {
......
......@@ -20,13 +20,10 @@
#include <gtest/gtest.h>
extern "C" {
#include <sys/types.h>
#include <arpa/inet.h>
#include <sys/socket.h>
}
#include <folly/IPAddress.h>
#include <folly/portability/Sockets.h>
namespace folly {
......
......@@ -16,8 +16,7 @@
#include <folly/test/SocketAddressTestHelper.h>
#include <sys/socket.h>
#include <netdb.h>
#include <folly/portability/Sockets.h>
#include <glog/logging.h>
namespace folly {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment