From 7f2484d82112851dbeba83afd18790a58b03599d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 29 Oct 2013 23:36:53 +0300 Subject: Initial porting to NACL by Vasily_Makarov. --- src/utils/paths.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/utils/paths.cpp') 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 +#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 +#elif defined __native_client__ +#include #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(calloc(PATH_MAX, sizeof(char))); realpath(str.c_str(), realPath); #else -- cgit v1.2.3-70-g09d2