Re: [PATCH 09/11] stdio: Replace _fwalk_reent() with _fwalk_sglue()

Sebastian Huber <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On 11/05/2022 17:56, Corinna Vinschen wrote:
> On May 10 10:09, Matthew Joyce wrote:
>> From: Sebastian Huber<[email protected]>
>>
>> Replaced _fwalk_reent() with _fwalk_sglue(). The change adds an
>> extra __sglue object as a parameter, which will allow the passing
>> of a global __sglue object separate from the __sglue member of
>> struct _reent. The global __sglue object will be added in a
>> follow-on patch.
>> ---
>>   newlib/libc/stdio/fcloseall.c |  2 +-
>>   newlib/libc/stdio/fflush.c    |  2 +-
>>   newlib/libc/stdio/findfp.c    | 14 ++++++++++----
>>   newlib/libc/stdio/fwalk.c     | 15 ++++++++-------
>>   newlib/libc/stdio/local.h     |  3 ++-
>>   newlib/libc/stdio/refill.c    |  4 ++--
>>   winsup/cygwin/syscalls.cc     |  5 +++--
>>   7 files changed, 27 insertions(+), 18 deletions(-)
>> [...]
>> diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
>> index 1cecaa017..5bf6d8fc7 100644
>> --- a/winsup/cygwin/syscalls.cc
>> +++ b/winsup/cygwin/syscalls.cc
>> @@ -3058,7 +3058,8 @@ _cygwin_istext_for_stdio (int fd)
>>   }
>>   
>>   /* internal newlib function */
>> -extern "C" int _fwalk_reent (struct _reent *ptr, int (*function) (struct _reent *, FILE *));
>> +extern "C" int _fwalk_sglue (struct _reent *ptr,
>> +  int (*function) (struct _reent *, FILE *), struct _sglue *);
>                                                         ^^^^^^
>                                                         _glue?

In patch 8, Matthew added this:

diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 9b6c2509d..b7f624cc3 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -22,6 +22,7 @@ details. */
  #include "cygheap.h"
  #include "cygwait.h"
  #include "posix_timer.h"
+#include "../../newlib/libc/stdio/local.h"

This seems to work in the cygwin build. Should we remove the local 
declaration and instead include the local.h header file?

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: [email protected]
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.