Commit a1778efb authored by rswindell's avatar rswindell
Browse files

Provide a (non-ideal) implementation of safe_strerror() for Borland C builds

that don't have strerror_s:
Error: Unresolved external '_strerror_s' referenced from genwrap
parent 9c91d32a
......@@ -875,8 +875,11 @@ char* safe_strerror(int errnum, char *buf, size_t buflen)
strncpy(buf, "Unknown error", buflen);
buf[buflen - 1] = 0;
#if defined(_WIN32)
#if defined(_MSC_VER)
strerror_s(buf, buflen, errnum);
#elif defined(__BORLANDC__)
strncpy(buf, strerror(errnum), buflen);
buf[buflen - 1] = 0;
#elif defined(_GNU_SOURCE)
buf = strerror_r(errnum, buf, buflen);
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment