Skip to content

Commit c810fe2

Browse files
committed
For PR9480:
--- Merging r127283 into '.': U tools/libclang/CIndexer.cpp --- Merging r127308 into '.': U tools/c-index-test/c-index-test.c llvm-svn: 127633
1 parent 3b4d14f commit c810fe2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

clang/tools/c-index-test/c-index-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ void print_completion_result(CXCompletionResult *completion_result,
990990

991991
int my_stricmp(const char *s1, const char *s2) {
992992
while (*s1 && *s2) {
993-
int c1 = tolower(*s1), c2 = tolower(*s2);
993+
int c1 = tolower((unsigned char)*s1), c2 = tolower((unsigned char)*s2);
994994
if (c1 < c2)
995995
return -1;
996996
else if (c1 > c2)

clang/tools/libclang/CIndexer.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <sstream>
3333

3434
#ifdef __CYGWIN__
35+
#include <cygwin/version.h>
3536
#include <sys/cygwin.h>
3637
#define LLVM_ON_WIN32 1
3738
#endif
@@ -60,7 +61,11 @@ std::string CIndexer::getClangResourcesPath() {
6061
#ifdef __CYGWIN__
6162
char w32path[MAX_PATH];
6263
strcpy(w32path, path);
64+
#if CYGWIN_VERSION_API_MAJOR > 0 || CYGWIN_VERSION_API_MINOR >= 181
65+
cygwin_conv_path(CCP_WIN_A_TO_POSIX, w32path, path, MAX_PATH);
66+
#else
6367
cygwin_conv_to_full_posix_path(w32path, path);
68+
#endif
6469
#endif
6570

6671
llvm::sys::Path LibClangPath(path);

0 commit comments

Comments
 (0)