[glibc/release/2.43/master] Rename __unused fields to __glibc_reserved.

Sam James via Glibc-cvs <[email protected]> Sun, 31 May 2026 17:37:25 +0000 (GMT)
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=18b97b03b7442d8ba0860e43145f8724c9e77b17

commit 18b97b03b7442d8ba0860e43145f8724c9e77b17
Author: Jakub Jelinek <[email protected]>
Date:   Tue Feb 17 17:06:48 2026 +0100

    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 <[email protected]>
    (cherry picked from commit 243bdfec8f7cd4a85a8ce6e4e9a5a5accd3ce1aa)

Diff:
---
 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