mingw/gcc-8: use glib's stat(), drop hardlink support

This commit is contained in:
Robin Gareus 2020-03-13 01:19:47 +01:00
parent 64ddc5dd32
commit 26b6b8d840
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 7 additions and 3 deletions

View file

@ -360,8 +360,10 @@ bool
hard_link (const std::string& existing_file, const std::string& new_path)
{
#ifdef PLATFORM_WINDOWS
# if defined (COMPILER_MINGW) && !defined(_WIN64) && defined(__GNUC__) && __GNUC__ >= 8
return false; // 32bit windows, mingw
# if defined (COMPILER_MINGW) && defined(__GNUC__) && __GNUC__ == 8
/* For some reason mingx 8.3.0 does not support CreateHardLinkA()
* (mingw/gcc-4.9 does) */
return false;
# else
/* see also ntfs_link -- msvc only pbd extension */
return CreateHardLinkA (new_path.c_str(), existing_file.c_str(), NULL);