Is it required for me to add a _REENTRANT macro during compile time to make my errno thread safe?
If no, is it the case for all versions of gcc / linux / solaris or is it required for certain old versions?
I recently tested a piece of code where _REENTRANT was not used and found the errno behaving in an undefined fahsion in multi thread environment? But, after adding _REENTRANT everything was working fine. The Environment was Solaris.
But, the discussion here doesn't seem to say it is mandatory to add _REENTRANT. I am a little confused.
Also, apart from _REENTRANT should I add be adding any other options or libs to ensure my application has a thread safe errno?