From 243bdfec8f7cd4a85a8ce6e4e9a5a5accd3ce1aa Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 17 Feb 2026 17:06:48 +0100 Subject: [PATCH] Rename __unused fields to __glibc_reserved. __unused is often defined to __attribute__((unused)) in BSD sources and furthermore libstdc++ testsuite uses it as a macro to verify libstdc++ headers don't use __unused identifiers. In ~2012 glibc headers have been cleaned up, but some new uses of __unused have reappeared (s390 fenv.h already many years ago, the rest last November). Reviewed-by: Florian Weimer --- sysdeps/powerpc/nptl/bits/struct_mutex.h | 2 +- sysdeps/s390/fpu/bits/fenv.h | 8 ++++---- sysdeps/s390/nptl/bits/struct_mutex.h | 2 +- sysdeps/x86/nptl/bits/struct_mutex.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/powerpc/nptl/bits/struct_mutex.h b/sysdeps/powerpc/nptl/bits/struct_mutex.h index 1472af21f7..ebf2d50922 100644 --- a/sysdeps/powerpc/nptl/bits/struct_mutex.h +++ b/sysdeps/powerpc/nptl/bits/struct_mutex.h @@ -32,7 +32,7 @@ struct __pthread_mutex_s int __kind; #if __WORDSIZE == 64 short __spins; - short __unused; + short __glibc_reserved; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else diff --git a/sysdeps/s390/fpu/bits/fenv.h b/sysdeps/s390/fpu/bits/fenv.h index b9e844e393..33e88fbe9d 100644 --- a/sysdeps/s390/fpu/bits/fenv.h +++ b/sysdeps/s390/fpu/bits/fenv.h @@ -76,10 +76,10 @@ typedef unsigned int fexcept_t; /* size of fpc */ typedef struct { fexcept_t __fpc; - void *__unused; - /* The field __unused (formerly __ieee_instruction_pointer) is a relict from - commit "Remove PTRACE_PEEKUSER" (87b9b50f0d4b92248905e95a06a13c513dc45e59) - and isn't used anymore. */ + void *__glibc_reserved; + /* The field __glibc_reserved (formerly __ieee_instruction_pointer) is a + relict from commit "Remove PTRACE_PEEKUSER" + (87b9b50f0d4b92248905e95a06a13c513dc45e59) and isn't used anymore. */ } fenv_t; /* If the default argument is used we use this value. */ diff --git a/sysdeps/s390/nptl/bits/struct_mutex.h b/sysdeps/s390/nptl/bits/struct_mutex.h index d069b485d1..571265267c 100644 --- a/sysdeps/s390/nptl/bits/struct_mutex.h +++ b/sysdeps/s390/nptl/bits/struct_mutex.h @@ -32,7 +32,7 @@ struct __pthread_mutex_s int __kind; #if __WORDSIZE == 64 short __spins; - short __unused; + short __glibc_reserved; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else diff --git a/sysdeps/x86/nptl/bits/struct_mutex.h b/sysdeps/x86/nptl/bits/struct_mutex.h index 9c19dff660..13c9894ad4 100644 --- a/sysdeps/x86/nptl/bits/struct_mutex.h +++ b/sysdeps/x86/nptl/bits/struct_mutex.h @@ -32,7 +32,7 @@ struct __pthread_mutex_s int __kind; #ifdef __x86_64__ short __spins; - short __unused; + short __glibc_reserved; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else -- 2.47.3