summaryrefslogtreecommitdiff
path: root/zen/file_io.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
commit0887aee8c54d0ed51bb2031431e2bcdafebb4c6e (patch)
tree69537ceb9787bb25ac363cc4e6cdaf0804d78363 /zen/file_io.h
parent5.12 (diff)
downloadFreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.gz
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.bz2
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.zip
5.13
Diffstat (limited to 'zen/file_io.h')
-rw-r--r--zen/file_io.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zen/file_io.h b/zen/file_io.h
index 31373857..8e501172 100644
--- a/zen/file_io.h
+++ b/zen/file_io.h
@@ -12,7 +12,7 @@
#ifdef FFS_WIN
#include "win.h" //includes "windows.h"
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
#include <cstdio>
#include <sys/stat.h>
#endif
@@ -24,13 +24,15 @@ namespace zen
static const char LINE_BREAK[] = "\r\n";
#elif defined FFS_LINUX
static const char LINE_BREAK[] = "\n";
+#elif defined FFS_MAC
+static const char LINE_BREAK[] = "\r";
#endif
//buffered file IO optimized for sequential read/write accesses + better error reporting + long path support (following symlinks)
#ifdef FFS_WIN
typedef HANDLE FileHandle;
-#elif defined FFS_LINUX
+#elif defined FFS_LINUX || defined FFS_MAC
typedef FILE* FileHandle;
#endif
@@ -62,8 +64,7 @@ private:
FileHandle fileHandle;
};
-
-#ifdef FFS_LINUX
+#if defined FFS_LINUX || defined FFS_MAC
class FileInputUnbuffered : public FileInputBase
{
public:
bgstack15