]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileInfo.C
lyx-devel.diff
[lyx.git] / src / support / FileInfo.C
index 1d2b9b88f4097f862db55551fe75c2cc4d7eb307..49bd6af708c5686ef6e057f192702df9065e4de7 100644 (file)
@@ -15,8 +15,9 @@
 #pragma implementation
 #endif
 
-#include <sys/types.h>
-#include <sys/stat.h>
+//#include <sys/types.h>
+//#include <sys/stat.h>
+
 #include <cerrno>
 #include "FileInfo.h"
 
@@ -140,9 +141,9 @@ void FileInfo::init()
 void FileInfo::dostat(bool link)
 {
        if (link) {
-               status = lstat(fname.c_str(), &buf);
+               status = ::lstat(fname.c_str(), &buf);
        } else {
-               status = stat(fname.c_str(), &buf);
+               status = ::stat(fname.c_str(), &buf);
        }
        if (status) err = errno;
 }
@@ -237,7 +238,7 @@ char FileInfo::typeLetter() const
 
 
 // should not be in FileInfo
-void FileInfo::flagRWX(unsigned short i, char * szString) const
+void FileInfo::flagRWX(mode_t i, char * szString) const
 {
        szString[0] = (i & S_IRUSR) ? 'r' : '-';
        szString[1] = (i & S_IWUSR) ? 'w' : '-';
@@ -373,7 +374,7 @@ bool FileInfo::isSocket() const
 
 
 // should not be in FileInfo
-bool FileInfo::access(int p)
+bool FileInfo::access(int p) const
 {
        // if we don't have a filename we fail
        if (fname.empty()) return false;
@@ -386,3 +387,6 @@ bool FileInfo::access(int p)
                return false;
        }
 }
+
+
+