[llvm-commits] [llvm] r112662 - /llvm/trunk/lib/System/Unix/Path.inc

Anton Korobeynikov asl at math.spbu.ru
Tue Aug 31 15:38:01 PDT 2010


Author: asl
Date: Tue Aug 31 17:38:00 2010
New Revision: 112662

URL: http://llvm.org/viewvc/llvm-project?rev=112662&view=rev
Log:
Some fixes for NetBSD

Modified:
    llvm/trunk/lib/System/Unix/Path.inc

Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=112662&r1=112661&r2=112662&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Tue Aug 31 17:38:00 2010
@@ -282,7 +282,7 @@
   return Path(pathname);
 }
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined (__NetBSD__)
 static int
 test_dir(char buf[PATH_MAX], char ret[PATH_MAX],
     const char *dir, const char *bin)
@@ -334,7 +334,7 @@
   free(pv);
   return (NULL);
 }
-#endif // __FreeBSD__
+#endif // __FreeBSD__ || __NetBSD__
 
 /// GetMainExecutable - Return the path to the main executable, given the
 /// value of argv[0] from program startup.
@@ -350,7 +350,7 @@
     if (realpath(exe_path, link_path))
       return Path(std::string(link_path));
   }
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined (__NetBSD__)
   char exe_path[PATH_MAX];
 
   if (getprogpath(exe_path, argv0) != NULL)





More information about the llvm-commits mailing list