]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileInfo.C
various changes
[lyx.git] / src / support / FileInfo.C
index da836d2e8cc1dea0677df63948d265a370ca0e5d..baa460d493644167e2d495a185db3ca12316e7b2 100644 (file)
@@ -5,14 +5,19 @@
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
 #include <config.h>
 
-#include <sys/types.h>
-#include <sys/stat.h>
+#ifdef __GNUG__
+#pragma implementation
+#endif
+
+//#include <sys/types.h>
+//#include <sys/stat.h>
+
 #include <cerrno>
 #include "FileInfo.h"
 
@@ -136,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;
 }
@@ -233,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' : '-';
@@ -369,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;
@@ -382,3 +387,6 @@ bool FileInfo::access(int p)
                return false;
        }
 }
+
+
+