[llvm-commits] [llvm] r81252 - /llvm/trunk/lib/System/Unix/Program.inc
Mikhail Glushenkov
foldr at codedgers.com
Tue Sep 8 13:31:27 PDT 2009
Author: foldr
Date: Tue Sep 8 15:31:27 2009
New Revision: 81252
URL: http://llvm.org/viewvc/llvm-project?rev=81252&view=rev
Log:
This should unbreak the build on 64-bit Linux.
Modified:
llvm/trunk/lib/System/Unix/Program.inc
Modified: llvm/trunk/lib/System/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Program.inc?rev=81252&r1=81251&r2=81252&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Program.inc (original)
+++ llvm/trunk/lib/System/Unix/Program.inc Tue Sep 8 15:31:27 2009
@@ -39,7 +39,8 @@
Program::~Program() {}
unsigned Program::GetPid() const {
- return reinterpret_cast<unsigned>(Data_);
+ uint64_t pid = reinterpret_cast<uint64_t>(Data_);
+ return static_cast<unsigned>(pid);
}
// This function just uses the PATH environment variable to find the program.
@@ -241,7 +242,8 @@
// Parent process: Wait for the child process to terminate.
int status;
- pid_t child = reinterpret_cast<pid_t>(Data_);
+ uint64_t pid = reinterpret_cast<uint64_t>(Data_);
+ pid_t child = static_cast<pid_t>(pid);
while (wait(&status) != child)
if (secondsToWait && errno == EINTR) {
// Kill the child.
@@ -294,7 +296,8 @@
return true;
}
- pid_t pid = reinterpret_cast<pid_t>(Data_);
+ uint64_t pid64 = reinterpret_cast<uint64_t>(Data_);
+ pid_t pid = static_cast<pid_t>(pid64);
return (kill(pid, SIGKILL) == 0);
}
More information about the llvm-commits
mailing list