From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by sourceware.org (Postfix) with ESMTPS id BE7CA3858C27 for ; Wed, 27 Oct 2021 09:02:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BE7CA3858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo.net Received: from [192.168.178.51] ([91.65.221.56]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M7rxE-1mbnC82etm-004z1E; Wed, 27 Oct 2021 11:01:50 +0200 Subject: Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit To: cygwin-developers@cygwin.com References: <20211007052237.7139-1-mark@maxrnd.com> <20211008185210.cac713f28dea727a1467cf94@nifty.ne.jp> <29514de9-0d19-0d22-b8e1-3bfbce11589b@cornell.edu> <7dd31f61-43a1-4e4d-2e1a-dc79606263d5@dronecode.org.uk> <037a8027-8969-df1e-ccb5-6a736578cec5@cornell.edu> <6de24f8c-bd21-cd4f-18ff-ece3fef85b89@maxrnd.com> <12fea3e3-92ae-2a33-81ea-808bdcc20f2a@maxrnd.com> From: Thomas Wolff Message-ID: <6403170a-9e5d-4b98-7ef9-3d11fb31c2c4@towo.net> Date: Wed, 27 Oct 2021 11:01:47 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <12fea3e3-92ae-2a33-81ea-808bdcc20f2a@maxrnd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:3F3ZmjX2j4CFQsR7Iwt0QfpmXIP/7kV6D1WJPlAt3ZLdghs5eLo rd+nvKf4iWUeFjzFDLZQJ4/UuObQBx2uLlIRsdTDefVFJBiLAtJIKJg0CkkD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ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Oct 2021 09:02:38 -0000 Am 23.10.2021 um 07:35 schrieb Mark Geisert: > Hi all, > > Corinna Vinschen wrote: >> On Oct 11 08:11, Ken Brown wrote: >>> On 10/11/2021 2:13 AM, Mark Geisert wrote: >>>> It's just that after submitting the patch I realized that, if we >>>> really >>>> are going to support both Cygwin archs (x86_64 and i686), there is >>>> still >>>> the issue of different cygcb_t layouts between Cygwin versions being >>>> ignored. >>>> >>>> Specifically, the fhandler_clipboard::fstat routine can't tell which >>>> Cygwin environment has set the clipboard contents.  My original patch >>>> takes care of 32-bit and 64-bit, providing both are running Cygwin >= >>>> 3.3.0 (presumably).  What if it was a different version (pre 3.3.0) >>>> that >>>> set the contents? >>> >>> I wonder if this is worth the trouble.  Right now we have a problem >>> in which >>> data written to /dev/clipboard in one arch can't be read in the >>> other arch. >>> The fix will appear in Cygwin 3.3.0.  Do we really have to try to >>> make the >>> fix apply retroactively in case the user updates one arch but not >>> the other? >> >> Just to close this up prior to the 3.3.0 release... >> >> Given we never actually strived for 32<->64 bit interoperability, it's >> hard to argue why this should be different for the clipboard stuff. >> >> Running 32 and 64 bit Cygwin versions in parallel doesn't actually make >> much sense for most people anyway, unless they explicitely develop for >> 32 and 64 bit systems under Cygwin.  From a productivity point of view >> there's no good reason to run more than one arch. >> >> So I agree with Ken here.  It's probably not worth the trouble. > > Sorry, I've been sidetracked for a bit.  I can agree with Ken too.  > The only circumstance I could think of where multiple internal format > support might be useful (to non-developers) was some user hanging on > to an older Cygwin because it was needed to support something else > (s/w or h/w) old and non-upgradeable. Doesn't seem very likely at this > point. > > I'll try to get the v2 patch out over this weekend.  Same end-result > for same environments as the v1 patch, but incorporating all the > comments I received. > > To that end, does Jon's suggestion of /usr/include/sys/cygwin.h seem > like the best location to define struct cygcb_t for use by both Cygwin > and cygutils package? > Thanks much, > > ..mark Mintty uses the Windows clipboard directly, so it does not face this problem so far. However, that results in a timestamp of 1st Dec 2006 for /dev/clipboard. In order to avoid a complete reimplementation of mintty clipboard handling ("never touch a running system"), would it be possible to set the cygwin timestamp only, without affecting the clipboard contents, maybe using a new cygwin API function? Like `touch /dev/clipboard` which does not work however. Thanks for considering Thomas