diff options
-rwxr-xr-x | .ci/before_script.sh | 4 | ||||
-rw-r--r-- | .ci/common/build.sh | 10 | ||||
-rwxr-xr-x | .ci/install.sh | 4 | ||||
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/FindMsgpack.cmake | 24 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 6 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
7 files changed, 32 insertions, 20 deletions
diff --git a/.ci/before_script.sh b/.ci/before_script.sh index 026ab0afc9..6babc582ea 100755 --- a/.ci/before_script.sh +++ b/.ci/before_script.sh @@ -19,6 +19,10 @@ if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; the echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable." exit 1 fi +if [ "${BUILD_32BIT}" = ON ] && [ "${BUILD_MINGW}" = ON ]; then + >&2 echo "32-bit MinGW builds not supported." + exit 1 +fi if [[ "${TRAVIS_OS_NAME}" == osx ]]; then # Adds user to a dummy group. diff --git a/.ci/common/build.sh b/.ci/common/build.sh index 3d517b9b09..f635ee4960 100644 --- a/.ci/common/build.sh +++ b/.ci/common/build.sh @@ -1,10 +1,5 @@ build_deps() { if [[ "${BUILD_32BIT}" == ON ]]; then - if [[ "${BUILD_MINGW}" == ON ]]; then - >&2 echo "32-bit MinGW builds not supported." - exit 1 - fi - DEPS_CMAKE_FLAGS="${DEPS_CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi if [[ "${BUILD_MINGW}" == ON ]]; then @@ -42,11 +37,6 @@ build_nvim() { CMAKE_FLAGS="${CMAKE_FLAGS} -DCLANG_${CLANG_SANITIZER}=ON" fi if [[ "${BUILD_32BIT}" == ON ]]; then - if [[ "${BUILD_MINGW}" == ON ]]; then - >&2 echo "32-bit MinGW builds not supported." - exit 1 - fi - CMAKE_FLAGS="${CMAKE_FLAGS} ${CMAKE_FLAGS_32BIT}" fi if [[ "${BUILD_MINGW}" == ON ]]; then diff --git a/.ci/install.sh b/.ci/install.sh index ad3ef1b8b7..fb5d1c09c1 100755 --- a/.ci/install.sh +++ b/.ci/install.sh @@ -14,7 +14,9 @@ elif [[ "${BUILD_MINGW}" == ON ]]; then # binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64-dev mingw-w64-tools echo "Downloading MinGW..." - curl -sSL "http://downloads.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/rubenvb/gcc-4.8-release/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" | tar xJf - -C "${HOME}/.local" + curl -sSL "https://github.com/neovim/deps/raw/master/opt/i686-w64-mingw32-gcc-4.8.0-linux64_rubenvb.tar.xz" \ + | tar xJf - -C "${HOME}/.local" + fi # Set CC to default to avoid compilation problems diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c3f4d927d..e6c1b0a74b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -279,7 +279,7 @@ include(CheckLibraryExists) find_package(LibUV REQUIRED) include_directories(SYSTEM ${LIBUV_INCLUDE_DIRS}) -find_package(Msgpack REQUIRED) +find_package(Msgpack 1.0.0 REQUIRED) include_directories(SYSTEM ${MSGPACK_INCLUDE_DIRS}) find_package(LuaJit REQUIRED) diff --git a/cmake/FindMsgpack.cmake b/cmake/FindMsgpack.cmake index 60afc88839..015737d658 100644 --- a/cmake/FindMsgpack.cmake +++ b/cmake/FindMsgpack.cmake @@ -7,7 +7,9 @@ if(NOT MSGPACK_USE_BUNDLED) find_package(PkgConfig) if (PKG_CONFIG_FOUND) - pkg_search_module(PC_MSGPACK QUIET msgpackc>=1.0 msgpack>=1.0) + pkg_search_module(PC_MSGPACK QUIET + msgpackc>=${Msgpack_FIND_VERSION} + msgpack>=${Msgpack_FIND_VERSION}) endif() else() set(PC_MSGPACK_INCLUDEDIR) @@ -19,10 +21,20 @@ endif() set(MSGPACK_DEFINITIONS ${PC_MSGPACK_CFLAGS_OTHER}) -find_path(MSGPACK_INCLUDE_DIR msgpack.h +find_path(MSGPACK_INCLUDE_DIR msgpack/version_master.h HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS} ${LIMIT_SEARCH}) +if(MSGPACK_INCLUDE_DIR) + file(READ ${MSGPACK_INCLUDE_DIR}/msgpack/version_master.h msgpack_version_h) + string(REGEX REPLACE ".*MSGPACK_VERSION_MAJOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MAJOR "${msgpack_version_h}") + string(REGEX REPLACE ".*MSGPACK_VERSION_MINOR +([0-9]+).*" "\\1" MSGPACK_VERSION_MINOR "${msgpack_version_h}") + string(REGEX REPLACE ".*MSGPACK_VERSION_REVISION +([0-9]+).*" "\\1" MSGPACK_VERSION_REVISION "${msgpack_version_h}") + set(MSGPACK_VERSION_STRING "${MSGPACK_VERSION_MAJOR}.${MSGPACK_VERSION_MINOR}.${MSGPACK_VERSION_REVISION}") +else() + set(MSGPACK_VERSION_STRING) +endif() + # If we're asked to use static linkage, add libmsgpack{,c}.a as a preferred library name. if(MSGPACK_USE_STATIC) list(APPEND MSGPACK_NAMES @@ -33,6 +45,9 @@ endif() list(APPEND MSGPACK_NAMES msgpackc msgpack) find_library(MSGPACK_LIBRARY NAMES ${MSGPACK_NAMES} + # Check each directory for all names to avoid using headers/libraries from + # different places. + NAMES_PER_DIR HINTS ${PC_MSGPACK_LIBDIR} ${PC_MSGPACK_LIBRARY_DIRS} ${LIMIT_SEARCH}) @@ -44,6 +59,7 @@ set(MSGPACK_INCLUDE_DIRS ${MSGPACK_INCLUDE_DIR}) include(FindPackageHandleStandardArgs) # handle the QUIETLY and REQUIRED arguments and set MSGPACK_FOUND to TRUE # if all listed variables are TRUE -find_package_handle_standard_args(Msgpack DEFAULT_MSG - MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR) +find_package_handle_standard_args(Msgpack + REQUIRED_VARS MSGPACK_LIBRARY MSGPACK_INCLUDE_DIR + VERSION_VAR MSGPACK_VERSION_STRING) diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index cb8f91328d..28ff6fded4 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8368,8 +8368,7 @@ makeopens ( { int only_save_windows = TRUE; int nr; - int cnr = 1; - int restore_size = TRUE; + int restore_size = true; win_T *wp; char_u *sname; win_T *edited_win = NULL; @@ -8486,7 +8485,8 @@ makeopens ( tab_firstwin = firstwin; /* first window in tab page "tabnr" */ tab_topframe = topframe; for (tabnr = 1;; ++tabnr) { - int need_tabnew = FALSE; + int need_tabnew = false; + int cnr = 1; if ((ssop_flags & SSOP_TABPAGES)) { tabpage_T *tp = find_tabpage(tabnr); diff --git a/src/nvim/version.c b/src/nvim/version.c index 2ff66c5756..d8cd0182a8 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -595,7 +595,7 @@ static int included_patches[] = { 696, 695, 694, - // 693, + 693, // 692 NA // 691 NA 690, |