From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id 1100C3858D39; Thu, 19 Jan 2023 13:54:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1100C3858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674136461; bh=tQZgRE9hwtRxf6Fyk0SS+cB1H/Ebv2+GP4q6utLRIcM=; h=From:To:Subject:Date:From; b=HLfZg2DSwX2TtBmwJdfhG/XMzdaO48jJYSsFOpOFFc2AT37Toi3FeGUtZ/pMImq44 ZNUuMrfaxPE5Xv1Wop9T3zSeK3BHEibPfWU4eFiK7HBlD1mi2jmTeFRycl2Gi3MxUF XEh6+CAbwpmigKHeKXYTrwamYgMy4M7UE5J4Mm6g= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Takashi Yano To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: dsp: Fix a problem that fcntl() does not take effect. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 3c2ac163da888cf69d855c9becf643dbc6ebd94f X-Git-Newrev: 9522166db1d2a8c551652d7f17ab3ff692cc4d19 Message-Id: <20230119135421.1100C3858D39@sourceware.org> Date: Thu, 19 Jan 2023 13:54:21 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D9522166db1d= 2a8c551652d7f17ab3ff692cc4d19 commit 9522166db1d2a8c551652d7f17ab3ff692cc4d19 Author: Takashi Yano Date: Thu Jan 19 22:02:47 2023 +0900 Cygwin: dsp: Fix a problem that fcntl() does not take effect. =20 Previously, fhandler_dev_dsp (OSS) has a problem that fcntl() does not take effect at all. This patch fixes the issue. =20 Signed-off-by: Takashi Yano Reviewed-by: Corinna Vinschen Diff: --- winsup/cygwin/fhandler/dsp.cc | 12 ++++++++++++ winsup/cygwin/local_includes/fhandler.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/winsup/cygwin/fhandler/dsp.cc b/winsup/cygwin/fhandler/dsp.cc index c37bedea5..8798cf876 100644 --- a/winsup/cygwin/fhandler/dsp.cc +++ b/winsup/cygwin/fhandler/dsp.cc @@ -1038,6 +1038,12 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *buf) return base ()->_ioctl (cmd, buf); } =20 +int +fhandler_dev_dsp::fcntl (int cmd, intptr_t arg) +{ + return base ()->_fcntl (cmd, arg); +} + void fhandler_dev_dsp::fixup_after_fork (HANDLE parent) { @@ -1417,6 +1423,12 @@ fhandler_dev_dsp::_ioctl (unsigned int cmd, void *bu= f) } } =20 +int +fhandler_dev_dsp::_fcntl (int cmd, intptr_t arg) +{ + return fhandler_base::fcntl(cmd, arg); +} + void fhandler_dev_dsp::_fixup_after_fork (HANDLE parent) { // called from new child process diff --git a/winsup/cygwin/local_includes/fhandler.h b/winsup/cygwin/local_= includes/fhandler.h index 8406dff64..113e40293 100644 --- a/winsup/cygwin/local_includes/fhandler.h +++ b/winsup/cygwin/local_includes/fhandler.h @@ -2770,6 +2770,7 @@ class fhandler_dev_dsp: public fhandler_base ssize_t write (const void *, size_t); void read (void *, size_t&); int ioctl (unsigned int, void *); + int fcntl (int cmd, intptr_t); int close (); void fixup_after_fork (HANDLE); void fixup_after_exec (); @@ -2778,6 +2779,7 @@ class fhandler_dev_dsp: public fhandler_base ssize_t _write (const void *, size_t); void _read (void *, size_t&); int _ioctl (unsigned int, void *); + int _fcntl (int cmd, intptr_t); void _fixup_after_fork (HANDLE); void _fixup_after_exec ();