make h_errno thread-local
authorRich Felker <dalias@aerifal.cx>
Tue, 25 Aug 2020 01:38:49 +0000 (21:38 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 25 Aug 2020 01:38:49 +0000 (21:38 -0400)
commit9d0b8b92a508c328e7eac774847f001f80dfb5ff
tree14ed37bd3ca0bc6298d76591fc0bf918b4cbe4f2
parent4d5786544bb52c62fc1ae84d91684ef2268afa05
make h_errno thread-local

the framework to do this always existed but it was deemed unnecessary
because the only [ex-]standard functions using h_errno were not
thread-safe anyway. however, some of the nonstandard res_* functions
are also supposed to set h_errno to indicate the cause of error, and
were unable to do so because it was not thread-safe. this change is a
prerequisite for fixing them.
src/internal/pthread_impl.h
src/network/h_errno.c