public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Mark Geisert <mark@maxrnd.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit
Date: Sun, 10 Oct 2021 23:13:41 -0700	[thread overview]
Message-ID: <6de24f8c-bd21-cd4f-18ff-ece3fef85b89@maxrnd.com> (raw)
In-Reply-To: <037a8027-8969-df1e-ccb5-6a736578cec5@cornell.edu>

Ken Brown wrote:
> On 10/9/2021 10:29 AM, Jon Turney wrote:
[...]
>>> On 10/8/2021 5:52 AM, Takashi Yano wrote:
[...]

Thanks all for the comments; much appreciated.  They'll be factored into v2 in one 
form or another.  I pronounced my original patch "bad" not because of any problem 
with code operation or struct cygcb_t definition.  I used anonymous union and 
anonymous struct internally to mostly realize what Takashi suggested for layout, 
just naming the items cb_* rather than tv_* or other.  The code works as intended, 
32- and 64-bit.

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?

So I'm working on a heuristic to identify which cygcb_t layout is present in the 
clipboard data.  This will hopefully distinguish between the 3 historical cygcb_t 
layouts as well as x86_64 differing from i686 for each one.
Stay tuned,

..mark

  reply	other threads:[~2021-10-11  6:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-07  5:22 Mark Geisert
2021-10-07  5:56 ` Mark Geisert
2021-10-08  9:52 ` Takashi Yano
2021-10-09 14:19   ` Ken Brown
2021-10-09 14:29     ` Jon Turney
2021-10-09 14:43       ` Ken Brown
2021-10-11  6:13         ` Mark Geisert [this message]
2021-10-11 12:11           ` Ken Brown
2021-10-22 15:11             ` Corinna Vinschen
2021-10-23  5:35               ` Mark Geisert
2021-10-23 20:32                 ` Ken Brown
2021-10-23 21:53                   ` Mark Geisert
2021-10-23 23:58               ` Takashi Yano
2021-10-25  8:28                 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6de24f8c-bd21-cd4f-18ff-ece3fef85b89@maxrnd.com \
    --to=mark@maxrnd.com \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).