aboutsummaryrefslogtreecommitdiffstats
path: root/mkstemp.c
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2004-06-29 20:51:26 +0000
committerUlf Lamping <ulf.lamping@web.de>2004-06-29 20:51:26 +0000
commita24b176c32f78abc72f75819bb463aa60bd6729a (patch)
tree9b79f904d1c0d7c0b3db3e0274db9fd72ff440c0 /mkstemp.c
parenta08161a110dcdfd6e19027b2e4db6c3fc3c26910 (diff)
define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups svn path=/trunk/; revision=11272
Diffstat (limited to 'mkstemp.c')
-rw-r--r--mkstemp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mkstemp.c b/mkstemp.c
index 07e1b0ef45..bc20510634 100644
--- a/mkstemp.c
+++ b/mkstemp.c
@@ -25,6 +25,10 @@
#include <errno.h>
#include <stdio.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
@@ -33,12 +37,13 @@
#include <unistd.h>
#endif
+#ifdef _WIN32
+#include <process.h> /* For spawning child process */
+#endif
+
#ifndef __set_errno
#define __set_errno(x) errno=(x)
#endif
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
/* Generate a unique temporary file name from TEMPLATE.
The last six characters of TEMPLATE must be "XXXXXX";