* 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:
@ -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 ()))
|
||||
|
Reference in New Issue
Block a user