mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 18:58:56 +00: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:
parent
5963b785e7
commit
d510d2aeb2
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/DanShaders
Commit: d510d2aeb2
Pull-request: https://github.com/SerenityOS/serenity/pull/24129
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/supercomputer7
3 changed files with 0 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue