diff options
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/cmake/LLDBDependencies.cmake | 4 | ||||
-rw-r--r-- | lldb/cmake/modules/AddLLDB.cmake | 2 | ||||
-rw-r--r-- | lldb/cmake/modules/LLDBConfig.cmake | 2 | ||||
-rw-r--r-- | lldb/include/lldb/Host/windows/windows.h | 2 | ||||
-rw-r--r-- | lldb/source/API/SystemInitializerFull.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Core/Mangled.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Host/common/File.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/windows/Host.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/windows/HostProcessWindows.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/windows/ProcessRunLock.cpp | 10 | ||||
-rw-r--r-- | lldb/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h | 2 | ||||
-rw-r--r-- | lldb/source/Target/ProcessLaunchInfo.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/driver/Driver.cpp | 4 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MICmnStreamStdin.cpp | 2 | ||||
-rw-r--r-- | lldb/tools/lldb-mi/MIUtilDebug.cpp | 2 |
16 files changed, 20 insertions, 28 deletions
diff --git a/lldb/cmake/LLDBDependencies.cmake b/lldb/cmake/LLDBDependencies.cmake index 00418334222..223a39e5f71 100644 --- a/lldb/cmake/LLDBDependencies.cmake +++ b/lldb/cmake/LLDBDependencies.cmake @@ -91,8 +91,8 @@ set( LLDB_USED_LIBS if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) list(APPEND LLDB_USED_LIBS lldbPluginProcessWindowsCommon - Ws2_32 - Rpcrt4 + ws2_32 + rpcrt4 ) endif () diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake index bfea1462dd5..bf2a9aaa91b 100644 --- a/lldb/cmake/modules/AddLLDB.cmake +++ b/lldb/cmake/modules/AddLLDB.cmake @@ -49,7 +49,7 @@ macro(add_lldb_library name) endif() #PIC not needed on Win - if (NOT MSVC) + if (NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") endif() diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake index 9481f21758e..4be19974ee3 100644 --- a/lldb/cmake/modules/LLDBConfig.cmake +++ b/lldb/cmake/modules/LLDBConfig.cmake @@ -243,7 +243,7 @@ endif() # Use the Unicode (UTF-16) APIs by default on Win32 if (CMAKE_SYSTEM_NAME MATCHES "Windows") - add_definitions( /D _UNICODE /D UNICODE ) + add_definitions( -D_UNICODE -DUNICODE ) endif() set(LLDB_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/lldb/include/lldb/Host/windows/windows.h b/lldb/include/lldb/Host/windows/windows.h index c858124a016..3dc9f77f8e2 100644 --- a/lldb/include/lldb/Host/windows/windows.h +++ b/lldb/include/lldb/Host/windows/windows.h @@ -11,9 +11,11 @@ #define LLDB_lldb_windows_h_ #define NTDDI_VERSION NTDDI_VISTA +#undef _WIN32_WINNT // undef a previous definition to avoid warning #define _WIN32_WINNT _WIN32_WINNT_VISTA #define WIN32_LEAN_AND_MEAN #define NOGDI +#undef NOMINMAX // undef a previous definition to avoid warning #define NOMINMAX #include <windows.h> #undef GetUserName diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index 4ebbc55494c..2df056e1b97 100644 --- a/lldb/source/API/SystemInitializerFull.cpp +++ b/lldb/source/API/SystemInitializerFull.cpp @@ -107,7 +107,7 @@ #include "Plugins/Process/FreeBSD/ProcessFreeBSD.h" #endif -#if defined(_MSC_VER) +#if defined(_WIN32) #include "Plugins/Process/Windows/Common/ProcessWindows.h" #include "lldb/Host/windows/windows.h" #endif @@ -332,7 +332,7 @@ void SystemInitializerFull::Initialize() { ObjCPlusPlusLanguage::Initialize(); OCamlLanguage::Initialize(); -#if defined(_MSC_VER) +#if defined(_WIN32) ProcessWindows::Initialize(); #endif #if defined(__FreeBSD__) diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp index 30c4ac12d03..c2c63b66563 100644 --- a/lldb/source/Core/Mangled.cpp +++ b/lldb/source/Core/Mangled.cpp @@ -9,9 +9,9 @@ // FreeBSD9-STABLE requires this to know about size_t in cxxabi.h #include <cstddef> -#if defined(_MSC_VER) +#if defined(_WIN32) #include "lldb/Host/windows/windows.h" -#include <Dbghelp.h> +#include <dbghelp.h> #pragma comment(lib, "dbghelp.lib") #endif diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index fcd1416e9ce..4eb9ae15f06 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -222,7 +222,7 @@ Error File::Open(const char *path, uint32_t options, uint32_t permissions) { } do { -#ifdef _WIN32 +#ifdef _MSC_VER std::wstring wpath; if (!llvm::ConvertUTF8toWide(path, wpath)) { m_descriptor = -1; diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index b4a50c4a05c..3da073605dc 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -29,7 +29,7 @@ #include "llvm/Support/ConvertUTF.h" // Windows includes -#include <TlHelp32.h> +#include <tlhelp32.h> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Host/windows/HostProcessWindows.cpp b/lldb/source/Host/windows/HostProcessWindows.cpp index 81c81a775df..8201d53bd27 100644 --- a/lldb/source/Host/windows/HostProcessWindows.cpp +++ b/lldb/source/Host/windows/HostProcessWindows.cpp @@ -16,7 +16,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/ConvertUTF.h" -#include <Psapi.h> +#include <psapi.h> using namespace lldb_private; diff --git a/lldb/source/Host/windows/ProcessRunLock.cpp b/lldb/source/Host/windows/ProcessRunLock.cpp index 40a32122540..64276917fc8 100644 --- a/lldb/source/Host/windows/ProcessRunLock.cpp +++ b/lldb/source/Host/windows/ProcessRunLock.cpp @@ -10,16 +10,6 @@ #include "lldb/Host/ProcessRunLock.h" #include "lldb/Host/windows/windows.h" -namespace { -#if defined(__MINGW32__) -// Taken from WinNT.h -typedef struct _RTL_SRWLOCK { PVOID Ptr; } RTL_SRWLOCK, *PRTL_SRWLOCK; - -// Taken from WinBase.h -typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; -#endif -} - static PSRWLOCK GetLock(lldb::rwlock_t lock) { return static_cast<PSRWLOCK>(lock); } diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp index 9bfec986ed0..3fd6cdc5c9a 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp @@ -16,7 +16,7 @@ #ifdef _WIN32 #include "lldb/Host/windows/windows.h" -#include <DbgHelp.h> // for MiniDumpWriteDump +#include <dbghelp.h> // for MiniDumpWriteDump #endif namespace lldb_private { diff --git a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h index e99a75e023e..1eec85d52c2 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h +++ b/lldb/source/Plugins/Process/Windows/Common/ExceptionRecord.h @@ -12,7 +12,7 @@ #include "lldb/Host/windows/windows.h" #include "lldb/lldb-forward.h" -#include <DbgHelp.h> +#include <dbghelp.h> #include <memory> #include <vector> diff --git a/lldb/source/Target/ProcessLaunchInfo.cpp b/lldb/source/Target/ProcessLaunchInfo.cpp index aba9605e4ba..92d9371b541 100644 --- a/lldb/source/Target/ProcessLaunchInfo.cpp +++ b/lldb/source/Target/ProcessLaunchInfo.cpp @@ -294,7 +294,7 @@ void ProcessLaunchInfo::FinalizeFileActions(Target *target, __FUNCTION__); int open_flags = O_RDWR | O_NOCTTY; -#if !defined(_MSC_VER) +#if !defined(_WIN32) // We really shouldn't be specifying platform specific flags // that are intended for a system call in generic code. But // this will have to do for now. diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 102a26ae7f6..8e226a97af3 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -1208,13 +1208,13 @@ void sigcont_handler(int signo) { } int -#ifdef WIN32 +#ifdef _MSC_VER wmain(int argc, wchar_t const *wargv[]) #else main(int argc, char const *argv[]) #endif { -#ifdef _WIN32 +#ifdef _MSC_VER // Convert wide arguments to UTF-8 std::vector<std::string> argvStrings(argc); std::vector<const char *> argvPointers(argc); diff --git a/lldb/tools/lldb-mi/MICmnStreamStdin.cpp b/lldb/tools/lldb-mi/MICmnStreamStdin.cpp index f560ecea667..154519dbec4 100644 --- a/lldb/tools/lldb-mi/MICmnStreamStdin.cpp +++ b/lldb/tools/lldb-mi/MICmnStreamStdin.cpp @@ -9,7 +9,7 @@ // Third Party Headers #ifdef _MSC_VER -#include <Windows.h> +#include <windows.h> #endif #include <string.h> // For std::strerror() diff --git a/lldb/tools/lldb-mi/MIUtilDebug.cpp b/lldb/tools/lldb-mi/MIUtilDebug.cpp index 5a9e480ebcd..519fd950feb 100644 --- a/lldb/tools/lldb-mi/MIUtilDebug.cpp +++ b/lldb/tools/lldb-mi/MIUtilDebug.cpp @@ -9,7 +9,7 @@ // Third party headers: #ifdef _WIN32 -#include <Windows.h> +#include <windows.h> #endif // In-house headers: |