diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-08-23 21:05:50 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2019-08-23 21:05:50 +0000 |
commit | 846e855daea9a26a855f4099b42d52e1267c6f10 (patch) | |
tree | f4c2c8a167f911a9b667502c95039b6547a06624 | |
parent | 5ae502afcbc7f7e5682c536ecc10b2c1f217b3d1 (diff) |
Fix libstdc++ lstat missing return type for Windows target.
Building for i686-mingw32 target (with some local changes) produced an
error
error: ISO C++ forbids declaration of 'lstat' with no type [-fpermissive]
in libstdc++-v3/src/filesystem/ops-common.h. This patch adds the
missing return type. OK to commit (trunk and GCC 9 branch)?
Note 1: I haven't run the testsuite with this patch, but it fixes the
build failure I see (in sources with other local changes).
Note 2: I don't know why this hasn't produced build failures for other
people, but the missing return type looks wrong in any case even if
other local changes are for some reason needed for it to produce an
error.
* src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
(std::filesystem::__gnu_posix::lstat): Add return type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@274886 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/src/filesystem/ops-common.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3c6c1456439..b8f2f3bf9bc 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2019-08-23 Joseph Myers <joseph@codesourcery.com> + + * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS] + (std::filesystem::__gnu_posix::lstat): Add return type. + 2019-08-20 Jonathan Wakely <jwakely@redhat.com> * include/std/numeric (reduce): Fix Doxygen markup. diff --git a/libstdc++-v3/src/filesystem/ops-common.h b/libstdc++-v3/src/filesystem/ops-common.h index 6dc9b137dbf..21d0bbabb43 100644 --- a/libstdc++-v3/src/filesystem/ops-common.h +++ b/libstdc++-v3/src/filesystem/ops-common.h @@ -76,7 +76,7 @@ namespace __gnu_posix inline int stat(const wchar_t* path, stat_type* buffer) { return ::_wstat(path, buffer); } - inline lstat(const wchar_t* path, stat_type* buffer) + inline int lstat(const wchar_t* path, stat_type* buffer) { // TODO symlinks not currently supported return stat(path, buffer); |