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 3/6] Optional struct _reent::_unspecified_locale_info
Date: Mon, 16 May 2022 08:55:54 +0200	[thread overview]
Message-ID: <20220516065557.78164-4-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <20220516065557.78164-1-sebastian.huber@embedded-brains.de>

Provide struct _reent::_unspecified_locale_info only if
_REENT_BACKWARD_BINARY_COMPAT is defined.
---
 newlib/libc/include/sys/reent.h | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index e2fd0b422..5f557111e 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -343,8 +343,10 @@ struct _rand48 {
 #define _REENT_SIGNAL_SIZE 24
 
 #ifdef _REENT_BACKWARD_BINARY_COMPAT
+#define _REENT_INIT_UNUSED_LOCALE_INFO 0,
 #define _REENT_INIT_UNUSED_SDIDINIT 0,
 #else
+#define _REENT_INIT_UNUSED_LOCALE_INFO /* Nothing to initialize */
 #define _REENT_INIT_UNUSED_SDIDINIT /* Nothing to initialize */
 #endif
 
@@ -405,9 +407,9 @@ struct _reent
   /* No longer used, but member retained for binary compatibility.
      Now, the __cleanup member is used to check initialization. */
   int _unused_sdidinit;
-#endif
 
   int _unspecified_locale_info;	/* unused, reserved for locale stuff */
+#endif
   struct __locale_t *_locale;/* per-thread locale */
 
   struct _mprec *_mp;
@@ -449,7 +451,7 @@ struct _reent
     0,   \
     _NULL, \
     _REENT_INIT_UNUSED_SDIDINIT \
-    0, \
+    _REENT_INIT_UNUSED_LOCALE_INFO \
     _NULL, \
     _NULL, \
     _NULL, \
@@ -487,7 +489,7 @@ extern const struct __sFILE_fake __sf_fake_stderr;
     0, \
     _NULL, \
     _REENT_INIT_UNUSED_SDIDINIT \
-    0, \
+    _REENT_INIT_UNUSED_LOCALE_INFO \
     _NULL, \
     _NULL, \
     _NULL, \
@@ -638,7 +640,9 @@ struct _reent
   char _emergency[_REENT_EMERGENCY_SIZE];
 
   /* TODO */
+#ifdef _REENT_BACKWARD_BINARY_COMPAT
   int _unspecified_locale_info;	/* unused, reserved for locale stuff */
+#endif
   struct __locale_t *_locale;/* per-thread locale */
 
 #ifdef _REENT_BACKWARD_BINARY_COMPAT
@@ -731,7 +735,7 @@ struct _reent
     _REENT_STDIO_STREAM(&(var), 2), \
     0, \
     "", \
-    0, \
+    _REENT_INIT_UNUSED_LOCALE_INFO \
     _NULL, \
     _REENT_INIT_UNUSED_SDIDINIT \
     _NULL, \
-- 
2.35.3


  parent reply	other threads:[~2022-05-16  6:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  6:55 [PATCH 0/6] Add --enable-newlib-reent-binary-compat configure option Sebastian Huber
2022-05-16  6:55 ` [PATCH 1/6] Add --enable-newlib-reent-binary-compat Sebastian Huber
2022-05-16 11:18   ` Corinna Vinschen
2022-05-16 11:54     ` Sebastian Huber
2022-05-16  6:55 ` [PATCH 2/6] Optional struct _reent::__unused_sdidinit Sebastian Huber
2022-05-16  6:55 ` Sebastian Huber [this message]
2022-05-16  6:55 ` [PATCH 4/6] Optional struct _reent::_new::_unused Sebastian Huber
2022-05-16  6:55 ` [PATCH 5/6] Optional struct _reent::_new::_reent::_unused_rand Sebastian Huber
2022-05-16  6:55 ` [PATCH 6/6] 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=20220516065557.78164-4-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).