mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
mingw/gcc-8: use glib's stat(), drop hardlink support
This commit is contained in:
parent
64ddc5dd32
commit
26b6b8d840
2 changed files with 7 additions and 3 deletions
|
|
@ -360,8 +360,10 @@ bool
|
||||||
hard_link (const std::string& existing_file, const std::string& new_path)
|
hard_link (const std::string& existing_file, const std::string& new_path)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_WINDOWS
|
#ifdef PLATFORM_WINDOWS
|
||||||
# if defined (COMPILER_MINGW) && !defined(_WIN64) && defined(__GNUC__) && __GNUC__ >= 8
|
# if defined (COMPILER_MINGW) && defined(__GNUC__) && __GNUC__ == 8
|
||||||
return false; // 32bit windows, mingw
|
/* For some reason mingx 8.3.0 does not support CreateHardLinkA()
|
||||||
|
* (mingw/gcc-4.9 does) */
|
||||||
|
return false;
|
||||||
# else
|
# else
|
||||||
/* see also ntfs_link -- msvc only pbd extension */
|
/* see also ntfs_link -- msvc only pbd extension */
|
||||||
return CreateHardLinkA (new_path.c_str(), existing_file.c_str(), NULL);
|
return CreateHardLinkA (new_path.c_str(), existing_file.c_str(), NULL);
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,10 @@ pbd_g_stat(const gchar *filename, GStatBufW32 *buf)
|
||||||
* while the windows API is
|
* while the windows API is
|
||||||
* int _wstat(const wchar_t*, struct _stat*)
|
* int _wstat(const wchar_t*, struct _stat*)
|
||||||
* note that struct _stat != struct stat;
|
* note that struct _stat != struct stat;
|
||||||
|
*
|
||||||
|
* This has been fixed with sometime between 2.42.0 and 2.64.1
|
||||||
*/
|
*/
|
||||||
#if defined(_WIN32) && !defined(_MSC_VER) && defined(_WIN64)
|
#if defined(_WIN32) && !defined(_MSC_VER) && defined(_WIN64) && !GLIB_CHECK_VERSION (2,64,1)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue