From f2988299eb6b61f4cc86e712cf8ee01b6fc0b656 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 10 Dec 2013 21:05:23 +0000 Subject: [PATCH] * fhandler.h (fhandler_dev_clipboard): Add private member cygnativeformat. Declare private method set_clipboard. * fhandler_clipboard.cc (cygnativeformat): Convert static variable to fhandler_dev_clipboard member. (fhandler_dev_clipboard::set_clipboard): Convert from static function to fhandler_dev_clipboard method. --- winsup/cygwin/ChangeLog | 9 +++++++++ winsup/cygwin/fhandler.h | 3 +++ winsup/cygwin/fhandler_clipboard.cc | 6 ++---- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d479db262..0a63081b8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +2013-12-10 Corinna Vinschen + + * fhandler.h (fhandler_dev_clipboard): Add private member + cygnativeformat. Declare private method set_clipboard. + * fhandler_clipboard.cc (cygnativeformat): Convert static variable to + fhandler_dev_clipboard member. + (fhandler_dev_clipboard::set_clipboard): Convert from static function + to fhandler_dev_clipboard method. + 2013-12-09 Christopher Faylor * globals.cc (hntdll): Define/declare. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index d63e7448f..705363bcf 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -1688,9 +1688,12 @@ class fhandler_dev_random: public fhandler_base class fhandler_dev_clipboard: public fhandler_base { + UINT cygnativeformat; off_t pos; void *membuffer; size_t msize; + int set_clipboard (const void *buf, size_t len); + public: fhandler_dev_clipboard (); int is_windows () { return 1; } diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc index fd39f570e..92f833c3d 100644 --- a/winsup/cygwin/fhandler_clipboard.cc +++ b/winsup/cygwin/fhandler_clipboard.cc @@ -28,8 +28,6 @@ details. */ */ static const WCHAR *CYGWIN_NATIVE = L"CYGWIN_NATIVE_CLIPBOARD"; -/* this is MT safe because windows format id's are atomic */ -static UINT cygnativeformat; typedef struct { @@ -61,8 +59,8 @@ fhandler_dev_clipboard::dup (fhandler_base * child, int flags) return fhandler_base::dup (child, flags); } -static int -set_clipboard (const void *buf, size_t len) +int +fhandler_dev_clipboard::set_clipboard (const void *buf, size_t len) { HGLOBAL hmem; /* Native CYGWIN format */