[PATCH v3 6/7] Optional struct _reent::_new::_unused

Sebastian Huber sebastian.huber@embedded-brains.de
Mon May 16 15:53:28 GMT 2022


Rename struct _reent::_new member _unused in _reserved_3.  Provide it only if
_REENT_BACKWARD_BINARY_COMPAT is defined.
---
 newlib/libc/include/sys/reent.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 6d6796ed3..4b09e8cd5 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -685,6 +685,7 @@ struct _reent
           _mbstate_t _wcsrtombs_state;
 	  int _h_errno;
         } _reent;
+#ifdef _REENT_BACKWARD_BINARY_COMPAT
   /* Two next two fields were once used by malloc.  They are no longer
      used. They are used to preserve the space used before so as to
      allow addition of new reent fields and keep binary compatibility.   */
@@ -693,7 +694,8 @@ struct _reent
 #define _N_LISTS 30
           unsigned char * _nextf[_N_LISTS];
           unsigned int _nmalloc[_N_LISTS];
-        } _unused;
+        } _reserved_3;
+#endif
     } _new;
 
 # ifndef _REENT_GLOBAL_ATEXIT
-- 
2.35.3



More information about the Newlib mailing list