In the world of Standard C, the type 'errno_t
' is defined by TR24731-1 (see http://stackoverflow.com/questions/372980/ for more information) and you have to 'activate it' by defining '__STDC_WANT_LIB_EXT1__
'.
However, you appear to be working on Windows (judging from 'tail.exe', and also the non-standard '_get_errno()
'). The rules there may depend on the C compiler you are using.
You should be able to chase down the information from this MSDN article on 'Security Enhancements in the CRT'. My impression was that it should be defined unless you actively suppress the feature, so check out whether you are actively suppressing it in your compilations.
Be aware that the MSVC definition of functions such as vsnprintf_s()
do not match the TR24731-1 definitions:
MSDN:
int vsnprintf_s(
char *buffer,
size_t sizeOfBuffer,
size_t count,
const char *format,
va_list argptr
);
TR 24731-1:
int vsnprintf_s(
char * restrict s,
rsize_t n,
const char * restrict format,
va_list arg
);
The difference is not just a question of type aliases or qualifiers (rsize_t
, restrict
) - there are two sizes in the MS version and one in the Standard version. So much for standardization!