]> Creatis software - gdcm.git/blobdiff - src/gdcmDicomDir.cxx
* FIX : src/gdcmDicomDir.cxx : make windows compilable
[gdcm.git] / src / gdcmDicomDir.cxx
index e6a3d042d78bba5dcd72c1535b3e151386959c37..b109d1efc8fa3882097be3e7e190ed9b701861cc 100644 (file)
 
 #include <sys/types.h>
 #include <errno.h>
-#include <unistd.h>
+
+#ifdef _MSC_VER 
+   #include <direct.h>
+#else
+   #include <unistd.h>
+#endif
 
 //-----------------------------------------------------------------------------
 //  For full DICOMDIR description, see:
@@ -65,7 +70,11 @@ gdcmDicomDir::gdcmDicomDir(const char *Name, bool parseDir,
       if(strlen(Name)==1 && Name[0]=='.') { // user passed '.' as Name
                                             // we get current directory name
          char*dummy=(char*) malloc(1000);   // TODO : check with Windoze // JPR
+#ifdef _MSC_VER
+         _getcwd(dummy,(size_t)1000);
+#else
          getcwd(dummy,(size_t)1000);
+#endif
          SetFileName(dummy); // will be converted into a string
          free(dummy);        // no longer needed   
       }
@@ -412,8 +421,6 @@ void gdcmDicomDir::CreateDicomDirChainedList(std::string path)
 
 void gdcmDicomDir::CheckBoundaries()
 {   
-
-cout <<"entree ds CheckBoundaries " <<endl;
    ListDicomDirPatient::iterator  itPatient;
    ListDicomDirStudy::iterator    itStudy;
    ListDicomDirSerie::iterator    itSerie;