diff options
-rw-r--r-- | src/fios.cpp | 7 | ||||
-rw-r--r-- | src/stdafx.h | 1 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/fios.cpp b/src/fios.cpp index cff6491a4..951536406 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -17,7 +17,6 @@ # include <io.h> # endif # define access _taccess -# define unlink _tunlink #else # include <unistd.h> #endif /* WIN32 */ @@ -161,16 +160,12 @@ void FiosMakeSavegameName(char *buf, const char *name, size_t size) #endif } -#if defined(WIN32) -# define unlink _tunlink -#endif - bool FiosDelete(const char *name) { char filename[512]; FiosMakeSavegameName(filename, name, lengthof(filename)); - return unlink(OTTD2FS(filename)) == 0; + return unlink(filename) == 0; } bool FileExists(const char *filename) diff --git a/src/stdafx.h b/src/stdafx.h index b134cb940..1bb33bdd3 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -251,6 +251,7 @@ /* XXX - WinCE without MSVCRT doesn't support wfopen, so it seems */ #if !defined(WINCE) #define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode)) + #define unlink(file) _tunlink(OTTD2FS(file)) #endif /* WINCE */ const char *FS2OTTD(const TCHAR *name); |