GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.
[oota-llvm.git] / lib / System / Unix / Path.inc
index 184da1e27ac0c7a32dd76fc9495952bd7e0fb75e..44c81a2f3f92aa1959ab112a5b934b0675991f1b 100644 (file)
@@ -78,6 +78,10 @@ using namespace sys;
 
 const char sys::PathSeparator = ':';
 
+StringRef Path::GetEXESuffix() {
+  return "";
+}
+
 Path::Path(StringRef p)
   : path(p) {}
 
@@ -439,7 +443,7 @@ Path::isDirectory() const {
   struct stat buf;
   if (0 != stat(path.c_str(), &buf))
     return false;
-  return buf.st_mode & S_IFDIR ? true : false;
+  return ((buf.st_mode & S_IFMT) == S_IFDIR) ? true : false;
 }
 
 bool