diff --git a/SourceX/miniwin/misc.cpp b/SourceX/miniwin/misc.cpp index 4711e9852..59f4473d8 100644 --- a/SourceX/miniwin/misc.cpp +++ b/SourceX/miniwin/misc.cpp @@ -1,7 +1,3 @@ -#ifndef _WIN32 -#include -#endif - #include #include "devilution.h" @@ -108,25 +104,11 @@ UINT GetWindowsDirectoryA(LPSTR lpBuffer, UINT uSize) WINBOOL GetDiskFreeSpaceA(LPCSTR lpRootPathName, LPDWORD lpSectorsPerCluster, LPDWORD lpBytesPerSector, LPDWORD lpNumberOfFreeClusters, LPDWORD lpTotalNumberOfClusters) { -#ifndef _WIN32 - struct statvfs fiData; - int success = statvfs("/", &fiData); - *lpBytesPerSector = fiData.f_frsize; - *lpSectorsPerCluster = 1; - *lpNumberOfFreeClusters = fiData.f_bavail; - *lpTotalNumberOfClusters = fiData.f_blocks; - - return success >= 0; -#else - // Todo give windows the real GetDiskFreeSpace - DUMMY(); *lpBytesPerSector = 1; *lpSectorsPerCluster = 1; *lpNumberOfFreeClusters = 10 << 20; *lpTotalNumberOfClusters = 10 << 20; - return true; -#endif } /** diff --git a/SourceX/utf8.h b/SourceX/utf8.h index 26d9a7a79..7f2c396fb 100644 --- a/SourceX/utf8.h +++ b/SourceX/utf8.h @@ -1,13 +1,13 @@ +#pragma once + +#include +#include +#include + /* Branchless UTF-8 decoder * * This is free and unencumbered software released into the public domain. */ -#ifndef UTF8_H -#define UTF8_H - -#include -#include -#include /* Decode the next character, C, from BUF, reporting errors in E. * @@ -84,5 +84,3 @@ inline std::string utf8_to_latin1(const char* in) } return std::move(ret); } - -#endif