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 6/7] Optional struct _reent::_new::_reent::_unused_rand
Date: Fri, 13 May 2022 15:46:59 +0200	[thread overview]
Message-ID: <20220513134700.68563-7-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <20220513134700.68563-1-sebastian.huber@embedded-brains.de>

Provide struct _reent::_new::_reent::_unused_rand only if
_NEWLIB_BACKWARD_BINARY_COMPAT is defined.
---
 newlib/libc/include/sys/reent.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 5e154cae8..c21f11de2 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -344,9 +344,11 @@ struct _rand48 {
 
 #ifdef _NEWLIB_BACKWARD_BINARY_COMPAT
 #define _REENT_INIT_UNUSED_LOCALE_INFO 0,
+#define _REENT_INIT_UNUSED_RAND 0,
 #define _REENT_INIT_UNUSED_SDIDINIT 0,
 #else
 #define _REENT_INIT_UNUSED_LOCALE_INFO /* Nothing to initialize */
+#define _REENT_INIT_UNUSED_RAND /* Nothing to initialize */
 #define _REENT_INIT_UNUSED_SDIDINIT /* Nothing to initialize */
 #endif
 
@@ -667,7 +669,9 @@ struct _reent
     {
       struct
         {
+#ifdef _NEWLIB_BACKWARD_BINARY_COMPAT
           unsigned int _unused_rand;
+#endif
           char * _strtok_last;
           char _asctime_buf[_REENT_ASCTIME_SIZE];
           struct __tm _localtime_buf;
@@ -749,7 +753,7 @@ struct _reent
     _NULL, \
     { \
       { \
-        0, \
+        _REENT_INIT_UNUSED_RAND \
         _NULL, \
         "", \
         {0, 0, 0, 0, 0, 0, 0, 0, 0}, \
-- 
2.35.3


  parent reply	other threads:[~2022-05-13 13:47 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 13:46 [PATCH 0/7] Add --enable-newlib-backward-binary-compat configure option Sebastian Huber
2022-05-13 13:46 ` [PATCH 1/7] Add --enable-newlib-backward-binary-compat Sebastian Huber
2022-05-13 13:46 ` [PATCH 2/7] Cygwin: Enable backward binary compatibility Sebastian Huber
2022-05-13 20:15   ` Corinna Vinschen
2022-05-16  5:31     ` Sebastian Huber
2022-05-16 11:09       ` Corinna Vinschen
2022-05-13 13:46 ` [PATCH 3/7] Optional struct _reent::__unused_sdidinit Sebastian Huber
2022-05-13 13:46 ` [PATCH 4/7] Optional struct _reent::_unspecified_locale_info Sebastian Huber
2022-05-13 13:46 ` [PATCH 5/7] Optional struct _reent::_new::_unused Sebastian Huber
2022-05-13 13:46 ` Sebastian Huber [this message]
2022-05-13 13:47 ` [PATCH 7/7] Use global atexit data for all configurations Sebastian Huber
2022-05-13 16:30   ` 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=20220513134700.68563-7-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).