From 012aa4ef97a89c079407bb33c34780430e8b99a4 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Sat, 12 Dec 2015 19:38:32 -0800 Subject: [PATCH] xfer --- src/turbo_linecount.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/turbo_linecount.h b/src/turbo_linecount.h index 7ccf3c8..dd83ff2 100644 --- a/src/turbo_linecount.h +++ b/src/turbo_linecount.h @@ -35,6 +35,14 @@ #include #define _T(x) x +#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. #endif @@ -64,14 +72,6 @@ BEGIN_TURBOLINECOUNT_NAMESPACE; #elif defined(TLC_COMPATIBLE_UNIX) // Unix typedef char TCHAR; - #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 - typedef std::string tlc_string_t; typedef int tlc_filehandle_t; @@ -172,8 +172,8 @@ extern "C" #endif #ifdef _WIN32 - long long int turbo_linecount_handle(HANDLE fhandle, tlc_error_t * error = NULL, TCHAR ** errorstring = NULL); - long long int turbo_linecount_file(const TCHAR *filename, tlc_error_t * error = NULL, TCHAR ** errorstring = NULL); + long long int turbo_linecount_handle(HANDLE fhandle, errno_t * error = NULL, TCHAR ** errorstring = NULL); + long long int turbo_linecount_file(const TCHAR *filename, errno_t * error = NULL, TCHAR ** errorstring = NULL); #elif defined(TLC_COMPATIBLE_UNIX) long long int turbo_linecount_handle(int fhandle, tlc_error_t * tlc_error = NULL, char ** errorstring = NULL); long long int turbo_linecount_file(const char *filename, tlc_error_t * error = NULL, char ** errorstring = NULL);