From a4f49798c4885e3566a69bbf64048920c510f385 Mon Sep 17 00:00:00 2001 From: Bill Lorensen Date: Fri, 11 Apr 2003 07:27:32 -0400 Subject: [PATCH] ERR: Borland fix for stricmp. ERR: removed itk dependencies. --- Source/kwsys/SystemTools.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index aec5b27f3..5f6b93f9e 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -1032,8 +1032,12 @@ unsigned long SystemTools::FileLength(const char* filename) int SystemTools::Strucmp(const char *s1, const char *s2) { -#ifdef _WIN32 +#if defined(_WIN32) +#ifdef __BORLANDC__ + return stricmp(s1,s2); +#else return _stricmp(s1,s2); +#endif #else return strcasecmp(s1,s2); #endif @@ -1069,9 +1073,9 @@ char *SystemTools ::RealPath(const char *path, char *resolved_path) { #if defined(_WIN32) - char pathpart[itk::IOCommon::ITK_MAXPATHLEN]; + char pathpart[4096]; strcpy(pathpart,path); - char fnamepart[itk::IOCommon::ITK_MAXPATHLEN]; + char fnamepart[4096]; char *slash; if((slash = strrchr(pathpart,'/')) == NULL) @@ -1089,7 +1093,7 @@ char *SystemTools *slash = '\0'; strcpy(fnamepart,slash+1); - char savedir[itk::IOCommon::ITK_MAXPATHLEN]; + char savedir[4096]; Getcwd(savedir,sizeof(savedir)); Chdir(pathpart); Getcwd(pathpart,sizeof(pathpart));