[PATCH v2] Cygwin: Make native clipboard layout same for 32- and 64-bit
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Oct 26 10:43:14 GMT 2021
On Oct 25 02:25, Mark Geisert wrote:
> This patch unifies the layout of the clipboard descriptor cygcb_t for
> 32- and 64-bit Cygwin. It allows correct copy/paste between the two
> environments without corruption of user's copied data and without access
> violations due to interpreting that data as a size field.
>
> The definitions of CYGWIN_NATIVE and cygcb_t are moved to a new include
> file, sys/clipboard.h. The include file is used by fhandler_clipboard.cc
> as well as getclip.c and putclip.c in the Cygwin cygutils package.
>
> When copy/pasting between 32- and 64-bit Cygwin environments, both must
> be running version 3.3.0 or later for successful operation.
>
> ---
> winsup/cygwin/fhandler_clipboard.cc | 42 +++++++++++++----------
> winsup/cygwin/include/sys/clipboard.h | 49 +++++++++++++++++++++++++++
> winsup/cygwin/release/3.3.0 | 4 +++
> 3 files changed, 78 insertions(+), 17 deletions(-)
> create mode 100644 winsup/cygwin/include/sys/clipboard.h
>
> diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc
> index ccdb295f3..7adb50991 100644
> --- a/winsup/cygwin/fhandler_clipboard.cc
> +++ b/winsup/cygwin/fhandler_clipboard.cc
> @@ -17,6 +17,7 @@ details. */
> #include "dtable.h"
> #include "cygheap.h"
> #include "child_info.h"
> +#include "sys/clipboard.h"
Pushed with a minor change:
#include <sys/clipboard.h>
given this is a system header.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list