You cannot check the typedef as you can for the macro, so this is a bit complicated. If you use autoconf, this patch shows the minimal changes that autoconf needs to check for availability errno_tand determine if it is missing (typedef will be placed in a file containing your generated one config.hand included with all files that need it errno_t). If you are not using autoconf, you need to come up with some way to do the same in your build system or a very smart set of tests against macros of the compiler version.
source
share