1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-13 12:25:53 +01:00

patch to add binary mode on opening files (for Windows+Cygwin compatibility).

This commit is contained in:
dan
2002-09-15 20:37:41 +00:00
parent 3fc803c0d8
commit 92b012e800
20 changed files with 41 additions and 34 deletions

View File

@@ -1593,7 +1593,7 @@ WMReadPropListFromFile(char *file)
struct stat stbuf;
size_t length;
f = fopen(file, "r");
f = fopen(file, "rb");
if (!f) {
/* let the user print the error message if he really needs to */
/*wsyserror(_("could not open domain file '%s' for reading"), file);*/
@@ -1672,7 +1672,7 @@ WMWritePropListToFile(WMPropList *plist, char *path, Bool atomically)
mask = umask(0);
umask(mask);
fchmod(fd, 0644 & ~mask);
if ((theFile = fdopen(fd, "w")) == NULL) {
if ((theFile = fdopen(fd, "wb")) == NULL) {
close(fd);
}
#else