add some triple for minix, patch by Kees van Reeuwijk from PR7582
authorChris Lattner <sabre@nondot.org>
Wed, 7 Jul 2010 15:52:27 +0000 (15:52 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 7 Jul 2010 15:52:27 +0000 (15:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107785 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/Support/Triple.cpp
lib/Support/raw_ostream.cpp
lib/System/Unix/Program.inc

index be31ea012831d32b39a6c95ee6001bbd2408b5ba..c6f4165489dd3070e89818653e54d74da448ee31 100644 (file)
@@ -100,7 +100,8 @@ public:
     Psp,
     Solaris,
     Win32,
-    Haiku
+    Haiku,
+    Minix
   };
   
 private:
index 9796ca56f476449e2248bde6c8c02f0439fbabf8..6a70449b56dc7d38ac6bd2e38948f6f0a7924794 100644 (file)
@@ -104,6 +104,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
   case Solaris: return "solaris";
   case Win32: return "win32";
   case Haiku: return "haiku";
+  case Minix: return "minix";
   }
 
   return "<invalid>";
@@ -326,7 +327,9 @@ void Triple::Parse() const {
   else if (OSName.startswith("win32"))
     OS = Win32;
   else if (OSName.startswith("haiku"))
-       OS = Haiku;
+    OS = Haiku;
+  else if (OSName.startswith("minix"))
+    OS = Minix;
   else
     OS = UnknownOS;
 
index bb72dfbecfd3c78620630592367d561884818cfc..8054ae63688c926b22e74c7d323ba637c3d5a1a3 100644 (file)
@@ -481,7 +481,7 @@ uint64_t raw_fd_ostream::seek(uint64_t off) {
 }
 
 size_t raw_fd_ostream::preferred_buffer_size() const {
-#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_MINIX)
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(__minix)
   // Windows and Minix have no st_blksize.
   assert(FD >= 0 && "File not yet open!");
   struct stat statbuf;
index 358415f52663fa2ceef67010ff5db21cab997f00..67018de812ed0a778b627cf841d68f54e80c3898 100644 (file)
@@ -310,7 +310,7 @@ Program::Wait(unsigned secondsToWait,
   // fact of having a handler at all causes the wait below to return with EINTR,
   // unlike if we used SIG_IGN.
   if (secondsToWait) {
-#ifndef __HAIKU__
+#if !defined(__HAIKU__) && !defined(__minix)
     Act.sa_sigaction = 0;
 #endif
     Act.sa_handler = TimeOutHandler;