Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-04-17 19:09:13 +0400
committerChristopher Faylor <me@cgf.cx>2006-04-17 19:09:13 +0400
commitd1efa4e819ad8e44964a99a1625498d3faf3b2c3 (patch)
treeac16914694cdd9bfdcf4f7341c4647c13a403fe9 /winsup/cygwin/mktemp.cc
parent1d975d67b1247031a73dfb40e4095c44dbe22d9c (diff)
* mktemp.cc (_gettemp): Open temp files in binary mode.
Diffstat (limited to 'winsup/cygwin/mktemp.cc')
-rw-r--r--winsup/cygwin/mktemp.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/mktemp.cc b/winsup/cygwin/mktemp.cc
index f7b7236f1..5567e4a67 100644
--- a/winsup/cygwin/mktemp.cc
+++ b/winsup/cygwin/mktemp.cc
@@ -105,7 +105,8 @@ _gettemp(char *path, int *doopen, int domkdir)
{
if (doopen)
{
- if ((*doopen = open (path, O_CREAT | O_EXCL | O_RDWR, 0600)) >= 0)
+ if ((*doopen = open (path, O_CREAT | O_EXCL | O_RDWR | O_BINARY,
+ S_IRUSR | S_IWUSR)) >= 0)
return 1;
if (errno != EEXIST)
return 0;