Skip to content

Commit

Permalink
Fix libstdc++ lstat missing return type for Windows target.
Browse files Browse the repository at this point in the history
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.

From-SVN: r274885
  • Loading branch information
jsm28 committed Aug 23, 2019
1 parent a0fae47 commit 4872de4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions libstdc++-v3/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2019-08-23 Joseph Myers <[email protected]>

* src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
(std::filesystem::__gnu_posix::lstat): Add return type.

2019-08-20 Jonathan Wakely <[email protected]>

* doc/doxygen/user.cfg.in (INPUT): Remove profile mode headers.
Expand Down
2 changes: 1 addition & 1 deletion libstdc++-v3/src/filesystem/ops-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4872de4

Please sign in to comment.