aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Signals.cpp
diff options
context:
space:
mode:
authorAnand Shukla <ashukla@cs.uiuc.edu>2002-06-25 20:55:50 +0000
committerAnand Shukla <ashukla@cs.uiuc.edu>2002-06-25 20:55:50 +0000
commitcfb22d3c14b53bc73ec90f7d471c2d2d2453cf03 (patch)
tree980ad03dfdb10c7b53aae6a92b1b0285e30e01a5 /lib/Support/Signals.cpp
parenteea60fc59c0b231bbf9d5ab43c447f936f4012df (diff)
changes to make it compatible with 64bit gcc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/Signals.cpp')
-rw-r--r--lib/Support/Signals.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp
index 8aa1b6047a..29daedf0fb 100644
--- a/lib/Support/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -11,8 +11,9 @@
#include <cstdlib>
#include <cstdio>
#include <signal.h>
+using std::string;
-static vector<string> FilesToRemove;
+static std::vector<string> FilesToRemove;
// IntSigs - Signals that may interrupt the program at any time.
static const int IntSigs[] = {
@@ -36,7 +37,7 @@ static void SignalHandler(int Sig) {
FilesToRemove.pop_back();
}
- if (find(IntSigs, IntSigsEnd, Sig) != IntSigsEnd)
+ if (std::find(IntSigs, IntSigsEnd, Sig) != IntSigsEnd)
exit(1); // If this is an interrupt signal, exit the program
// Otherwise if it is a fault (like SEGV) reissue the signal to die...
@@ -48,6 +49,6 @@ static void RegisterHandler(int Signal) { signal(Signal, SignalHandler); }
void RemoveFileOnSignal(const string &Filename) {
FilesToRemove.push_back(Filename);
- for_each(IntSigs, IntSigsEnd, RegisterHandler);
- for_each(KillSigs, KillSigsEnd, RegisterHandler);
+ std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
+ std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
}