diff options
author | glx <glx@openttd.org> | 2018-12-09 02:28:14 +0100 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2018-12-27 18:09:16 +0100 |
commit | c540d7244531d501f16b485a3e45e358f98853be (patch) | |
tree | 4d270f06b2aa9b4f796d4828e5bfaf3c09cdd4b1 /src/fios.cpp | |
parent | 8890926b0d1069aec7ef53fd84868a7a3ca02c05 (diff) | |
download | openttd-c540d7244531d501f16b485a3e45e358f98853be.tar.xz |
Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32
Diffstat (limited to 'src/fios.cpp')
-rw-r--r-- | src/fios.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index f4a25e1ed..73365ddc2 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -20,9 +20,9 @@ #include "string_func.h" #include <sys/stat.h> -#ifndef WIN32 +#ifndef _WIN32 # include <unistd.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ #include "table/strings.h" @@ -153,7 +153,7 @@ const char *FiosBrowseTo(const FiosItem *item) { switch (item->type) { case FIOS_TYPE_DRIVE: -#if defined(WIN32) || defined(__OS2__) +#if defined(_WIN32) || defined(__OS2__) seprintf(_fios_path, _fios_path_last, "%c:" PATHSEP, item->title[0]); #endif break; @@ -318,7 +318,7 @@ bool FiosFileScanner::AddFile(const char *filename, size_t basepath_length, cons } FiosItem *fios = file_list.Append(); -#ifdef WIN32 +#ifdef _WIN32 struct _stat sb; if (_tstat(OTTD2FS(filename), &sb) == 0) { #else |