mirror of
https://github.com/Dark98/threeSD.git
synced 2026-07-06 08:39:06 +00:00
file_util: Fix multiple definition error for mingw static
This commit is contained in:
+13
-12
@@ -21,18 +21,6 @@
|
|||||||
#include <shlobj.h> // for SHGetFolderPath
|
#include <shlobj.h> // for SHGetFolderPath
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include "common/string_util.h"
|
#include "common/string_util.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
// 64 bit offsets for MSVC
|
|
||||||
#define fseeko _fseeki64
|
|
||||||
#define ftello _ftelli64
|
|
||||||
#define fileno _fileno
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64
|
|
||||||
#define stat _stat64
|
|
||||||
#define fstat _fstat64
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -66,6 +54,19 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
// 64 bit offsets for MSVC
|
||||||
|
#define fseeko _fseeki64
|
||||||
|
#define ftello _ftelli64
|
||||||
|
#define fileno _fileno
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64
|
||||||
|
#define stat _stat64
|
||||||
|
#define fstat _fstat64
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef S_ISDIR
|
#ifndef S_ISDIR
|
||||||
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
|
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user