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/7] Cygwin: Enable backward binary compatibility
Date: Mon, 16 May 2022 13:09:16 +0200	[thread overview]
Message-ID: <YoIw3BfK579bzdjW@calimero.vinschen.de> (raw)
In-Reply-To: <69617006-7222-3141-54aa-d3eff3031a1f@embedded-brains.de>

On May 16 07:31, Sebastian Huber wrote:
> On 13/05/2022 22:15, Corinna Vinschen wrote:
> > On May 13 15:46, Sebastian Huber wrote:
> > > ---
> > >   winsup/cygwin/include/cygwin/config.h | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h
> > > index 71a216fbd..2d410a2e7 100644
> > > --- a/winsup/cygwin/include/cygwin/config.h
> > > +++ b/winsup/cygwin/include/cygwin/config.h
> > > @@ -80,6 +80,7 @@ extern inline struct _reent *__getreent (void)
> > >   #define __TM_GMTOFF tm_gmtoff
> > >   #define __TM_ZONE   tm_zone
> > >   #define _USE_LONG_TIME_T 1
> > > +#define _NEWLIB_BACKWARD_BINARY_COMPAT 1
> > Why?
> > 
> > AFAICS we don't expose _REENT to user space.  In theory (knocking
> > on wood here), we shouldn't need _REENT binary compat.
> 
> Ok good, I always thought the unused members in struct _reent were mainly
> for Cygwin.

Sorry, my bad. I wasn't thinking straight last week, apparently.

While Cygwin doesn't directly expose the functions taking a reent ptr as
parameter, we have to expose some of them indirectly, because they are
used in the stdio macros and inline functions, for instance, __swbuf_r.

So, yeah, Cygwin actually needs _reent backward compat here.

> Maybe the option should be named --enable-newlib-reent-binary-compat and
> restricted to struct _reent.

That would be great.  Does the above require a v3 of your patch set?


Thanks,
Corinna


  reply	other threads:[~2022-05-16 11:09 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 [this message]
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 ` [PATCH 6/7] Optional struct _reent::_new::_reent::_unused_rand Sebastian Huber
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=YoIw3BfK579bzdjW@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).