mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
patch to add binary mode on opening files (for Windows+Cygwin compatibility).
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
|
||||
#include "wraster.h"
|
||||
|
||||
/* Silly hack for Windows systems with cygwin */
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
typedef struct RCachedImage {
|
||||
RImage *image;
|
||||
@@ -321,7 +325,7 @@ identFile(char *path)
|
||||
|
||||
assert(path!=NULL);
|
||||
|
||||
fd = open(path, O_RDONLY);
|
||||
fd = open(path, O_RDONLY|O_BINARY);
|
||||
if (fd < 0) {
|
||||
RErrorCode = RERR_OPEN;
|
||||
return IM_ERROR;
|
||||
|
||||
Reference in New Issue
Block a user