libclang/CIndexer.cpp: Apply a new API for Cygwin-1.7, instead of deprecated one.

llvm-svn: 127283
This commit is contained in:
NAKAMURA Takumi 2011-03-08 22:17:33 +00:00
parent fbb482b314
commit d24228afeb
1 changed files with 5 additions and 0 deletions

View 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);