Fix cling compilation errors on Windows (with VS 2015)
This commit is contained in:
parent
c1cb2ca6f2
commit
2649f0d318
@ -89,7 +89,7 @@ string(REPLACE "-fvisibility=hidden" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
|
||||
# The package needs to be compiler without RTTI information
|
||||
if(MSVC)
|
||||
add_definitions(/GR-)
|
||||
add_definitions(/GR- /DNOMINMAX)
|
||||
else()
|
||||
add_definitions(-fno-rtti)
|
||||
endif()
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#ifdef LLVM_ON_WIN32
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define NOGDI
|
||||
# include <Windows.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
|
@ -89,7 +89,11 @@ namespace {
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
HKEY regVS;
|
||||
#if (_MSC_VER >= 1900)
|
||||
int VSVersion = (_MSC_VER / 100) - 5;
|
||||
#else
|
||||
int VSVersion = (_MSC_VER / 100) - 6;
|
||||
#endif
|
||||
std::stringstream subKey;
|
||||
subKey << "VisualStudio.DTE." << VSVersion << ".0";
|
||||
if (RegOpenKeyEx(HKEY_CLASSES_ROOT, subKey.str().c_str(), 0, KEY_READ, ®VS) == ERROR_SUCCESS) {
|
||||
|
@ -20,6 +20,12 @@
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
#ifndef _MSC_VER
|
||||
# include <unistd.h>
|
||||
#else
|
||||
# include <io.h>
|
||||
# define write _write
|
||||
#endif
|
||||
|
||||
// FIXME: should be moved into a Jupyter interp struct that then gets returned
|
||||
// from create.
|
||||
|
Loading…
x
Reference in New Issue
Block a user