[PATCH 2/3] Add stdin_init(), stdout_init() and stderr_init()

Corinna Vinschen vinschen@redhat.com
Mon Jun 26 08:22:00 GMT 2017


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20170626/bbf7a271/attachment.sig>


More information about the Newlib mailing list