public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: newlib@sourceware.org
Subject: [PATCH v3 4/7] Optional struct _reent::_unspecified_locale_info
Date: Mon, 16 May 2022 17:53:26 +0200	[thread overview]
Message-ID: <20220516155329.29458-5-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <20220516155329.29458-1-sebastian.huber@embedded-brains.de>

Rename struct _reent member _unspecified_locale_info in _reserved_1.  Provide
it only if _REENT_BACKWARD_BINARY_COMPAT is defined.
---
 newlib/libc/include/sys/reent.h | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index fc289b531..f526f3568 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -344,8 +344,10 @@ struct _rand48 {
 
 #ifdef _REENT_BACKWARD_BINARY_COMPAT
 #define _REENT_INIT_RESERVED_0 0,
+#define _REENT_INIT_RESERVED_1 0,
 #else
 #define _REENT_INIT_RESERVED_0 /* Nothing to initialize */
+#define _REENT_INIT_RESERVED_1 /* Nothing to initialize */
 #endif
 
 /*
@@ -403,9 +405,8 @@ struct _reent
 
 #ifdef _REENT_BACKWARD_BINARY_COMPAT
   int _reserved_0;
+  int _reserved_1;
 #endif
-
-  int _unspecified_locale_info;	/* unused, reserved for locale stuff */
   struct __locale_t *_locale;/* per-thread locale */
 
   struct _mprec *_mp;
@@ -447,7 +448,7 @@ struct _reent
     0,   \
     _NULL, \
     _REENT_INIT_RESERVED_0 \
-    0, \
+    _REENT_INIT_RESERVED_1 \
     _NULL, \
     _NULL, \
     _NULL, \
@@ -485,7 +486,7 @@ extern const struct __sFILE_fake __sf_fake_stderr;
     0, \
     _NULL, \
     _REENT_INIT_RESERVED_0 \
-    0, \
+    _REENT_INIT_RESERVED_1 \
     _NULL, \
     _NULL, \
     _NULL, \
@@ -635,8 +636,9 @@ struct _reent
   int  _inc;			/* used by tmpnam */
   char _emergency[_REENT_EMERGENCY_SIZE];
 
-  /* TODO */
-  int _unspecified_locale_info;	/* unused, reserved for locale stuff */
+#ifdef _REENT_BACKWARD_BINARY_COMPAT
+  int _reserved_1;
+#endif
   struct __locale_t *_locale;/* per-thread locale */
 
 #ifdef _REENT_BACKWARD_BINARY_COMPAT
@@ -727,7 +729,7 @@ struct _reent
     _REENT_STDIO_STREAM(&(var), 2), \
     0, \
     "", \
-    0, \
+    _REENT_INIT_RESERVED_1 \
     _NULL, \
     _REENT_INIT_RESERVED_0 \
     _NULL, \
-- 
2.35.3


  parent reply	other threads:[~2022-05-16 15:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16 15:53 [PATCH v3 0/7] Add --enable-newlib-reent-binary-compat configure option Sebastian Huber
2022-05-16 15:53 ` [PATCH v3 1/7] Add --enable-newlib-reent-binary-compat Sebastian Huber
2022-05-16 15:53 ` [PATCH v3 2/7] Cygwin: Enable backward binary compatibility Sebastian Huber
2022-05-16 15:53 ` [PATCH v3 3/7] Optional struct _reent::__unused_sdidinit Sebastian Huber
2022-05-16 15:53 ` Sebastian Huber [this message]
2022-05-16 15:53 ` [PATCH v3 5/7] Optional struct _reent::_new::_reent::_unused_rand Sebastian Huber
2022-05-16 15:53 ` [PATCH v3 6/7] Optional struct _reent::_new::_unused Sebastian Huber
2022-05-16 15:58   ` Sebastian Huber
2022-05-17 12:49     ` Corinna Vinschen
2022-05-17 12:57       ` Sebastian Huber
2022-05-17 19:31         ` Corinna Vinschen
2022-05-24 21:25         ` Jeff Johnston
2022-05-16 15:53 ` [PATCH v3 7/7] Use global atexit data for all configurations Sebastian Huber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220516155329.29458-5-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).