aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@dec05ebas-iMac.local>2018-09-29 22:03:50 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commite7ebd55c31148089eb54ffbd708216c1c7cb09ff (patch)
tree2a55e1bfe6ce3e2f8ca6c21d8046565abcafd4d9 /src
parent19370a2213efe960e959832145a165d6e2ad6a65 (diff)
Add support for macos
Diffstat (limited to 'src')
-rw-r--r--src/Conf.cpp12
-rw-r--r--src/FileUtil.cpp2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index bad3c01..6645913 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -532,6 +532,8 @@ namespace sibs
case PLATFORM_LINUX64: return "linux64";
case PLATFORM_WIN32: return "win32";
case PLATFORM_WIN64: return "win64";
+ case PLATFORM_MACOS32: return "macos32";
+ case PLATFORM_MACOS64: return "macos64";
default: return nullptr;
}
}
@@ -801,11 +803,19 @@ namespace sibs
{
platforms.push_back(PLATFORM_WIN64);
}
+ else if (platform.equals("macos32"))
+ {
+ platforms.push_back(PLATFORM_MACOS32);
+ }
+ else if (platform.equals("macos64"))
+ {
+ platforms.push_back(PLATFORM_MACOS64);
+ }
else
{
string errMsg = "package.platforms contains invalid platform \"";
errMsg += string(platform.data, platform.size);
- errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32 or win64";
+ errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32, win64, macos32 or macos64";
throw ParserException(errMsg);
}
}
diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp
index 222edbb..e3d4c3c 100644
--- a/src/FileUtil.cpp
+++ b/src/FileUtil.cpp
@@ -129,7 +129,7 @@ namespace sibs
{
struct stat64 fileStat;
if (stat64(path, &fileStat) == 0)
- return Result<u64>::Ok(fileStat.st_mtim.tv_sec);
+ return Result<u64>::Ok(fileStat.st_mtime);
else
{
string errMsg = "File not found: ";