Subject: How to get last errno on Windows and Linux?
I am not sure if this is the right place that I can post my question.
But I am sure some of you know the answer.
I am trying to ****t my program to Linux, but finally find that
_get_errno can't be map to another Linux API.
I want to write the following inline function for Linux platform:
inline static error_t get_errno(int* pValue) {return *pValue =
errno; }
But I am not sure if it's safe enough in multi-thread environment. Is
errno that is declared in errno.h is thread-safe or a Thread Local
Storage? If not, then, how is _get_errno implemented in Windows
errno.h?