System/Path/Windows: Make GetSystemLibraryPaths more generic.
[oota-llvm.git] / lib / System / Unix / Process.inc
index 94e4c1bde25c2ad46d4939272516838bf16fca7c..cf6a47a31c80d33b72fc2f525c23f6e3a0b9d15a 100644 (file)
@@ -18,7 +18,9 @@
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
-#ifdef HAVE_MALLOC_H
+// DragonFly BSD has deprecated <malloc.h> for <stdlib.h> instead,
+//  Unix.h includes this for us already.
+#if defined(HAVE_MALLOC_H) && !defined(__DragonFly__)
 #include <malloc.h>
 #endif
 #ifdef HAVE_MALLOC_MALLOC_H
@@ -275,7 +277,7 @@ bool Process::ColorNeedsFlush() {
     COLOR(FGBG, "7", BOLD)\
   }
 
-static const char* colorcodes[2][2][8] = {
+static const char colorcodes[2][2][8][10] = {
  { ALLCOLORS("3",""), ALLCOLORS("3","1;") },
  { ALLCOLORS("4",""), ALLCOLORS("4","1;") }
 };