From 58548b9d689fb9bba67bdc5b59c8d2fa47f4f8ec Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 18 Oct 2022 17:00:07 +0200 Subject: Use PTR_MANGLE and PTR_DEMANGLE unconditionally in C sources In the future, this will result in a compilation failure if the macros are unexpectedly undefined (due to header inclusion ordering or header inclusion missing altogether). Assembler sources are more difficult to convert. In many cases, they are hand-optimized for the mangling and no-mangling variants, which is why they are not converted. sysdeps/s390/s390-32/__longjmp.c and sysdeps/s390/s390-64/__longjmp.c are special: These are C sources, but most of the implementation is in assembler, so the PTR_DEMANGLE macro has to be undefined in some cases, to match the assembler style. Reviewed-by: Adhemerval Zanella --- stdlib/cxa_thread_atexit_impl.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'stdlib/cxa_thread_atexit_impl.c') diff --git a/stdlib/cxa_thread_atexit_impl.c b/stdlib/cxa_thread_atexit_impl.c index faacab3990..b5ecfee10c 100644 --- a/stdlib/cxa_thread_atexit_impl.c +++ b/stdlib/cxa_thread_atexit_impl.c @@ -100,9 +100,7 @@ static __thread struct link_map *lm_cache; int __cxa_thread_atexit_impl (dtor_func func, void *obj, void *dso_symbol) { -#ifdef PTR_MANGLE PTR_MANGLE (func); -#endif /* Prepend. */ struct dtor_list *new = calloc (1, sizeof (struct dtor_list)); @@ -152,9 +150,7 @@ __call_tls_dtors (void) { struct dtor_list *cur = tls_dtor_list; dtor_func func = cur->func; -#ifdef PTR_DEMANGLE PTR_DEMANGLE (func); -#endif tls_dtor_list = tls_dtor_list->next; func (cur->obj); -- cgit v1.2.3