delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/09/26/16:47:17

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6F93E3858C60
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=systematicsw.ab.ca
X-Authority-Analysis: v=2.4 cv=SdyUytdu c=1 sm=1 tr=0 ts=6150dc41
a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17
a=IkcTkHD0fZMA:10 a=kpN3U7V2zNN4vsHDIoUA:9 a=QEXdDO2ut3YA:10
To: cygwin AT cygwin DOT com
References: <20210926103325 DOT 5c17eb11c3c8a56c377199a8 AT nifty DOT ne DOT jp>
<584f536c-b108-b562-b940-798ec2847c68 AT maxrnd DOT com>
<0b13b9ac-583f-ab72-4202-f8b187946d93 AT towo DOT net>
<dd433ab8-ca9b-d6e8-3dce-c69a4dc9c593 AT towo DOT net>
<CAD8GWsvZP00wAW_UTQ3O3PDhiJvdf2KxPabaaynGU_LfD30u8w AT mail DOT gmail DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
Subject: Re: Incompatible clipboard format between 32bit and 64bit cygwin
Message-ID: <8e3c276a-78ce-7d8a-3d5a-6692eba060fd@SystematicSw.ab.ca>
Date: Sun, 26 Sep 2021 14:46:56 -0600
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: <CAD8GWsvZP00wAW_UTQ3O3PDhiJvdf2KxPabaaynGU_LfD30u8w@mail.gmail.com>
X-CMAE-Envelope: MS4xfBBKifEp8KAI6kukX/RpxlUHWh8sEuEij40K1uKNJBpRQx+ZmQrAo9+ZrXQtkrL3tQCUiFlQW9DFbxeNZLBTaXG6rh4zSjjlS4dkOHqCX3C7cUnT8JjH
A5m1pcaLQt/BOmsOzHg1cGJS2Rx3B6wRNkF8GK4BdAohj9ys45fnnMjsO5ar6VyXlYF8Bg1Cn2BHNRV3Lm5UDdKMUbZT9qiCxtE=
X-Spam-Status: No, score=-1161.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL,
RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,
SPF_NONE, TXREP autolearn=no 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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 2021-09-26 13:09, Lee via Cygwin wrote:
> On 9/26/21, Thomas Wolff wrote:
>> Am 26.09.2021 um 20:37 schrieb Thomas Wolff:
>>> Am 26.09.2021 um 11:50 schrieb Mark Geisert:
>>>> Takashi Yano via Cygwin wrote:
>>>>> I noticed that cygwin clipboard is not compatible
>>>>> between 32bit and 64bit cygwin.
>>>>> If I run 'echo AAAAAAAA > /dev/clipboard' in 32bit cygwin,
>>>>> and run 'cat /dev/clipboard' in 64bit cygwin, this result in
>>>>> cat: /dev/clipboard: Bad address
>>>>> This is because the structure
>>>>> typedef struct
>>>>> {
>>>>>     timestruc_t   timestamp;
>>>>>     size_t    len;
>>>>>     char      data[1];
>>>>> } cygcb_t;
>>>>> defined in fhandler_clipboard.cc has different size.
>>>>> Is this the known issue?

>>>> I doubt anybody has ever tried what you did.

>>> I have and it failed; I just didn't find it important enough to report
>>> it here... Thanks for the plan to fix it.

>>>> I have been testing getclip and putclip between 32- and 64-bit
>>>> environments, but neglected to test Cygwin-internal clipboard format
>>>> that prepends cygcb_t to the user-supplied data.

>> As we're at it, what's the purpose of a cygwin-internal clipboard format
>> at all?

> speed?
> Maybe I'm not understanding the question, but I put a question to this
> list ~3 years ago about right-click/paste into a mintty window being
> **really** slow and the answer was to use getclip:
> $ time d2u < /dev/clipboard > hosts-3.txt
> real    0m11.372s
> user    0m3.749s
> sys     0m6.984s
> $ time cat /dev/clipboard | tr -d '\r' > hosts-2.txt
> real    0m4.405s
> user    0m0.124s
> sys     0m3.577s
> $ time getclip -u > hosts.txt
> real    0m0.734s
> user    0m0.031s
> sys     0m0.031s

I'm not so worried about speed, except where that stops clipboard 
contents being updated quickly for consistency, but I ended up 
explicitly using /dev/clipboard under Cygwin for consistent 
interoperation with gvim and lxterminal under Linux VMs and gvim and 
mintty in Cygwin.

It would be good to test any changes across systems, or I could do so if 
the developer(s? - Mark?) don't run the environments to do so.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019