]> wimlib.net Git - wimlib/blobdiff - src/win32_replacements.c
Remove support for Windows XP
[wimlib] / src / win32_replacements.c
index 34d4e86a217d71d0208f04ba20bf39b7ecdc8eff..566cba9ce3a3419af9f9d9b76bd85af0da4f7485 100644 (file)
@@ -27,7 +27,6 @@
 #endif
 
 #include <errno.h>
-#include <pthread.h>
 #include <io.h>        /* for _get_osfhandle()  */
 #include <fcntl.h>
 
@@ -469,21 +468,6 @@ err_set_errno:
        return -1;
 }
 
-/* This really could be replaced with _wcserror_s, but this doesn't seem to
- * actually be available in MSVCRT.DLL on Windows XP (perhaps it's statically
- * linked in by Visual Studio...?). */
-int
-win32_strerror_r_replacement(int errnum, wchar_t *buf, size_t buflen)
-{
-       static pthread_mutex_t strerror_lock = PTHREAD_MUTEX_INITIALIZER;
-
-       pthread_mutex_lock(&strerror_lock);
-       mbstowcs(buf, strerror(errnum), buflen);
-       buf[buflen - 1] = '\0';
-       pthread_mutex_unlock(&strerror_lock);
-       return 0;
-}
-
 #define MAX_IO_AMOUNT 1048576
 
 static int