Compilation issue msys2 #7399 (#7409)

* Compilation issue msys2 #7399

* Compilation issue msys2 #7399
This commit is contained in:
Ivan Shynkarenka
2022-08-06 17:56:22 -04:00
committed by GitHub
parent cce3a66f0d
commit 30d76198c7

View File

@@ -24,7 +24,7 @@
# define _XOPEN_SOURCE 700L
#endif
#ifdef _WIN32
#if defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__) || defined(__CYGWIN__)
# ifndef WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
# endif
@@ -35,7 +35,9 @@
# include <crtdbg.h>
# endif
# include <windows.h> // Must be included before <direct.h>
# include <direct.h>
# ifndef __CYGWIN__
# include <direct.h>
# endif
# include <winbase.h>
# undef interface // This is also important because of reasons
#endif
@@ -212,7 +214,7 @@ std::string AbsolutePath(const std::string &filepath) {
#ifdef FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION
return filepath;
#else
#ifdef _WIN32
#if defined(_WIN32) || defined(__MINGW32__) || defined(__MINGW64__) || defined(__CYGWIN__)
char abs_path[MAX_PATH];
return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
#else