]> Creatis software - clitk.git/blobdiff - common/clitkPortability.h
Add preserve studyUID in clitkImage2Dicom
[clitk.git] / common / clitkPortability.h
old mode 100755 (executable)
new mode 100644 (file)
index 1ab74f9..3671066
 ===========================================================================**/
 #ifndef CLITKPORTABILITY_H
 #define CLITKPORTABILITY_H
-#if defined(WIN32)
+#if defined(_WIN32)
 #  define _USE_MATH_DEFINES //Before math.h include (i.e. cmath)
 #endif
 #include <cmath>
 
-#if defined(WIN32)
+#if defined(_WIN32)
 #  define rint(x)  floor(x+0.5)
 #  define lrint(x) (long)rint(x) 
 #endif
@@ -36,4 +36,9 @@ int IsNormal(const T val) {
 #endif
 }
 
+#if defined(_MSC_VER)
+#  include <io.h>
+#  define mkstemp(x) _mktemp_s(x, sizeof(x))
+#endif
+
 #endif /* end #define CLITKPORTABILITY_H */