forked from OSchip/llvm-project
Fix Mingw build.
Following changes are done. Add missing headers. Replace _snprintf with snprintf. It is already changed to _snprintf for MSVC. Add a file in the build for autoconf. Call DynamicLoaderWindows::Terminate and DynamicLoaderWindows::Initialize only for MSVC build. Reviewed in http://reviews.llvm.org/D7536. llvm-svn: 228822
This commit is contained in:
parent
f147359376
commit
c4d5ed06cd
|
@ -9,10 +9,13 @@
|
|||
|
||||
#include "lldb/Host/SocketAddress.h"
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// C Includes
|
||||
#if !defined(_WIN32)
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include "lldb/Host/windows/win32.h"
|
||||
#endif
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
@ -54,7 +57,7 @@ const char* inet_ntop(int af, const void * src,
|
|||
{
|
||||
char tmp[INET6_ADDRSTRLEN] = {0};
|
||||
const uint16_t* src16 = static_cast<const uint16_t*>(src);
|
||||
int full_size = _snprintf(tmp, sizeof(tmp),
|
||||
int full_size = ::snprintf(tmp, sizeof(tmp),
|
||||
"%x:%x:%x:%x:%x:%x:%x:%x",
|
||||
ntohs(src16[0]), ntohs(src16[1]), ntohs(src16[2]), ntohs(src16[3]),
|
||||
ntohs(src16[4]), ntohs(src16[5]), ntohs(src16[6]), ntohs(src16[7])
|
||||
|
|
|
@ -11,4 +11,6 @@ LLDB_LEVEL := ../../..
|
|||
LIBRARYNAME := lldbHostWindows
|
||||
BUILD_ARCHIVE = 1
|
||||
|
||||
SOURCES = $(notdir $(wildcard $(PROJ_SRC_DIR)/*.cpp )) $(PROJ_SRC_DIR)/../posix/ConnectionFileDescriptorPosix.cpp
|
||||
|
||||
include $(LLDB_LEVEL)/Makefile
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
// C Includes
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// C++ Includes
|
||||
// Other libraries and framework includes
|
||||
|
|
|
@ -209,7 +209,7 @@ lldb_private::Initialize ()
|
|||
//----------------------------------------------------------------------
|
||||
ProcessLinux::Initialize();
|
||||
#endif
|
||||
#if defined(_WIN32)
|
||||
#if defined(_MSC_VER)
|
||||
DynamicLoaderWindows::Initialize();
|
||||
ProcessWindows::Initialize();
|
||||
#endif
|
||||
|
@ -298,7 +298,7 @@ lldb_private::Terminate ()
|
|||
|
||||
Debugger::SettingsTerminate ();
|
||||
|
||||
#if defined (_WIN32)
|
||||
#if defined(_MSC_VER)
|
||||
DynamicLoaderWindows::Terminate();
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue