]> git.lyx.org Git - lyx.git/blobdiff - src/support/filetools.C
tostr -> convert and some bformat work
[lyx.git] / src / support / filetools.C
index 481b8ec8867afc963c43eeebddad50e8b85e0103..4b29034661b3e84e5c6df4810061214b1299bf4c 100644 (file)
@@ -497,7 +497,7 @@ string const createBufferTmpDir()
        // We are in our own directory.  Why bother to mangle name?
        // In fact I wrote this code to circumvent a problematic behaviour (bug?)
        // of EMX mkstemp().
-       string const tmpfl = os::getTmpDir() + "/lyx_tmpbuf" + tostr(count++);
+       string const tmpfl = os::getTmpDir() + "/lyx_tmpbuf" + convert<string>(count++);
        if (mkdir(tmpfl, 0777)) {
                lyxerr << "LyX could not create the temporary directory '"
                       << tmpfl << "'" << endl;
@@ -1145,6 +1145,7 @@ string const MakeDisplayPath(string const & path, unsigned int threshold)
 
 bool LyXReadLink(string const & file, string & link, bool resolve)
 {
+#ifdef HAVE_READLINK
        char linkbuffer[512];
        // Should be PATH_MAX but that needs autconf support
        int const nRead = ::readlink(file.c_str(),
@@ -1157,6 +1158,9 @@ bool LyXReadLink(string const & file, string & link, bool resolve)
        else
                link = linkbuffer;
        return true;
+#else
+       return false;
+#endif
 }