From a998dd705576606f85e3598e5a38ea8d3805f798 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 24 Mar 2008 14:48:58 +0000 Subject: * fhandler.cc (fhandler_base::dup): Drop setting flags in the parent. Implement advisory file locking. * cygheap.h (struct init_cygheap): Add inode_list member. * cygwin.din (lockf): Export. * dcrt0.cc (child_info_spawn::handle_spawn): Call fixup_lockf_after_exec. * dtable.h (class dtable): Add fhandler_disk_file as friend class. * fhandler.cc (fhandler_base::close): Call del_my_locks if node is set. (fhandler_base::fhandler_base): Initialize node to NULL. (fhandler_base::fixup_after_fork): Ditto. * fhandler.h (class fhandler_base): Add member node. * fhandler_disk_file.cc (fhandler_disk_file::lock): Delete. * flock.cc: Implement all advisory file locking here. (fhandler_disk_file::lock): Implement here. (flock): Call fcntl with F_FLOCK bit set. Remove test main function. (lockf): New function. * fork.cc (frok::child): Call fixup_lockf_after_fork. * ntdll.h (DIRECTORY_ALL_ACCESS): Define. (struct _OBJECT_BASIC_INFORMATION): Define. (enum _EVENT_TYPE): Define. (NtCreateDirectoryObject): Declare. (NtCreateEvent): Declare. (NtCreateMutant): Declare. (NtOpenEvent): Declare. (NtOpenMutant): Declare. * include/cygwin/version.h: Bump API minor number. --- winsup/cygwin/include/cygwin/version.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/include') diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index afad4beba..cb4282455 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -324,12 +324,13 @@ details. */ flistxattr, setxattr, lsetxattr, fsetxattr, removexattr, lremovexattr, fremovexattr. 181: Export cygwin_conv_path, cygwin_create_path, cygwin_conv_path_list. + 182: Export lockf. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 181 +#define CYGWIN_VERSION_API_MINOR 182 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible -- cgit v1.2.3