Skip to content

Commit 1166c17

Browse files
committed
Define strtok_r for Windows using MSVC
Signed-off-by: Eran Ifrah <eran@codelite.org>
1 parent c5ee347 commit 1166c17

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

dap/StringUtils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
#include <cstring>
55
#include <locale>
66
#include <sstream>
7+
#include <string.h>
78
#include <wx/arrstr.h>
89
#include <wx/tokenzr.h>
910

11+
#if defined(_MSC_VER)
12+
/* We are on Windows using MSVC */
13+
#define strtok_r strtok_s
14+
#endif
15+
1016
wxString& DapStringUtils::Rtrim(wxString& str) { return str.Trim(); }
1117

1218
std::string& DapStringUtils::Rtrim(std::string& str)

0 commit comments

Comments
 (0)