12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #include <errno.h>
- #include <netdb.h>
- #include <resolv.h>
- #include "pthread.h"
- #include "internals.h"
- #if !USE_TLS || !HAVE___THREAD
- int *
- __errno_location (void)
- {
- pthread_descr self = thread_self();
- return THREAD_GETMEM (self, p_errnop);
- }
- int *
- __h_errno_location (void)
- {
- pthread_descr self = thread_self();
- return THREAD_GETMEM (self, p_h_errnop);
- }
- struct __res_state *
- __res_state (void)
- {
- pthread_descr self = thread_self();
- return THREAD_GETMEM (self, p_resp);
- }
- #endif
|