public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH 2/3] Add stdin_init(), stdout_init() and stderr_init()
Date: Mon, 26 Jun 2017 08:22:00 -0000	[thread overview]
Message-ID: <20170626082208.GA6201@calimero.vinschen.de> (raw)
In-Reply-To: <d1fcd4c3-ed38-51ec-911d-8a66392e7006@embedded-brains.de>

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

On Jun 26 08:17, Sebastian Huber wrote:
> On 26/06/17 08:15, Sebastian Huber wrote:
> 
> > On 23/06/17 16:02, Corinna Vinschen wrote:
> > 
> > > > +static void
> > > > +stderr_init(FILE *ptr)
> > > > +{
> > > > +  /* POSIX requires stderr to be opened for reading and writing, even
> > > > +     when the underlying fd 2 is write-only.  */
> > > > +  std (ptr, __SRW | __SNBF, 2);
> > > > +}
> > > > . +
> > > Perhaps these func should be inline?
> > 
> > Ok, I change them to "static __inline void".
> 
> Or simply "static inline void"? Is it time to assume at least a C99 compiler
> for the Newlib sources?

We're already using inline in the local arc4random header and in a
couple of target dependent files.  I guess we can safely assume a C99
compiler should be used for building newlib itself.  That doesn't
hold for exported headers, of course.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2017-06-26  8:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-23  9:23 [PATCH 1/3] Remove superfluous parameter from std() Sebastian Huber
2017-06-23  9:23 ` [PATCH 3/3] Introduce _REENT_GLOBAL_STDIO_STREAMS Sebastian Huber
2017-06-23 21:53   ` Freddie Chopin
2017-06-26  5:59     ` Sebastian Huber
2017-06-23  9:23 ` [PATCH 2/3] Add stdin_init(), stdout_init() and stderr_init() Sebastian Huber
2017-06-23 14:02   ` Corinna Vinschen
2017-06-26  6:15     ` Sebastian Huber
2017-06-26  6:24       ` Sebastian Huber
2017-06-26  8:22         ` Corinna Vinschen [this message]

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=20170626082208.GA6201@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --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).