
11 Oct
2005
11 Oct
'05
10:36 a.m.
Le decadi 20 vendémiaire, an CCXIV, William Swanson a écrit :
This is to placate the linker. Actually, I am familiar with what errono is and what it does. The thing I baffles me is why the linker can't find it in the standard library to begin with.
In threaded programs, errno can not be just be a static global variable, since its value must be local to each thread. The standard solution is for errno to be a macro for '*(pointer_to_this_thread_s_errno())'.
I do not know what it is on windows, but on GNU, there has been for some time a hack to ensure that on single-threaded programs, pointer_to_this_thread_s_errno was indeed the address of a global integer symbol. This hack has been dropped some time ago.