Re: [PATCH 2/7] Cygwin: Enable backward binary compatibility
Corinna Vinschen <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
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