aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/lib/Support/PluginLoader.cpp4
-rw-r--r--support/lib/Support/Signals.cpp2
-rw-r--r--support/lib/Support/SystemUtils.cpp12
-rw-r--r--support/lib/Support/Timer.cpp21
-rw-r--r--support/tools/Burg/Makefile2
-rw-r--r--support/tools/TableGen/Makefile7
6 files changed, 29 insertions, 19 deletions
diff --git a/support/lib/Support/PluginLoader.cpp b/support/lib/Support/PluginLoader.cpp
index dce923af7f..b973b16a50 100644
--- a/support/lib/Support/PluginLoader.cpp
+++ b/support/lib/Support/PluginLoader.cpp
@@ -11,8 +11,8 @@
//===----------------------------------------------------------------------===//
#include "Support/CommandLine.h"
-#include <dlfcn.h>
-#include <link.h>
+#include "Config/dlfcn.h"
+#include "Config/link.h"
#include <iostream>
namespace {
diff --git a/support/lib/Support/Signals.cpp b/support/lib/Support/Signals.cpp
index 503d3a63b2..b3ad9c42de 100644
--- a/support/lib/Support/Signals.cpp
+++ b/support/lib/Support/Signals.cpp
@@ -32,7 +32,7 @@ static const int *KillSigsEnd = KillSigs + sizeof(KillSigs)/sizeof(KillSigs[0]);
// SignalHandler - The signal handler that runs...
-static void SignalHandler(int Sig) {
+static RETSIGTYPE SignalHandler(int Sig) {
while (!FilesToRemove.empty()) {
std::remove(FilesToRemove.back().c_str());
FilesToRemove.pop_back();
diff --git a/support/lib/Support/SystemUtils.cpp b/support/lib/Support/SystemUtils.cpp
index 51f3d18354..97e13067d0 100644
--- a/support/lib/Support/SystemUtils.cpp
+++ b/support/lib/Support/SystemUtils.cpp
@@ -10,12 +10,12 @@
#include <fstream>
#include <iostream>
#include <cstdlib>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <errno.h>
+#include "Config/sys/types.h"
+#include "Config/sys/stat.h"
+#include "Config/fcntl.h"
+#include "Config/sys/wait.h"
+#include "Config/unistd.h"
+#include "Config/errno.h"
/// removeFile - Delete the specified file
///
diff --git a/support/lib/Support/Timer.cpp b/support/lib/Support/Timer.cpp
index 96b63f1e94..79d4c1cfe8 100644
--- a/support/lib/Support/Timer.cpp
+++ b/support/lib/Support/Timer.cpp
@@ -4,15 +4,16 @@
//
//===----------------------------------------------------------------------===//
+#include "Config/malloc.h"
+
#include "Support/Timer.h"
#include "Support/CommandLine.h"
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <unistd.h>
-#ifndef __FreeBSD__
-#include <malloc.h>
-#endif // __FreeBSD__
-#include <stdio.h>
+
+#include "Config/sys/resource.h"
+#include "Config/sys/time.h"
+#include "Config/unistd.h"
+#include "Config/malloc.h"
+#include "Config/stdio.h"
#include <iostream>
#include <algorithm>
#include <functional>
@@ -21,10 +22,12 @@
std::string LibSupportInfoOutputFilename;
namespace {
+#ifdef HAVE_MALLINFO
cl::opt<bool>
TrackSpace("track-memory", cl::desc("Enable -time-passes memory "
"tracking (this may be slow)"),
cl::Hidden);
+#endif
cl::opt<std::string, true>
InfoOutputFilename("info-output-file",
@@ -76,12 +79,12 @@ Timer::~Timer() {
}
static long getMemUsage() {
-#ifndef __FreeBSD__
+#ifdef HAVE_MALLINFO
if (TrackSpace) {
struct mallinfo MI = mallinfo();
return MI.uordblks/*+MI.hblkhd*/;
}
-#endif // __FreeBSD__
+#endif
return 0;
}
diff --git a/support/tools/Burg/Makefile b/support/tools/Burg/Makefile
index b19c0c2e1c..1022358b88 100644
--- a/support/tools/Burg/Makefile
+++ b/support/tools/Burg/Makefile
@@ -25,4 +25,4 @@ test:: $(TOOLEXENAME_G) sample.gr
$(TOOLEXENAME_G) -I sample.gr -o tmp && cmp tmp sample.c
$(TOOLEXENAME_G) -I -O0 <sample.gr >tmp && cmp tmp sample.c
$(TOOLEXENAME_G) -I -= <sample.gr >tmp && cmp tmp sample.c
- rm -f tmp sample.c
+ $(RM) -f tmp sample.c
diff --git a/support/tools/TableGen/Makefile b/support/tools/TableGen/Makefile
index 21c68c6b02..98417d2b75 100644
--- a/support/tools/TableGen/Makefile
+++ b/support/tools/TableGen/Makefile
@@ -6,6 +6,13 @@ USEDLIBS = support.a
include $(LEVEL)/Makefile.common
+#
+# Make the source file depend on the header file. In this way, dependencies
+# (which depend on the source file) won't get generated until bison is done
+# generating the C source and header files for the parser.
+#
+FileLexer.cpp: FileParser.h
+
clean::
-rm -f FileParser.cpp FileParser.h FileLexer.cpp CommandLine.cpp
-rm -f FileParser.output