<div>This fix doesn't fully make llvm compile under MSVC. I still have the link error when compile llvm-ld. Since windows.h will define the macro for CopyFile. This cause the following line link to the CopyFileA.</div>

<div> </div>
<div>llvm-ld.cpp</div>
<div>Line414:  if (0 != sys::CopyFile(sys::Path(OutputFilename), llvmstub, &ErrMsg))<br><br><br></div>
<div class="gmail_quote">On Wed, May 20, 2009 at 5:34 PM, Owen Anderson <span dir="ltr"><<a href="mailto:resistor@mac.com">resistor@mac.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Author: resistor<br>Date: Wed May 20 04:34:13 2009<br>New Revision: 72167<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=72167&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=72167&view=rev</a><br>
Log:<br>Compile fix for MSVC.<br><br>Modified:<br>   llvm/trunk/include/llvm/System/Atomic.h<br><br>Modified: llvm/trunk/include/llvm/System/Atomic.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Atomic.h?rev=72167&r1=72166&r2=72167&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Atomic.h?rev=72167&r1=72166&r2=72167&view=diff</a><br>
<br>==============================================================================<br>--- llvm/trunk/include/llvm/System/Atomic.h (original)<br>+++ llvm/trunk/include/llvm/System/Atomic.h Wed May 20 04:34:13 2009<br>@@ -17,6 +17,7 @@<br>
 #include "llvm/Config/config.h"<br><br> #if defined(_MSC_VER)<br>+#define NOMINMAX<br> #include <windows.h><br> #endif<br><br><br><br>_______________________________________________<br>llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote>
</div><br><br clear="all">
<div></div><br>-- <br>-Howard<br>