V
Vijay Kumar R Zanvar
In said:Your analysis is correct. You cannot even declare errno, because it can
be (and quite often is) defined as a macro in <errno.h>. The common
reason for this is allowing multithreaded applications to have a per
thread errno, rather than sharing a global errno. This is one of the
few places where the C standard cares about multithreading.
[Today I happened to see that this mail was hiding in the "Drafts" folder
for more than a month!]
I am at loss as how defining `errno' as a macro can be helpful in
multithreading applications. Please enlighten me.