12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include <netdb.h>
- #include <tls.h>
- #include <linuxthreads/internals.h>
- #include <sysdep-cancel.h>
- #if ! USE___THREAD
- # undef h_errno
- extern int h_errno;
- #endif
- int *
- weak_const_function
- __h_errno_location (void)
- {
- #if ! USE___THREAD
- if (! SINGLE_THREAD_P)
- {
- pthread_descr self = thread_self();
- return LIBC_THREAD_GETMEM (self, p_h_errnop);
- }
- #endif
- return &h_errno;
- }
- libc_hidden_def (__h_errno_location)
|