From b0181a155b25dfc92c07d89b211bc26efc019ee8 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sat, 12 Dec 2015 17:39:46 -0800 Subject: [PATCH] apple fix, gitignore --- .gitignore | 3 +++ src/turbo_linecount.h | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0ccae9..6b869f7 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ build # Visual Studio build directory build_vs2013 + +# Test Files +test*.txt diff --git a/src/turbo_linecount.h b/src/turbo_linecount.h index 6f6fa56..0919344 100644 --- a/src/turbo_linecount.h +++ b/src/turbo_linecount.h @@ -33,7 +33,7 @@ ////////////// Platform specific -#if defined(_APPLE__) || defined(__linux__) || defined(__CYGWIN__) +#if defined(__APPLE__) || defined(__linux__) || defined(__CYGWIN__) #define TLC_COMPATIBLE_UNIX 1 #endif @@ -49,7 +49,14 @@ typedef errno_t tlc_error_t; #include #define _T(x) x #define TCHAR char + +#ifdef _ERRNO_T +typedef errno_t tlc_error_t; +#elif defined(__error_t_defined) typedef error_t tlc_error_t; +#else +typedef int tlc_error_t; +#endif #else #error Unsupported operating system.