From deafd19cea516a1767139135ecba0c5660f67b60 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 13 Aug 2007 19:15:47 +0000 Subject: [PATCH] * fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function) for clearness. * fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous change. (fhandler_base::open_fs): Ditto. * fhandler_socket.cc (fhandler_socket::close): Ditto. --- winsup/cygwin/ChangeLog | 9 +++++++++ winsup/cygwin/fhandler.h | 1 + winsup/cygwin/fhandler_disk_file.cc | 4 ++-- winsup/cygwin/fhandler_socket.cc | 3 --- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index dfba0f7c0..98dceb31b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +2007-08-13 Corinna Vinschen + + * fhandler.h (fhandler_base::close_fs): Reintroduce (as inline function) + for clearness. + * fhandler_disk_file.cc (fhandler_base::fstat_fs): Revert previous + change. + (fhandler_base::open_fs): Ditto. + * fhandler_socket.cc (fhandler_socket::close): Ditto. + 2007-08-13 Corinna Vinschen * Makefile.in (DLL_OFILES): Remove delqueue.o. diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index b634ffd53..3da3be680 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -264,6 +264,7 @@ class fhandler_base virtual int open (int, mode_t = 0); int open_fs (int, mode_t = 0); virtual int close (); + int close_fs () { return fhandler_base::close (); } virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2))); int __stdcall fstat_fs (struct __stat64 *buf) __attribute__ ((regparm (2))); int __stdcall fstat_helper (struct __stat64 *buf, diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 12524196a..cbbd0fd7b 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -437,7 +437,7 @@ fhandler_base::fstat_fs (struct __stat64 *buf) res = fstat_by_handle (buf); bool no_handle = nohandle (); nohandle (false); - close (); + close_fs (); nohandle (no_handle); set_io_handle (NULL); } @@ -1257,7 +1257,7 @@ fhandler_base::open_fs (int flags, mode_t mode) if (pc.has_buggy_open () && !pc.exists ()) { debug_printf ("Buggy open detected."); - close (); + close_fs (); set_errno (ENOENT); return 0; } diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 1827690dd..03eadd351 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -1391,9 +1391,6 @@ fhandler_socket::close () { int res = 0; - if (get_device () == FH_UNIX) - return fhandler_base::close (); - /* HACK to allow a graceful shutdown even if shutdown() hasn't been called by the application. Note that this isn't the ultimate solution but it helps in many cases. */ -- 2.43.5