Can you change DynamicLoaderWindows calls to be #if defined(_MSC_VER)?  Otherwise lgtm<br><div class="gmail_quote">On Tue, Feb 10, 2015 at 8:17 AM Hafiz Abid Qadeer <<a href="mailto:abidh.haq@gmail.com">abidh.haq@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi zturner,<br>
<br>
Following changes are done.<br>
1. Add missing headers.<br>
2. Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC.<br>
3. Add a file in the build for autoconf.<br>
4. Exclude DynamicLoaderWindows::<u></u>Terminate from mingw build as DynamicLoaderWindows::<u></u>Initialize is done.<br>
<br>
Built on Linux and Windows.<br>
<br>
<a href="http://reviews.llvm.org/D7536" target="_blank">http://reviews.llvm.org/D7536</a><br>
<br>
Files:<br>
  source/Host/common/<u></u>SocketAddress.cpp<br>
  source/Host/windows/Makefile<br>
  source/Utility/UriParser.cpp<br>
  source/lldb.cpp<br>
<br>
Index: source/Host/common/<u></u>SocketAddress.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- source/Host/common/<u></u>SocketAddress.cpp<br>
+++ source/Host/common/<u></u>SocketAddress.cpp<br>
@@ -9,10 +9,13 @@<br>
<br>
 #include "lldb/Host/SocketAddress.h"<br>
 #include <stddef.h><br>
+#include <stdio.h><br>
<br>
 // C Includes<br>
 #if !defined(_WIN32)<br>
 #include <arpa/inet.h><br>
+#else<br>
+#include "lldb/Host/windows/win32.h"<br>
 #endif<br>
 #include <assert.h><br>
 #include <string.h><br>
@@ -54,7 +57,7 @@<br>
             {<br>
                 char tmp[INET6_ADDRSTRLEN] = {0};<br>
                 const uint16_t* src16 = static_cast<const uint16_t*>(src);<br>
-                int full_size = _snprintf(tmp, sizeof(tmp),<br>
+                int full_size = ::snprintf(tmp, sizeof(tmp),<br>
                                           "%x:%x:%x:%x:%x:%x:%x:%x",<br>
                                           ntohs(src16[0]), ntohs(src16[1]), ntohs(src16[2]), ntohs(src16[3]),<br>
                                           ntohs(src16[4]), ntohs(src16[5]), ntohs(src16[6]), ntohs(src16[7])<br>
Index: source/Host/windows/Makefile<br>
==============================<u></u>==============================<u></u>=======<br>
--- source/Host/windows/Makefile<br>
+++ source/Host/windows/Makefile<br>
@@ -11,4 +11,6 @@<br>
 LIBRARYNAME := lldbHostWindows<br>
 BUILD_ARCHIVE = 1<br>
<br>
+SOURCES = $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp )) $(PROJ_SRC_DIR)/../posix/<u></u>ConnectionFileDescriptorPosix.<u></u>cpp<br>
+<br>
 include $(LLDB_LEVEL)/Makefile<br>
Index: source/Utility/UriParser.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- source/Utility/UriParser.cpp<br>
+++ source/Utility/UriParser.cpp<br>
@@ -11,6 +11,7 @@<br>
<br>
 // C Includes<br>
 #include <stdlib.h><br>
+#include <stdio.h><br>
<br>
 // C++ Includes<br>
 // Other libraries and framework includes<br>
Index: source/lldb.cpp<br>
==============================<u></u>==============================<u></u>=======<br>
--- source/lldb.cpp<br>
+++ source/lldb.cpp<br>
@@ -298,7 +298,7 @@<br>
<br>
     Debugger::SettingsTerminate ();<br>
<br>
-#if defined (_WIN32)<br>
+#if defined(_WIN32) && !defined(__MINGW32__)<br>
     DynamicLoaderWindows::<u></u>Terminate();<br>
 #endif<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
</blockquote></div>