#endif //WX_PRECOMP
// FreeBSD & Watcom require this, it probably doesn't hurt for others
-#if defined(__UNIX__) || defined(__WATCOMC__)
+#if defined(__UNIX__) || defined(__WATCOMC__) || defined(__DIGITALMARS__)
#include <sys/types.h>
#endif
(void)regerror(errorcode, &m_RegEx, (char *)buf.data(), len);
- msg = buf.data();
+ msg = wxString(buf.data(), wxConvLibc);
#else // !Unicode
(void)regerror(errorcode, &m_RegEx, msg.GetWriteBuf(len), len);