From a62f6b806ebe83a6158133084d7ce104e0e2fa62 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 22 Feb 2005 15:30:09 +0000 Subject: * cygwin.din (fdatasync): Export. * fhandler.cc (fhandler_base::fsync): Return with EINVAL if no handle is available. * syscalls.cc (fdatasync): Create export alias to fsync. * include/cygwin/version.h: Bump API minor version. --- winsup/cygwin/fhandler.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index e4089d64f..70cd4dbad 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1627,6 +1627,11 @@ fhandler_base::utimes (const struct timeval *tvp) int fhandler_base::fsync () { + if (!get_handle () || nohandle ()) + { + set_errno (EINVAL); + return -1; + } if (pc.isdir ()) /* Just succeed. */ return 0; if (FlushFileBuffers (get_handle ())) -- cgit v1.2.3