Added the O_BINARY flag to the mode of files
created with open, so that lines aren't appended
with extraneous characters, thus corrupting .sav
files.
environ \
exit \
fatal-signal \
environ \
exit \
fatal-signal \
fpieee \
fprintf-posix \
full-read \
fpieee \
fprintf-posix \
full-read \
}
/* Create file by that name. */
}
/* Create file by that name. */
- fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL, permissions);
+ fd = open (rf->tmp_name, O_WRONLY | O_CREAT | O_EXCL | O_BINARY, permissions);
if (fd >= 0)
break;
if (errno != EEXIST)
if (fd >= 0)
break;
if (errno != EEXIST)