change nmake makefiles in /trunk and /trunk/epan so that
[obnox/wireshark/wip.git] / mkstemp.c
index 90051bdaf42338a1020305fd4069c2dd925e58b2..bc2051063483e4af1605aab1840b6f12ac9df45c 100644 (file)
--- a/mkstemp.c
+++ b/mkstemp.c
 #include <errno.h>
 #include <stdio.h>
 
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 #include <unistd.h>
 #endif
 
-#ifndef __set_errno
-#define __set_errno(x) errno=(x) 
+#ifdef _WIN32
+#include <process.h>    /* For spawning child process */
 #endif
-#ifndef O_BINARY
-#define O_BINARY 0
+
+#ifndef __set_errno
+#define __set_errno(x) errno=(x)
 #endif
 
 /* Generate a unique temporary file name from TEMPLATE.