diff options
author | Brad King <brad.king@kitware.com> | 2021-08-24 14:13:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-08-24 14:13:10 (GMT) |
commit | 107df8e65019b89f82249395bc09efe5dc9e2a7f (patch) | |
tree | 552fc25b0159b83e08be798f5ae30dc3d80a5266 /Utilities/cmlibarchive/libarchive/archive_read_open_filename.c | |
parent | 3d05964b0293a0bb9eb9f1f3b6d3cff1d86aa85a (diff) | |
parent | dadea0e5ce7dd04c7a2c1d22f3fd12affdbd6a89 (diff) | |
download | CMake-107df8e65019b89f82249395bc09efe5dc9e2a7f.zip CMake-107df8e65019b89f82249395bc09efe5dc9e2a7f.tar.gz CMake-107df8e65019b89f82249395bc09efe5dc9e2a7f.tar.bz2 |
Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive:
LibArchive 2020-12-26 (227a4b97)
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_read_open_filename.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_read_open_filename.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c b/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c index 86635e2..561289b 100644 --- a/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c +++ b/Utilities/cmlibarchive/libarchive/archive_read_open_filename.c @@ -221,7 +221,9 @@ file_open(struct archive *a, void *client_data) struct read_file_data *mine = (struct read_file_data *)client_data; void *buffer; const char *filename = NULL; +#if defined(_WIN32) && !defined(__CYGWIN__) const wchar_t *wfilename = NULL; +#endif int fd = -1; int is_disk_like = 0; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) @@ -281,10 +283,12 @@ file_open(struct archive *a, void *client_data) #endif } if (fstat(fd, &st) != 0) { +#if defined(_WIN32) && !defined(__CYGWIN__) if (mine->filename_type == FNT_WCS) archive_set_error(a, errno, "Can't stat '%S'", wfilename); else +#endif archive_set_error(a, errno, "Can't stat '%s'", filename); goto fail; |