From a04b77b5a0e031713c45097bd64f4f25b99b4146 Mon Sep 17 00:00:00 2001 From: Abhinav Krishnamoorthy Date: Sat, 15 Feb 2014 10:59:09 -0500 Subject: [PATCH] Made changes to the install.sh to recognize .dll.a files on CYGWIN allowing it to discover PYTHON_INCLUDE_DIR and PYTHON_LIBRARY Also changed wrap_python.hpp to only check for defined(__CYGWIN__) on 32-bit systems. Previously this check was OR'd with the check for defined(__WIN32__) causing the system to erroneously update the SIZEOF_LONG value and subsequently resulting in "make ycm_core" failing with "LONG_BIT definition appears wrong for platform" on CYGWIN-64 systems. --- cpp/BoostParts/boost/python/detail/wrap_python.hpp | 4 +++- install.sh | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpp/BoostParts/boost/python/detail/wrap_python.hpp b/cpp/BoostParts/boost/python/detail/wrap_python.hpp index eaef7841..716511f8 100644 --- a/cpp/BoostParts/boost/python/detail/wrap_python.hpp +++ b/cpp/BoostParts/boost/python/detail/wrap_python.hpp @@ -82,7 +82,9 @@ // Some things we need in order to get Python.h to work with compilers other // than MSVC on Win32 // -#if defined(_WIN32) || defined(__CYGWIN__) +// only performing the check for defined(__CYGWIN__) on 32-bit systems +// ensuring that SIZEOF_LONG is only altered on 32-bit CYGWIN systems +#if defined(_WIN32) # if defined(__GNUC__) && defined(__CYGWIN__) # define SIZEOF_LONG 4 diff --git a/install.sh b/install.sh index c771e4a5..c3970ccf 100755 --- a/install.sh +++ b/install.sh @@ -41,6 +41,9 @@ function python_finder { lib_python="${python_prefix}/lib/lib${which_python}" if [ -f "${lib_python}.a" ]; then python_library+="${lib_python}.a" + elif [ -f "${lib_python}.dll.a" ]; then + ## added a check for .dll.a files for CYGWIN + python_library+="${lib_python}.dll.a" else python_library+="${lib_python}.dylib" fi