This is the mail archive of the cygwin-cvs@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[newlib-cygwin/cygwin-2.0] Remove unused 32/64 bit tty code


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=84b8db8e7ac60ad8e08c7013fc8cc4f03d37f262

commit 84b8db8e7ac60ad8e08c7013fc8cc4f03d37f262
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Tue Apr 7 12:16:07 2015 +0200

    Remove unused 32/64 bit tty code
    
    	* tty.h (class tty): Remove unused 32/64 bit interoperability
    	considerations.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ChangeLog |  5 +++++
 winsup/cygwin/tty.h     | 21 +++------------------
 2 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index f329a76..8065e73 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
 2015-04-07  Corinna Vinschen  <corinna@vinschen.de>
 
+	* tty.h (class tty): Remove unused 32/64 bit interoperability
+	considerations.
+
+2015-04-07  Corinna Vinschen  <corinna@vinschen.de>
+
 	* tty.h (NTTYS): Raise to 128.
 	* devices.in: Change pty, ptym, and cons expressions accordingly.
 	* devices.cc: Regenerate.
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/tty.h
index f3b6578..27d43f7 100644
--- a/winsup/cygwin/tty.h
+++ b/winsup/cygwin/tty.h
@@ -90,29 +90,14 @@ public:
   pid_t master_pid;	/* PID of tty master process */
 
 private:
-  /* Since tty is shared, the HANDLEs must be 32 and 64 bit clean.  The below
-     code makes sure of that by setting the upper 4 byte of the union to 0
-     when writing the handle value from a 32 bit process.  Fortunately the
-     actual values are 32 bit on both platforms, so the HANDLES can be
-     used on both platforms. */
-  union {
-    HANDLE _from_master;
-    LARGE_INTEGER _fm_dummy;
-  };
-  union {    
-    HANDLE _to_master;
-    LARGE_INTEGER _tm_dummy;
-  };
+  HANDLE _from_master;
+  HANDLE _to_master;
+
 public:
   HANDLE from_master() const { return _from_master; }
   HANDLE to_master() const { return _to_master; }
-#ifdef __x86_64__
   void set_from_master (HANDLE h) { _from_master = h; }
   void set_to_master (HANDLE h) { _to_master = h; }
-#else
-  void set_from_master (HANDLE h) { _fm_dummy.HighPart = 0; _from_master = h; }
-  void set_to_master (HANDLE h) { _tm_dummy.HighPart = 0; _to_master = h; }
-#endif
 
   int read_retval;
   bool was_opened;	/* True if opened at least once. */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]