1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

Merge pull request #10984 from extrowerk:advanced_haiku_patches

* Haiku supporting patches

* Revert uneeded changes

* Whitespace cleanup
This commit is contained in:
miqlas
2018-03-14 15:09:10 +01:00
committed by Alexander Alekhin
parent 7e9578789b
commit f3a9f13cb4
4 changed files with 11 additions and 10 deletions
+5 -5
View File
@@ -34,7 +34,7 @@
#include <errno.h>
#include <io.h>
#include <stdio.h>
#elif defined __linux__ || defined __APPLE__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -161,7 +161,7 @@ cv::String getcwd()
sz = GetCurrentDirectoryA((DWORD)buf.size(), (char*)buf);
return cv::String((char*)buf, (size_t)sz);
#endif
#elif defined __linux__ || defined __APPLE__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
for(;;)
{
char* p = ::getcwd((char*)buf, buf.size());
@@ -195,7 +195,7 @@ bool createDirectory(const cv::String& path)
#else
int result = _mkdir(path.c_str());
#endif
#elif defined __linux__ || defined __APPLE__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
int result = mkdir(path.c_str(), 0777);
#else
int result = -1;
@@ -310,7 +310,7 @@ private:
Impl& operator=(const Impl&); // disabled
};
#elif defined __linux__ || defined __APPLE__
#elif defined __linux__ || defined __APPLE__ || defined __HAIKU__
struct FileLock::Impl
{
@@ -424,7 +424,7 @@ cv::String getCacheDirectory(const char* sub_directory_name, const char* configu
default_cache_path = "/tmp/";
CV_LOG_WARNING(NULL, "Using world accessible cache directory. This may be not secure: " << default_cache_path);
}
#elif defined __linux__
#elif defined __linux__ || defined __HAIKU__
// https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
if (default_cache_path.empty())
{