Skip to content

Commit

Permalink
-modified asio and boost include file ordering to avoid multiply defi…
Browse files Browse the repository at this point in the history
…ned symbol errors on linking

 -in preparation for upgrade of asio drop and support for latest boost 
 -include asio/ssh.hpp everywhere asio.hpp is included
 -include boost headers before others, to ensure we are not redefining stdint definitions in some includes
  and not others


git-svn-id: https://svn.resiprocate.org/rep/resiprocate/main@11159 ddefafc4-47db-0310-ae44-fa13212b10f2
  • Loading branch information
sgodin committed Apr 25, 2014
1 parent 9b2fc8f commit e74d91c
Show file tree
Hide file tree
Showing 45 changed files with 128 additions and 31 deletions.
1 change: 0 additions & 1 deletion reTurn/AsyncSocketBase.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "AsyncSocketBase.hxx"
#include "AsyncSocketBaseHandler.hxx"
#include <boost/bind.hpp>
#include <rutil/WinLeakCheck.hxx>
#include <rutil/Logger.hxx>
#include "ReTurnSubsystem.hxx"
Expand Down
8 changes: 6 additions & 2 deletions reTurn/AsyncSocketBase.hxx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#ifndef ASYNC_SOCKET_BASE_HXX
#define ASYNC_SOCKET_BASE_HXX

#include <deque>
#include <asio.hpp>
#include <boost/bind.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <boost/enable_shared_from_this.hpp>

#include <deque>

#include "DataBuffer.hxx"
#include "StunTuple.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/AsyncTcpSocketBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define ASYNC_TCP_SOCKET_BASE_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "AsyncSocketBase.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/AsyncUdpSocketBase.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define ASYNC_UDP_SOCKET_BASE_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "AsyncSocketBase.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/ChannelManager.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define CHANNELMANAGER_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif

#include "RemotePeer.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/ReTurnConfig.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include <map>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <rutil/ConfigParse.hxx>
#include <rutil/Data.hxx>
#include <rutil/Log.hxx>
Expand Down
3 changes: 3 additions & 0 deletions reTurn/RemotePeer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define REMOTEPEER_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif

#include "StunTuple.hxx"

Expand Down
3 changes: 2 additions & 1 deletion reTurn/StunMessage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
#include "config.h"
#endif

#include <boost/crc.hpp>

#include "StunMessage.hxx"

#include <rutil/compat.hxx>
#include <rutil/Timer.hxx>
#include <rutil/Random.hxx>
#include <rutil/DataStream.hxx>
#include <rutil/MD5Stream.hxx>
#include <boost/crc.hpp>
#include <rutil/WinLeakCheck.hxx>
#include <rutil/Logger.hxx>
#include "ReTurnSubsystem.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/StunMessage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include <rutil/compat.hxx>
#include <rutil/Data.hxx>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif

#include "StunTuple.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/StunTuple.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define STUNTUPLE_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <rutil/resipfaststreams.hxx>

