[llvm-commits] CVS: llvm/lib/System/Win32/Program.cpp

Reid Spencer reid at x10sys.com
Mon Dec 13 20:19:03 PST 2004



Changes in directory llvm/lib/System/Win32:

Program.cpp updated: 1.6 -> 1.7
---
Log message:

For PR351: http://llvm.cs.uiuc.edu/PR351 :
Implement the new environment pointer for ExecuteAndWait


---
Diffs of the changes:  (+4 -2)

Index: llvm/lib/System/Win32/Program.cpp
diff -u llvm/lib/System/Win32/Program.cpp:1.6 llvm/lib/System/Win32/Program.cpp:1.7
--- llvm/lib/System/Win32/Program.cpp:1.6	Sat Dec 11 11:37:01 2004
+++ llvm/lib/System/Win32/Program.cpp	Mon Dec 13 22:18:51 2004
@@ -69,7 +69,8 @@
 //
 int 
 Program::ExecuteAndWait(const Path& path, 
-                        const std::vector<std::string>& args) {
+                        const std::vector<std::string>& args,
+                        const char** env) {
   if (!path.executable())
     throw path.toString() + " is not executable"; 
 
@@ -124,8 +125,9 @@
   PROCESS_INFORMATION pi;
   memset(&pi, 0, sizeof(pi));
 
+  LPVOID lpEnvironment = envp;
   if (!CreateProcess(path.c_str(), command, NULL, NULL, FALSE, 0,
-                     NULL, NULL, &si, &pi))
+                     lpEnvironment, NULL, &si, &pi))
   {
     ThrowError(std::string("Couldn't execute program '") + 
                path.toString() + "'");






More information about the llvm-commits mailing list