diff options
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | runtime/autoload/remote/host.vim | 11 | ||||
-rw-r--r-- | runtime/doc/msgpack_rpc.txt | 5 | ||||
-rw-r--r-- | third-party/cmake/DownloadAndExtractFile.cmake | 8 |
4 files changed, 29 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 0241b0502c..d2b5217658 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,8 +73,19 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion") # gcc 4.0 and better turn on _FORTIFY_SOURCE=2 automatically. This currently # does not work with Neovim due to some uses of dynamically-sized structures. # See https://github.com/neovim/neovim/issues/223 for details. -if(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS "4" - AND CMAKE_BUILD_TYPE MATCHES "^Rel") +include(CheckCSourceCompiles) +check_c_source_compiles(" +#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 1 +#error \"_FORTIFY_SOURCE > 1\" +#endif +int +main(void) +{ + return 0; +} +" _FORTIFY_SOURCE_ACCEPTABLE) + +if(NOT _FORTIFY_SOURCE_ACCEPTABLE) # -U in add_definitions doesn't end up in the correct spot, so we add it to # the flags variable instead. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1") diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index e81aa81665..b07593f39b 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -219,7 +219,9 @@ function! s:RequirePythonHost(name) " In some distros, python3 is the default python let python_host_prog = 'python2' else - throw 'No python interpreter found' + throw 'No python interpreter found.' . + \ " Try setting 'let g:python_host_prog=/path/to/python' in your '.nvimrc'" . + \ " or see ':help nvim-python'." endif " Make sure we pick correct python version on path. @@ -231,7 +233,8 @@ function! s:RequirePythonHost(name) let import_result = system(python_host_prog . \ ' -c "import neovim, sys; sys.stdout.write(\"ok\")"') if import_result != 'ok' - throw 'No neovim module found for ' . python_version + throw 'No neovim module found for ' . python_version . '.' . + \ " Try installing it with 'pip install neovim' or see ':help nvim-python'." endif try @@ -241,7 +244,9 @@ function! s:RequirePythonHost(name) endif catch endtry - throw 'Failed to load python host' + throw 'Failed to load python host.' . + \ " Try upgrading the Neovim python module with 'pip install --upgrade neovim'" . + \ " or see ':help nvim-python'." endfunction call remote#host#Register('python', function('s:RequirePythonHost')) diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index 8e53241775..0fb419e5d5 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -113,9 +113,8 @@ string 'hello world!' on the current nvim instance: A better way is to use the python REPL with the `neovim` package, where API functions can be called interactively: > - >>> from neovim import socket_session, Nvim - >>> session = socket_session('[address]') - >>> nvim = Nvim.from_session(session) + >>> from neovim import attach + >>> nvim = attach('socket', path='[address]') >>> nvim.command('echo "hello world!"') < ============================================================================== diff --git a/third-party/cmake/DownloadAndExtractFile.cmake b/third-party/cmake/DownloadAndExtractFile.cmake index eb5c1c6602..b0d28355cb 100644 --- a/third-party/cmake/DownloadAndExtractFile.cmake +++ b/third-party/cmake/DownloadAndExtractFile.cmake @@ -59,9 +59,13 @@ message(STATUS "downloading... timeout='${timeout_msg}'") if((DEFINED EXPECTED_SHA1) AND (${CMAKE_VERSION} VERSION_GREATER 2.8.10)) - set(hash_args EXPECTED_HASH SHA1=${EXPECTED_SHA1}) + if(NOT (EXPECTED_SHA1 STREQUAL "0000000000000000000000000000000000000000")) + set(hash_args EXPECTED_HASH SHA1=${EXPECTED_SHA1}) + endif() else() - set(hash_args EXPECTED_MD5 ${EXPECTED_MD5}) + if(NOT (EXPECTED_MD5 STREQUAL "00000000000000000000000000000000")) + set(hash_args EXPECTED_MD5 ${EXPECTED_MD5}) + endif() endif() file(DOWNLOAD ${URL} ${file} |