]> Creatis software - clitk.git/commitdiff
Define mkstemp for MSVC. Not sure if it also works for other compilers
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 5 Dec 2011 07:57:38 +0000 (08:57 +0100)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Mon, 5 Dec 2011 07:57:38 +0000 (08:57 +0100)
on Windows

common/clitkPortability.h

index 1ab74f90fa056233b39cbd76f6c362d0cd0af417..7fae01ec9916e31e303465a95685e7fa46d9b0db 100644 (file)
@@ -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 */