]> granicus.if.org Git - clang/commitdiff
libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 8 Mar 2011 22:17:33 +0000 (22:17 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Tue, 8 Mar 2011 22:17:33 +0000 (22:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127283 91177308-0d34-0410-b5e6-96231b3b80d8

tools/libclang/CIndexer.cpp

index 992d76a2efe9d0d7d97fbb0f79940191684c4b83..56974b9e999bb87f7b07395747f418cc3f33e0fe 100644 (file)
@@ -32,6 +32,7 @@
 #include <sstream>
 
 #ifdef __CYGWIN__
+#include <cygwin/version.h>
 #include <sys/cygwin.h>
 #define LLVM_ON_WIN32 1
 #endif
@@ -60,7 +61,11 @@ std::string CIndexer::getClangResourcesPath() {
 #ifdef __CYGWIN__
   char w32path[MAX_PATH];
   strcpy(w32path, path);
+#if CYGWIN_VERSION_API_MAJOR > 0 || CYGWIN_VERSION_API_MINOR >= 181
+  cygwin_conv_path(CCP_WIN_A_TO_POSIX, w32path, path, MAX_PATH);
+#else
   cygwin_conv_to_full_posix_path(w32path, path);
+#endif
 #endif
 
   llvm::sys::Path LibClangPath(path);