* mktemp.cc (_gettemp): Open temp files in binary mode.

This commit is contained in:
Christopher Faylor 2006-04-17 15:09:13 +00:00
parent 1d975d67b1
commit d1efa4e819
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2006-04-17 Eric Blake <ebb9@byu.net>
* mktemp.cc (_gettemp): Open temp files in binary mode.
2006-04-14 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Use UINT32_MAX

View File

@ -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;