From 673a447f292c07ad5399211f823ec45771bea07b Mon Sep 17 00:00:00 2001 From: Markus Mittendrein Date: Sat, 16 Mar 2019 15:15:56 +0100 Subject: Fix c4ls_buffer and reading from stdin file "-" on windows --- src/platform/platform.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/platform') diff --git a/src/platform/platform.h b/src/platform/platform.h index aaa6138..8e52d51 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -4,6 +4,7 @@ #include #ifdef CC4GROUP_PLATFORM_WINDOWS + #include #define PROT_READ 0x1 #define PROT_WRITE 0x2 /* This flag is only available in WinXP+ */ @@ -21,11 +22,13 @@ #define MAP_FAILED ((void *) -1) #define cc4group_mkdir(path, mode) mkdir((path)) + #define SET_BINARY(fd) setmode(fd, O_BINARY) #else #include #define cc4group_mkdir(path, mode) mkdir((path), (mode)) #define O_BINARY 0 + #define SET_BINARY(fd) #endif void *cc4group_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset, void** extra); -- cgit v1.2.3-54-g00ecf