From 54952034570a18ffc60f146a8d818de7aef878ba Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Thu, 14 Oct 1999 19:10:43 +0000 Subject: [PATCH] [ICU-26] cintltest does not work if the icu folder is not in a drive root X-Commit-URL: https://ssl.icu-project.org/trac/changeset/55 --- icu4c/source/test/cintltst/cintltst.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c index e5ff4b89dab..44c30edf55d 100644 --- a/icu4c/source/test/cintltst/cintltst.c +++ b/icu4c/source/test/cintltst/cintltst.c @@ -54,8 +54,16 @@ ctest_pathnameInContext( char* fullname, int32_t maxsize, const char* relPath ) int32_t lenMainDir; int32_t lenRelPath ; -#ifdef _WIN32 - mainDir = ""; /* The "intlwork" directory is part of the relative path*/ +#if defined(_WIN32) || defined(WIN32) || defined(__OS2__) || defined(OS2) + char mainDirBuffer[200]; + mainDir = getenv("ICU_DATA"); + if(mainDir!=NULL) { + strcpy(mainDirBuffer, mainDir); + strcat(mainDirBuffer, "..\\.."); + } else { + mainDirBuffer[0]='\0'; + } + mainDir=mainDirBuffer; sepChar = '\\'; #elif defined(_AIX) || defined(SOLARIS) || defined(LINUX) || defined(HPUX) mainDir = getenv("HOME");