* mktemp.cc (_gettemp): Open temp files in binary mode.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user