]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_unix.cpp
InsetTabular.cpp: fix #6585 also for wrapped floats - thanks Vincent
[lyx.git] / src / support / os_unix.cpp
index 9663d98b64a72ac6c3ebc1d62942c8c5d7a2a471..20a6316fde0519734ca5a15474722213445ca36a 100644 (file)
@@ -297,15 +297,15 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode)
 
 string real_path(string const & path)
 {
-#ifdef __GLIBC__
+#ifdef HAVE_DEF_PATH_MAX
+       char rpath[PATH_MAX + 1];
+       char * result = realpath(path.c_str(), rpath);
+       return FileName::fromFilesystemEncoding(result ? rpath : path).absFileName();
+#else
        char * result = realpath(path.c_str(), NULL);
        string ret = FileName::fromFilesystemEncoding(result ? result : path).absFileName();
        free(result);
        return ret;
-#else
-       char rpath[PATH_MAX + 1];
-       char * result = realpath(path.c_str(), rpath);
-       return FileName::fromFilesystemEncoding(result ? rpath : path).absFileName();
 #endif
 }