namespace reTurn {
Expand Down
3 changes: 3 additions & 0 deletions reTurn/TcpConnection.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define TCP_CONNECTION_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/array.hpp>
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
Expand Down
3 changes: 3 additions & 0 deletions reTurn/TcpServer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define TCP_SERVER_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <string>
#include <boost/noncopyable.hpp>
#include "TcpConnection.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/TurnAllocation.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
#include <map>
#include <boost/noncopyable.hpp>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif

#include "StunTuple.hxx"
#include "StunAuth.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/TurnAllocationManager.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include <map>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include "TurnAllocationKey.hxx"
#include "ReTurnConfig.hxx"
#include "StunTuple.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/TurnManager.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include <map>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include "ReTurnConfig.hxx"
#include "StunTuple.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/TurnPermission.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define TURNPERMISSION_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif

#include "StunTuple.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/UdpRelayServer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define UDP_REALY_SERVER_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <string>
#include <boost/noncopyable.hpp>
#include "RequestHandler.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/UdpServer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#define UDP_SERVER_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <string>
#include <boost/noncopyable.hpp>
#include "RequestHandler.hxx"
Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnAsyncSocket.cxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include "TurnAsyncSocket.hxx"
#include "../AsyncSocketBase.hxx"
#include "ErrorCode.hxx"
#include <boost/bind.hpp>
#include <rutil/WinLeakCheck.hxx>
#include <rutil/Logger.hxx>
#include "../ReTurnSubsystem.hxx"
Expand Down
12 changes: 9 additions & 3 deletions reTurn/client/TurnAsyncSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,18 @@
#error You must define ASIO_ENABLE_CANCELIO in your build settings.
#endif

#include <map>
#include <queue>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>
#include <boost/function.hpp>

#include <rutil/Data.hxx>
#include <rutil/Mutex.hxx>
#include <boost/function.hpp>

#include <map>
#include <queue>

#include "reTurn/StunTuple.hxx"
#include "reTurn/StunMessage.hxx"
Expand Down
3 changes: 3 additions & 0 deletions reTurn/client/TurnAsyncSocketHandler.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

#include <rutil/compat.hxx>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include "reTurn/AsyncSocketBaseHandler.hxx"
#include "reTurn/DataBuffer.hxx"
#include "reTurn/StunTuple.hxx"
Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnAsyncTcpSocket.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "TurnAsyncTcpSocket.hxx"
#include <boost/bind.hpp>

// Remove warning about 'this' use in initiator list - pointer is only stored
#if defined(WIN32) && !defined(__GNUC__)
Expand Down
4 changes: 4 additions & 0 deletions reTurn/client/TurnAsyncTcpSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#define TURNASYNCTCPSOCKET_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "TurnAsyncSocket.hxx"
#include "reTurn/AsyncTcpSocketBase.hxx"
Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnAsyncTlsSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#ifdef USE_SSL
#include "TurnAsyncTlsSocket.hxx"
#include <boost/bind.hpp>

using namespace std;

Expand Down
1 change: 1 addition & 0 deletions reTurn/client/TurnAsyncTlsSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <asio.hpp>
#include <asio/ssl.hpp>
#include <boost/bind.hpp>

#include "TurnAsyncTcpSocket.hxx"
#include "reTurn/AsyncTlsSocketBase.hxx"
Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnAsyncUdpSocket.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "TurnAsyncUdpSocket.hxx"
#include <boost/bind.hpp>

// Remove warning about 'this' use in initiator list - pointer is only stored
#if defined(WIN32) && !defined(__GNUC__)
Expand Down
4 changes: 4 additions & 0 deletions reTurn/client/TurnAsyncUdpSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#define TURNASYNCUDPSOCKET_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "TurnAsyncSocket.hxx"
#include "reTurn/AsyncUdpSocketBase.hxx"
Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnSocket.cxx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "TurnSocket.hxx"
#include "ErrorCode.hxx"
#include <boost/bind.hpp>
#include <rutil/Lock.hxx>
#include <rutil/WinLeakCheck.hxx>
#include <rutil/Logger.hxx>
Expand Down
8 changes: 7 additions & 1 deletion reTurn/client/TurnSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@
#error You must define ASIO_ENABLE_CANCELIO in your build settings.
#endif

#include <vector>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include <vector>

#include <rutil/Data.hxx>
#include <rutil/Mutex.hxx>

Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnTcpSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#endif

#include "TurnTcpSocket.hxx"
#include <boost/bind.hpp>
#include <rutil/Logger.hxx>
#include "../ReTurnSubsystem.hxx"

Expand Down
4 changes: 4 additions & 0 deletions reTurn/client/TurnTcpSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#define TURNTCPSOCKET_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "TurnSocket.hxx"

Expand Down
3 changes: 2 additions & 1 deletion reTurn/client/TurnTlsSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
#endif

#ifdef USE_SSL
#include <boost/bind.hpp>

#include "TurnTlsSocket.hxx"
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include <boost/bind.hpp>
#include <rutil/Logger.hxx>
#include "../ReTurnSubsystem.hxx"

Expand Down
1 change: 0 additions & 1 deletion reTurn/client/TurnUdpSocket.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#endif

#include "TurnUdpSocket.hxx"
#include <boost/bind.hpp>

using namespace std;

Expand Down
4 changes: 4 additions & 0 deletions reTurn/client/TurnUdpSocket.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#define TURNUDPSOCKET_HXX

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>

#include "TurnSocket.hxx"

Expand Down
3 changes: 3 additions & 0 deletions reTurn/reTurnServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#include <csignal>
#include <string>
#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
Expand Down
4 changes: 4 additions & 0 deletions reflow/Flow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
#endif

#include <asio.hpp>
#ifdef USE_SSL
#include <asio/ssl.hpp>
#endif
#include <boost/function.hpp>

#include <rutil/Log.hxx>
#include <rutil/Logger.hxx>
#include <rutil/Timer.hxx>
Expand Down
9 changes: 5 additions & 4 deletions reflow/FlowDtlsSocketContext.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
#endif

#ifdef USE_SSL
#include <rutil/Log.hxx>
#include <rutil/Logger.hxx>
#include <rutil/Timer.hxx>

#include <asio.hpp>
#include <asio/ssl.hpp>
#include <boost/function.hpp>
#include <iostream>

#include <rutil/Log.hxx>
#include <rutil/Logger.hxx>
#include <rutil/Timer.hxx>

#include "FlowDtlsSocketContext.hxx"
#include "FlowManagerSubsystem.hxx"

Expand Down
Loading

0 comments on commit e74d91c

Please sign in to comment.