summaryrefslogtreecommitdiff
path: root/src/network/h_errno.c
AgeCommit message (Collapse)AuthorLines
2020-08-30restore h_errno ABI compatibility with ancient binariesRich Felker-0/+4
prior to commit e68c51ac46a9f273927aef8dcebc89912ab19ece, h_errno was actually an external data object not a macro. bring back the symbol, and use it as the storage for the main thread's h_errno. technically this still doesn't provide full compatibility if the application was multithreaded, but at the time there were no res_* functions (and they did not set h_errno anyway), so any use of h_errno would have been via thread-unsafe functions. thus a solution that just fixes single-threaded applications seems acceptable.
2020-08-24make h_errno thread-localRich Felker-4/+2
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.
2012-05-16fix misplaced semicolon in preprocessor directive (#undef h_errno)Rich Felker-1/+1
2012-05-12use __h_errno_location for h_errnoRich Felker-0/+8
we do not bother making h_errno thread-local since the only interfaces that use it are inherently non-thread-safe. but still use the potentially-thread-local ABI to access it just to avoid lock-in.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+1