diff --git a/ixwebsocket/IXSelectInterruptFactory.cpp b/ixwebsocket/IXSelectInterruptFactory.cpp index 0cd4a278..9018810d 100644 --- a/ixwebsocket/IXSelectInterruptFactory.cpp +++ b/ixwebsocket/IXSelectInterruptFactory.cpp @@ -6,6 +6,7 @@ #include "IXSelectInterruptFactory.h" +#include "IXUniquePtr.h" #if defined(__linux__) || defined(__APPLE__) #include "IXSelectInterruptPipe.h" #else @@ -17,9 +18,9 @@ namespace ix SelectInterruptPtr createSelectInterrupt() { #if defined(__linux__) || defined(__APPLE__) - return std::make_unique(); + return ix::make_unique(); #else - return std::make_unique(); + return ix::make_unique(); #endif } } // namespace ix diff --git a/ixwebsocket/IXSocketConnect.cpp b/ixwebsocket/IXSocketConnect.cpp index fea01897..a11fb3b7 100644 --- a/ixwebsocket/IXSocketConnect.cpp +++ b/ixwebsocket/IXSocketConnect.cpp @@ -10,6 +10,7 @@ #include "IXNetSystem.h" #include "IXSelectInterrupt.h" #include "IXSocket.h" +#include "IXUniquePtr.h" #include #include #include @@ -65,7 +66,7 @@ namespace ix int timeoutMs = 10; bool readyToRead = false; - auto selectInterrupt = std::make_unique(); + auto selectInterrupt = ix::make_unique(); PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, fd, selectInterrupt); if (pollResult == PollResultType::Timeout) diff --git a/ixwebsocket/IXSocketFactory.cpp b/ixwebsocket/IXSocketFactory.cpp index bf2d24fe..ce92d118 100644 --- a/ixwebsocket/IXSocketFactory.cpp +++ b/ixwebsocket/IXSocketFactory.cpp @@ -5,6 +5,7 @@ */ #include "IXSocketFactory.h" +#include "IXUniquePtr.h" #ifdef IXWEBSOCKET_USE_TLS @@ -35,17 +36,17 @@ namespace ix if (!tls) { - socket = std::make_unique(fd); + socket = ix::make_unique(fd); } else { #ifdef IXWEBSOCKET_USE_TLS #if defined(IXWEBSOCKET_USE_MBED_TLS) - socket = std::make_unique(tlsOptions, fd); + socket = ix::make_unique(tlsOptions, fd); #elif defined(IXWEBSOCKET_USE_OPEN_SSL) - socket = std::make_unique(tlsOptions, fd); + socket = ix::make_unique(tlsOptions, fd); #elif defined(__APPLE__) - socket = std::make_unique(tlsOptions, fd); + socket = ix::make_unique(tlsOptions, fd); #endif #else errorMsg = "TLS support is not enabled on this platform."; diff --git a/ixwebsocket/IXSocketServer.cpp b/ixwebsocket/IXSocketServer.cpp index f1d34e43..f07ff550 100644 --- a/ixwebsocket/IXSocketServer.cpp +++ b/ixwebsocket/IXSocketServer.cpp @@ -12,6 +12,7 @@ #include "IXSocket.h" #include "IXSocketConnect.h" #include "IXSocketFactory.h" +#include "IXUniquePtr.h" #include #include #include @@ -258,7 +259,7 @@ namespace ix // Use poll to check whether a new connection is in progress int timeoutMs = 10; bool readyToRead = true; - auto selectInterrupt = std::make_unique(); + auto selectInterrupt = ix::make_unique(); PollResultType pollResult = Socket::poll(readyToRead, timeoutMs, _serverFd, selectInterrupt); diff --git a/makefile b/makefile index ff59e16b..6583d87a 100644 --- a/makefile +++ b/makefile @@ -170,7 +170,7 @@ autobahn_report: cp -rvf ~/sandbox/reports/clients/* ../bsergean.github.io/IXWebSocket/autobahn/ httpd: - clang++ --std=c++14 --stdlib=libc++ httpd.cpp \ + clang++ --std=c++11 --stdlib=libc++ httpd.cpp \ ixwebsocket/IXSelectInterruptFactory.cpp \ ixwebsocket/IXCancellationRequest.cpp \ ixwebsocket/IXSocketTLSOptions.cpp \ @@ -191,6 +191,28 @@ httpd: ixwebsocket/IXSelectInterrupt.cpp \ ixwebsocket/apple/IXSetThreadName_apple.cpp -lz +httpd_linux: + g++ --std=c++11 httpd.cpp \ + ixwebsocket/IXSelectInterruptFactory.cpp \ + ixwebsocket/IXCancellationRequest.cpp \ + ixwebsocket/IXSocketTLSOptions.cpp \ + ixwebsocket/IXUserAgent.cpp \ + ixwebsocket/IXDNSLookup.cpp \ + ixwebsocket/IXBench.cpp \ + ixwebsocket/IXWebSocketHttpHeaders.cpp \ + ixwebsocket/IXSelectInterruptPipe.cpp \ + ixwebsocket/IXHttp.cpp \ + ixwebsocket/IXSocketConnect.cpp \ + ixwebsocket/IXSocket.cpp \ + ixwebsocket/IXSocketServer.cpp \ + ixwebsocket/IXNetSystem.cpp \ + ixwebsocket/IXHttpServer.cpp \ + ixwebsocket/IXSocketFactory.cpp \ + ixwebsocket/IXConnectionState.cpp \ + ixwebsocket/IXUrlParser.cpp \ + ixwebsocket/IXSelectInterrupt.cpp \ + ixwebsocket/apple/IXSetThreadName_linux.cpp -lz + # For the fork that is configured with appveyor rebase_upstream: git fetch upstream