I see strerror_r(...) API is no longer supported in visual C++ 2008, probably because of issue with thread safety. I want to use similar functionality in my program. Is there any other winapi which does the same thing as strerror_r(..)?
You can try strerror_s. It appears to be thread safe.
Note that the parameter order of strerror_s is different from strerror_r. If writing portable code you might want to use a define
#define strerror_r(errno,buf,len) strerror_s(buf,len,errno)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With