From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) by sourceware.org (Postfix) with ESMTPS id 7AB2B3857427 for ; Thu, 12 May 2022 07:08:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7AB2B3857427 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embedded-brains.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embedded-brains.de Received: from sslproxy06.your-server.de ([78.46.172.3]) by dedi548.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1np2vp-000FZm-PH for newlib@sourceware.org; Thu, 12 May 2022 09:08:18 +0200 Received: from [82.100.198.138] (helo=mail.embedded-brains.de) by sslproxy06.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1np2vp-000EoK-TP for newlib@sourceware.org; Thu, 12 May 2022 09:08:17 +0200 Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 983DE480101 for ; Thu, 12 May 2022 09:08:17 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Px3puOo49P29 for ; Thu, 12 May 2022 09:08:17 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 38C75480177 for ; Thu, 12 May 2022 09:08:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gAKUyYQrqDNP for ; Thu, 12 May 2022 09:08:17 +0200 (CEST) Received: from zimbra.eb.localhost (unknown [192.168.96.242]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 1282C480101 for ; Thu, 12 May 2022 09:08:17 +0200 (CEST) From: Sebastian Huber To: newlib@sourceware.org Subject: [PATCH v2] Cygwin: syscalls.cc: Include ../stdio/local.h Date: Thu, 12 May 2022 09:08:14 +0200 Message-Id: <20220512070814.69477-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.103.5/26538/Wed May 11 10:06:03 2022) X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2022 07:08:24 -0000 Include Newlib internal ../stdio/local.h for the _fwalk_reent() declarati= on. Add C++ support to local.h --- newlib/libc/stdio/local.h | 5 +++++ winsup/cygwin/syscalls.cc | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index 30c534dcd..abe5c380a 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -23,6 +23,7 @@ */ =20 #include <_ansi.h> +#include #include #include #include @@ -140,6 +141,8 @@ =20 #endif /* __SINGLE_THREAD__ || __IMPL_UNLOCKED__ */ =20 +__BEGIN_DECLS + extern wint_t __fgetwc (struct _reent *, FILE *); extern wint_t __fputwc (struct _reent *, wchar_t, FILE *); extern u_char *__sccl (char *, u_char *fmt); @@ -338,3 +341,5 @@ typedef enum __packed { extern const __CH_CLASS __chclass[256]; extern const __STATE __state_table[MAX_STATE][MAX_CH_CLASS]; extern const __ACTION __action_table[MAX_STATE][MAX_CH_CLASS]; + +__END_DECLS 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 /* needed for RENAME_NOREPLACE */ =20 +#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; } =20 -/* 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) { --=20 2.35.3