Skip to content

Commit 1adbab0

Browse files
committed
Fix for failing websocket test cases on Linux debug.
Revert "Adding define for _WEBSOCKETPP_CPP11_STL_" as this was unncessary. This reverts commit 2daad43.
1 parent e410cfb commit 1adbab0

File tree

2 files changed

+11
-18
lines changed

2 files changed

+11
-18
lines changed

Release/include/compat/SafeInt3.hpp

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ Version 3.0
107107
#else
108108
#define NEEDS_NULLPTR_DEFINED 0
109109
#endif
110+
#elif defined(__APPLE__)
111+
// For some reason we keep getting compiler errors on OS X/iOS if nullptr isn't
112+
// defined to NULL
113+
#define NEEDS_NULLPTR_DEFINED 1
114+
#elif __has_feature
115+
#if __has_feature(cxx_nullptr)
116+
#define NEEDS_NULLPTR_DEFINED 0
117+
#else
118+
#define NEEDS_NULLPTR_DEFINED 1
119+
#endif
110120
#else
111121
// Let everything else trigger based on whether we have nullptr_t
112122
#if defined nullptr_t
@@ -117,20 +127,7 @@ Version 3.0
117127
#endif
118128
#endif
119129

120-
#ifdef __has_feature
121-
#ifdef NEEDS_NULLPTR_DEFINED
122-
#undef NEEDS_NULLPTR_DEFINED
123-
#endif
124-
#if __has_feature(cxx_nullptr)
125-
#define NEEDS_NULLPTR_DEFINED 0
126-
#else
127-
#define NEEDS_NULLPTR_DEFINED 1
128-
#endif
129-
#endif
130-
131-
// For some reason we keep getting compiler errors os OS X/iOS if nullptr isn't
132-
// defined to NULL
133-
#if NEEDS_NULLPTR_DEFINED || defined(__APPLE__)
130+
#if NEEDS_NULLPTR_DEFINED
134131
#define nullptr NULL
135132
#endif
136133

Release/src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,6 @@ elseif(WIN32)
6868
set(EXTRALINKS Httpapi.lib Winhttp.dll)
6969
endif()
7070

71-
add_definitions(
72-
-D_WEBSOCKETPP_CPP11_STL_
73-
)
74-
7571
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNINGS} -Werror -pedantic")
7672

7773
add_library(${Casablanca_LIBRARY} ${SOURCES})

0 commit comments

Comments
 (0)