mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-01 16:26:29 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user