]> 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 e2893db52f92e3fecd79137e506b636281b14aab..20a6316fde0519734ca5a15474722213445ca36a 100644 (file)
@@ -52,6 +52,10 @@ string utf8_argv(int i)
 }
 
 
+void remove_internal_args(int, int)
+{}
+
+
 string current_root()
 {
        return "/";
@@ -202,12 +206,6 @@ string const & nulldev()
 }
 
 
-bool is_terminal(io_channel channel)
-{
-       return isatty(channel);
-}
-
-
 shell_type shell()
 {
        return UNIX;
@@ -299,9 +297,16 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode)
 
 string real_path(string const & path)
 {
+#ifdef HAVE_DEF_PATH_MAX
        char rpath[PATH_MAX + 1];
        char * result = realpath(path.c_str(), rpath);
-       return FileName::fromFilesystemEncoding(result ? rpath : path).absFilename();
+       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;
+#endif
 }
 
 } // namespace os