public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Cygwin: syscalls.cc: Include ../stdio/local.h
@ 2022-05-12  6:49 Sebastian Huber
  2022-05-12  6:51 ` Sebastian Huber
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Huber @ 2022-05-12  6:49 UTC (permalink / raw)
  To: newlib

Include Newlib internal ../stdio/local.h for the _fwalk_reent() declaration.
---
 winsup/cygwin/syscalls.cc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 1cecaa017..885498a1a 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -64,6 +64,8 @@ details. */
 #include "child_info.h"
 #include <cygwin/fs.h>  /* needed for RENAME_NOREPLACE */
 
+#include "../../newlib/libc/stdio/local.h" /* needed for _fwalk_reent() */
+
 #undef _close
 #undef _lseek
 #undef _open
@@ -3057,9 +3059,6 @@ _cygwin_istext_for_stdio (int fd)
   return 1;
 }
 
-/* internal newlib function */
-extern "C" int _fwalk_reent (struct _reent *ptr, int (*function) (struct _reent *, FILE *));
-
 static int
 setmode_helper (struct _reent *ptr __unused, FILE *f)
 {
-- 
2.35.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Cygwin: syscalls.cc: Include ../stdio/local.h
  2022-05-12  6:49 [PATCH] Cygwin: syscalls.cc: Include ../stdio/local.h Sebastian Huber
@ 2022-05-12  6:51 ` Sebastian Huber
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Huber @ 2022-05-12  6:51 UTC (permalink / raw)
  To: newlib

Sorry, this doesn't work since local.h has no extern "C" block.

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber@embedded-brains.de
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-12  6:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12  6:49 [PATCH] Cygwin: syscalls.cc: Include ../stdio/local.h Sebastian Huber
2022-05-12  6:51 ` Sebastian Huber

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).