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 --- sysdeps/generic/unwind-link.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/unwind-link.h b/sysdeps/generic/unwind-link.h index a2076a23bf..ea031a04d0 100644 --- a/sysdeps/generic/unwind-link.h +++ b/sysdeps/generic/unwind-link.h @@ -61,16 +61,12 @@ libc_hidden_proto (__libc_unwind_link_get) /* UNWIND_LINK_PTR returns the stored function pointer NAME from the cached unwind link OBJ (which was previously returned by __libc_unwind_link_get). */ -# ifdef PTR_DEMANGLE -# define UNWIND_LINK_PTR(obj, name, ...) \ +# define UNWIND_LINK_PTR(obj, name, ...) \ ({ \ __typeof ((obj)->ptr_##name) __unwind_fptr = (obj)->ptr_##name; \ PTR_DEMANGLE (__unwind_fptr); \ __unwind_fptr; \ }) -# else /* !PTR_DEMANGLE */ -# define UNWIND_LINK_PTR(obj, name, ...) ((obj)->ptr_##name) -# endif /* Called from fork, in the new subprocess. */ void __libc_unwind_link_after_fork (void); -- cgit v1.2.3