summaryrefslogtreecommitdiff
path: root/src/utils/paths.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-29 23:36:53 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-29 23:39:29 +0300
commit7f2484d82112851dbeba83afd18790a58b03599d (patch)
tree6449022bbae8a55825febc7b08e3d4095f1de64f /src/utils/paths.cpp
parent24179041d619875bda96eb94307b1f3dd64e6add (diff)
downloadplus-7f2484d82112851dbeba83afd18790a58b03599d.tar.gz
plus-7f2484d82112851dbeba83afd18790a58b03599d.tar.bz2
plus-7f2484d82112851dbeba83afd18790a58b03599d.tar.xz
plus-7f2484d82112851dbeba83afd18790a58b03599d.zip
Initial porting to NACL by Vasily_Makarov.
Diffstat (limited to 'src/utils/paths.cpp')
-rw-r--r--src/utils/paths.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils/paths.cpp b/src/utils/paths.cpp
index e3992cd72..dbe0cccce 100644
--- a/src/utils/paths.cpp
+++ b/src/utils/paths.cpp
@@ -30,11 +30,18 @@
#include "resources/resourcemanager.h"
+#ifdef __native_client__
+#include <limits.h>
+#define realpath(N, R) strcpy(R, N)
+#endif
+
#ifdef WIN32
#include "utils/specialfolder.h"
#define realpath(N, R) _fullpath((R), (N), _MAX_PATH)
#elif defined __OpenBSD__
#include <limits>
+#elif defined __native_client__
+#include <limits.h>
#endif
#ifdef ANDROID
@@ -47,7 +54,7 @@
std::string getRealPath(const std::string &str)
{
-#if defined(__OpenBSD__) || defined(__ANDROID__)
+#if defined(__OpenBSD__) || defined(__ANDROID__) || defined(__native_client__)
char *realPath = reinterpret_cast<char*>(calloc(PATH_MAX, sizeof(char)));
realpath(str.c_str(), realPath);
#else