diff options
Diffstat (limited to 'zen/file_io.h')
-rw-r--r-- | zen/file_io.h | 9 |
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: |