X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDirList.cxx;h=5f8f3ccc2536bb4eb548efe2ed4dced09dec67a3;hb=899b1fe44da54cbc2bde2be2a4dec5ec7606cf97;hp=f49c0ba92c0168caa0fa2b42137ca15558fefaf3;hpb=1a11accd11061d63d3c09db7b1445637207e81e4;p=gdcm.git diff --git a/src/gdcmDirList.cxx b/src/gdcmDirList.cxx index f49c0ba9..5f8f3ccc 100644 --- a/src/gdcmDirList.cxx +++ b/src/gdcmDirList.cxx @@ -6,16 +6,11 @@ #include #include -#ifdef GDCM_NO_ANSI_STRING_STREAM - #include - #define ostringstream ostrstream -#else - #include -#endif - -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined (__CYGWIN__) #include +#ifdef _MSC_VER #include +#endif //_MSC_VER #else #include #include @@ -31,7 +26,6 @@ gdcmDirList::gdcmDirList(std::string dirName,bool recursive) { name=dirName; - NormalizePath(name); Explore(name,recursive); } @@ -76,8 +70,7 @@ void gdcmDirList::Explore(std::string dirName,bool recursive) std::string fileName; NormalizePath(dirName); - -#ifdef _MSC_VER +#if defined(_MSC_VER) || (__CYGWIN__) WIN32_FIND_DATA fileData; HANDLE hFile=FindFirstFile((dirName+"*").c_str(),&fileData); int found=true; @@ -104,7 +97,7 @@ void gdcmDirList::Explore(std::string dirName,bool recursive) for (int i= 0;i < n; i++) { - fileName=namelist[i]->d_name; + fileName=namelist[i]->d_name; if(namelist[i]->d_type==DT_DIR) { if( (fileName!=".") && (fileName!="..") && (recursive) )