public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Sebastian Huber <sh@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Declare global __sf[] only once
Date: Fri, 13 May 2022 11:19:37 +0000 (GMT)	[thread overview]
Message-ID: <20220513111937.099113840C15@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d041db379241a4fd668401f374429099e5a16a48

commit d041db379241a4fd668401f374429099e5a16a48
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Mon May 2 09:25:44 2022 +0200

    Declare global __sf[] only once
    
    Reduced number of global __sf[] declarations from two to one,
    simplifying initializations in sys/reent.h.

Diff:
---
 newlib/libc/include/sys/reent.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h
index 4bc78a447..e0b0ccffb 100644
--- a/newlib/libc/include/sys/reent.h
+++ b/newlib/libc/include/sys/reent.h
@@ -293,6 +293,10 @@ typedef struct __sFILE   __FILE;
 #endif /* __LARGE64_FILES */
 #endif /* !__CUSTOM_FILE_IO__ */
 
+#ifdef _REENT_GLOBAL_STDIO_STREAMS
+extern __FILE __sf[3];
+#endif
+
 struct _glue
 {
   struct _glue *_next;
@@ -426,7 +430,6 @@ struct _reent
 };
 
 #ifdef _REENT_GLOBAL_STDIO_STREAMS
-extern __FILE __sf[3];
 
 # define _REENT_INIT(var) \
   { 0, \
@@ -698,7 +701,6 @@ struct _reent
 };
 
 #ifdef _REENT_GLOBAL_STDIO_STREAMS
-extern __FILE __sf[3];
 #define _REENT_STDIO_STREAM(var, index) &__sf[index]
 #else
 #define _REENT_STDIO_STREAM(var, index) &(var)->__sf[index]


                 reply	other threads:[~2022-05-13 11:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20220513111937.099113840C15@sourceware.org \
    --to=sh@sourceware.org \
    --cc=newlib-cvs@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).