diff options
author | Pat Gavlin <pagavlin@microsoft.com> | 2016-05-13 16:39:52 -0700 |
---|---|---|
committer | Pat Gavlin <pagavlin@microsoft.com> | 2016-05-13 16:39:52 -0700 |
commit | 4e2571ba5ae0a7c89a323e619c47eedaca04a261 (patch) | |
tree | bd6bd480972890ef665f237efb90defce2d794ca | |
parent | ec35fab57dbb9f245558ffe5dc08aeb3d1769f2f (diff) | |
download | coreclr-4e2571ba5ae0a7c89a323e619c47eedaca04a261.tar.gz coreclr-4e2571ba5ae0a7c89a323e619c47eedaca04a261.tar.bz2 coreclr-4e2571ba5ae0a7c89a323e619c47eedaca04a261.zip |
Fix a PCH-related issue in the jitstdout change.
[tfs-changeset: 1604771]
-rw-r--r-- | src/jit/ee_il_dll.cpp | 10 | ||||
-rw-r--r-- | src/jit/host.h | 3 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/jit/ee_il_dll.cpp b/src/jit/ee_il_dll.cpp index bf74ad0da5..a41b147ef3 100644 --- a/src/jit/ee_il_dll.cpp +++ b/src/jit/ee_il_dll.cpp @@ -13,10 +13,6 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ -// This file is responsible for initializing `jitstdout` and therefore needs to -// be able to refer to `stdout`. -#define ALLOW_STDOUT - #include "jitpch.h" #ifdef _MSC_VER #pragma hdrstop @@ -72,11 +68,11 @@ void __stdcall jitStartup(ICorJitHost* jitHost) } #if defined(PLATFORM_UNIX) - jitstdout = stdout; + jitstdout = procstdout(); #else if (jitstdout == nullptr) { - int jitstdoutFd = _dup(_fileno(stdout)); + int jitstdoutFd = _dup(_fileno(procstdout())); _setmode(jitstdoutFd, _O_TEXT); jitstdout = _fdopen(jitstdoutFd, "w"); assert(jitstdout != nullptr); @@ -93,7 +89,7 @@ void jitShutdown() { Compiler::compShutdown(); - if (jitstdout != stdout) + if (jitstdout != procstdout()) { fclose(jitstdout); } diff --git a/src/jit/host.h b/src/jit/host.h index bf1f60e1e3..d38d41bdc7 100644 --- a/src/jit/host.h +++ b/src/jit/host.h @@ -54,10 +54,9 @@ const size_t OS_page_size = (4*1024); extern FILE* jitstdout; -#if !defined(ALLOW_STDOUT) +inline FILE* procstdout() { return stdout; } #undef stdout #define stdout use_jitstdout -#endif /*****************************************************************************/ #endif |