mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 04:29:30 -10:00
LibC: Remove now redundant NO_TLS guards
Since DynamicLoader is compiled with -fdata-sections and --gc-sections, unused thread_local variables won't create TLS section in it anymore.
This commit is contained in:
1 parent
5963b785e7
commit
d510d2aeb2
3 files changed
-13
No files matched your search
@@ -17,13 +17,8 @@
|
||||
[[gnu::weak]] Result<void, DlErrorMessage> __dladdr(void const*, Dl_info*) asm("__dladdr");
|
||||
|
||||
// FIXME: use thread_local and a String once TLS works
|
||||
#ifdef NO_TLS
|
||||
char* s_dlerror_text = NULL;
|
||||
bool s_dlerror_retrieved = false;
|
||||
#else
|
||||
__thread char* s_dlerror_text = NULL;
|
||||
__thread bool s_dlerror_retrieved = false;
|
||||
#endif
|
||||
|
||||
static void store_error(ByteString const& error)
|
||||
{
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
#ifdef NO_TLS
|
||||
int h_errno;
|
||||
#else
|
||||
__thread int h_errno;
|
||||
#endif
|
||||
|
||||
static hostent __gethostbyname_buffer;
|
||||
static in_addr_t __gethostbyname_address;
|
||||
|
||||
@@ -55,11 +55,7 @@ struct protoent* getprotobynumber(int proto);
|
||||
struct protoent* getprotoent(void);
|
||||
void setprotoent(int stay_open);
|
||||
|
||||
#ifdef NO_TLS
|
||||
extern int h_errno;
|
||||
#else
|
||||
extern __thread int h_errno;
|
||||
#endif
|
||||
|
||||
#define HOST_NOT_FOUND 101
|
||||
#define NO_DATA 102
|
||||
|
||||
Reference in new issue
Block a user