summaryrefslogtreecommitdiff
path: root/lib/System
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-09-17 11:14:18 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-09-17 11:14:18 +0000
commit4cec6e2103796697b4988adfb059be0457aadf31 (patch)
tree2ed039d49bd925129a88db0676b808c5587c4eca /lib/System
parentcdd7fb7853c35406cb7bdd5508a49ede3eefbd86 (diff)
downloadllvm-4cec6e2103796697b4988adfb059be0457aadf31.tar.gz
llvm-4cec6e2103796697b4988adfb059be0457aadf31.tar.bz2
llvm-4cec6e2103796697b4988adfb059be0457aadf31.tar.xz
Move the declaration SetInformationJobObject() outside of namespace.
It is also workaround for PR7927. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Win32/Program.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/System/Win32/Program.inc b/lib/System/Win32/Program.inc
index 16bb28e17a..ea1b5a6a06 100644
--- a/lib/System/Win32/Program.inc
+++ b/lib/System/Win32/Program.inc
@@ -22,6 +22,15 @@
//=== and must not be UNIX code
//===----------------------------------------------------------------------===//
+#ifdef __MINGW32__
+// Ancient mingw32's w32api might not have this declaration.
+extern "C"
+BOOL WINAPI SetInformationJobObject(HANDLE hJob,
+ JOBOBJECTINFOCLASS JobObjectInfoClass,
+ LPVOID lpJobObjectInfo,
+ DWORD cbJobObjectInfoLength);
+#endif
+
namespace {
struct Win32ProcessInfo {
HANDLE hProcess;
@@ -123,15 +132,6 @@ static HANDLE RedirectIO(const Path *path, int fd, std::string* ErrMsg) {
return h;
}
-#ifdef __MINGW32__
- // Due to unknown reason, mingw32's w32api doesn't have this declaration.
- extern "C"
- BOOL WINAPI SetInformationJobObject(HANDLE hJob,
- JOBOBJECTINFOCLASS JobObjectInfoClass,
- LPVOID lpJobObjectInfo,
- DWORD cbJobObjectInfoLength);
-#endif
-
/// ArgNeedsQuotes - Check whether argument needs to be quoted when calling
/// CreateProcess.
static bool ArgNeedsQuotes(const char *Str) {