Various fixes for mwcc/mwld (#32)

* Override GetFileAttributesA for MWCC license.dat

* Add WIN_FUNC to FileTimeToLocalFileTime

* Use callee_pop_aggregate_return(0)

* Lexically normalize paths
This commit is contained in:
2023-01-23 15:22:50 -05:00
committed by GitHub
parent 6b6a462ea1
commit 7d08a2bdca
4 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
#include <filesystem>
#include <string>
namespace files {
std::filesystem::path pathFromWindows(const char *inStr);
@@ -9,3 +10,7 @@ namespace files {
unsigned int setStdHandle(uint32_t nStdHandle, void *hHandle);
void init();
}
static bool endsWith(const std::string &str, const std::string &suffix) {
return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0;
}