* 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.
This commit is contained in:
Corinna Vinschen
2005-02-22 15:30:09 +00:00
parent 2f707783a2
commit a62f6b806e
5 changed files with 18 additions and 1 deletions

View File

@ -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 ()))