Haiku support.
This commit is contained in:
parent
8a98e3d186
commit
191124ddb7
@ -117,7 +117,11 @@ endif()
|
||||
|
||||
if(UNIX)
|
||||
if(NOT(CMAKE_SYSTEM_NAME MATCHES "BSD" OR APPLE))
|
||||
target_link_libraries(OpenSpades rt)
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Haiku")
|
||||
target_link_libraries(OpenSpades rt)
|
||||
else()
|
||||
target_link_libraries(OpenSpades network)
|
||||
endif()
|
||||
endif()
|
||||
target_link_libraries(OpenSpades pthread)
|
||||
endif()
|
||||
|
@ -89,7 +89,7 @@ namespace spades {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#elif __unix || __unix__
|
||||
#elif (__unix || __unix__) || defined(__HAIKU__)
|
||||
bool ShowDirectoryInShell(const std::string &directoryPath) {
|
||||
// FIXME: escape single quotes
|
||||
if (directoryPath.find("'") != std::string::npos) {
|
||||
|
@ -48,6 +48,8 @@ std::string VersionInfo::GetVersionInfo() {
|
||||
return std::string("OpenBSD");
|
||||
#elif defined(__NetBSD__)
|
||||
return std::string("NetBSD");
|
||||
#elif defined(__HAIKU__)
|
||||
return std::string("Haiku");
|
||||
#else
|
||||
return std::string("Unknown OS");
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <memory>
|
||||
#include <regex>
|
||||
|
||||
#if !defined(__APPLE__) && (__unix || __unix__)
|
||||
#if (!defined(__APPLE__) && (__unix || __unix__)) || defined(__HAIKU__)
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
@ -659,6 +659,8 @@ namespace spades {
|
||||
return "FreeBSD";
|
||||
#elif defined(__OpenBSD__)
|
||||
return "OpenBSD";
|
||||
#elif defined(__HAIKU__)
|
||||
return "Haiku";
|
||||
#else
|
||||
return std::string{};
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user