|
@@ -21,28 +21,15 @@
|
|
#include "pthread.h"
|
|
#include "pthread.h"
|
|
#include "internals.h"
|
|
#include "internals.h"
|
|
#include <stdio.h>
|
|
#include <stdio.h>
|
|
-extern int _errno;
|
|
|
|
-extern int _h_errno;
|
|
|
|
|
|
|
|
int * __errno_location()
|
|
int * __errno_location()
|
|
{
|
|
{
|
|
-
|
|
|
|
- if (__pthread_initial_thread_bos != NULL)
|
|
|
|
- {
|
|
|
|
pthread_descr self = thread_self();
|
|
pthread_descr self = thread_self();
|
|
return THREAD_GETMEM (self, p_errnop);
|
|
return THREAD_GETMEM (self, p_errnop);
|
|
- }
|
|
|
|
- return &_errno;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
int * __h_errno_location()
|
|
int * __h_errno_location()
|
|
{
|
|
{
|
|
-
|
|
|
|
- if (__pthread_initial_thread_bos != NULL)
|
|
|
|
- {
|
|
|
|
pthread_descr self = thread_self();
|
|
pthread_descr self = thread_self();
|
|
-
|
|
|
|
return THREAD_GETMEM (self, p_h_errnop);
|
|
return THREAD_GETMEM (self, p_h_errnop);
|
|
- }
|
|
|
|
- return &_h_errno;
|
|
|
|
}
|
|
}
|