This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Console lseek fix
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: <arch-dev at regexps dot com>,<cygwin-patches at cygwin dot com>
- Date: Tue, 19 Mar 2002 14:15:07 +1100
- Subject: Console lseek fix
The following patch allows arch's with-ftp command to run under cygwin.
Chris, any objections?
ChangeLog:
2002-03-15 Robert Collins <rbtcollins@hotmail.com>
* fhandler.h (fhandler_termios::lseek): Override lseek.
* fhandler_termios.cc (fhandler_termios::lseek): Implement this.
Index: fhandler.h
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler.h,v
retrieving revision 1.110
diff -u -p -r1.110 fhandler.h
--- fhandler.h 2002/02/28 14:25:53 1.110
+++ fhandler.h 2002/03/19 03:13:13
@@ -657,6 +657,7 @@ class fhandler_termios: public fhandler_
void fixup_after_fork (HANDLE);
void fixup_after_exec (HANDLE parent) { fixup_after_fork (parent); }
void echo_erase (int force = 0);
+ virtual __off64_t lseek (__off64_t, int);
};
enum ansi_intensity
Index: fhandler_termios.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler_termios.cc,v
retrieving revision 1.25
diff -u -p -r1.25 fhandler_termios.cc
--- fhandler_termios.cc 2002/03/05 08:15:25 1.25
+++ fhandler_termios.cc 2002/03/19 03:13:13
@@ -345,3 +345,10 @@ fhandler_termios::fixup_after_fork (HAND
this->fhandler_base::fixup_after_fork (parent);
fork_fixup (parent, get_output_handle (), "output_handle");
}
+
+__off64_t
+fhandler_termios::lseek (__off64_t, int)
+{
+ set_errno (ESPIPE);
+ return -1;
+}