aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2020-08-10 11:10:26 +0100
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 15:07:53 -0300
commit001a9a3b85b1c103992e2b4d5ce586263c3c5590 (patch)
tree5d9ae905466a515e51fe91de2e3d66ff51e1ef23
parent591eafbbd417338c4485d292b937da222ca5846e (diff)
downloadgcc-001a9a3b85b1c103992e2b4d5ce586263c3c5590.zip
gcc-001a9a3b85b1c103992e2b4d5ce586263c3c5590.tar.gz
gcc-001a9a3b85b1c103992e2b4d5ce586263c3c5590.tar.bz2
libstdc++: Use _wstat64 for Windows [PR 95749]
In order to handle large files on Windows we need to use stat API with 64-bit st_sioze member. libstdc++-v3/ChangeLog: PR libstdc++/95749 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS] (stat_type): Change to __wstat64. (stat): Use _wstat64.
-rw-r--r--libstdc++-v3/src/filesystem/ops-common.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libstdc++-v3/src/filesystem/ops-common.h b/libstdc++-v3/src/filesystem/ops-common.h
index 445d1ad..5cf900b 100644
--- a/libstdc++-v3/src/filesystem/ops-common.h
+++ b/libstdc++-v3/src/filesystem/ops-common.h
@@ -71,14 +71,14 @@ namespace __gnu_posix
inline int close(int fd)
{ return ::_close(fd); }
- typedef struct ::_stat stat_type;
+ typedef struct ::__stat64 stat_type;
inline int stat(const wchar_t* path, stat_type* buffer)
- { return ::_wstat(path, buffer); }
+ { return ::_wstat64(path, buffer); }
inline int lstat(const wchar_t* path, stat_type* buffer)
{
- // TODO symlinks not currently supported
+ // FIXME: symlinks not currently supported
return stat(path, buffer);
}