#include "lookup_table.h"
#include "security.h"
#include "endianness.h"
+#include <pthread.h>
#include <errno.h>
size_t path_num_chars,
struct wim_lookup_table *lookup_table,
struct sd_set *sd_set,
- const struct capture_config *config,
+ const struct wimlib_capture_config *config,
int add_image_flags,
wimlib_progress_func_t progress_func,
struct win32_capture_state *state);
size_t dir_path_num_chars,
struct wim_lookup_table *lookup_table,
struct sd_set *sd_set,
- const struct capture_config *config,
+ const struct wimlib_capture_config *config,
int add_image_flags,
wimlib_progress_func_t progress_func,
struct win32_capture_state *state)
size_t path_num_chars,
struct wim_lookup_table *lookup_table,
struct sd_set *sd_set,
- const struct capture_config *config,
+ const struct wimlib_capture_config *config,
int add_image_flags,
wimlib_progress_func_t progress_func,
struct win32_capture_state *state)
const wchar_t *root_disk_path,
struct wim_lookup_table *lookup_table,
struct sd_set *sd_set,
- const struct capture_config *config,
+ const struct wimlib_capture_config *config,
int add_image_flags,
wimlib_progress_func_t progress_func,
void *extra_arg)
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...?). */
+extern 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;
+}
+
#endif /* __WIN32__ */