+2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * cygwin.din (pthread_attr_getstack): Export.
+ (pthread_attr_getstackaddr): Export.
+ (pthread_getattr_np): Export.
+ * ntdll.h (enum _THREAD_INFORMATION_CLASS): Add ThreadBasicInformation.
+ (struct _THREAD_BASIC_INFORMATION): Define.
+ (NtQueryInformationThread): Declare.
+ * posix.sgml (std-susv4): Add pthread_attr_getstack.
+ (std-gnu): Add pthread_getattr_np.
+ (std-deprec): Add pthread_attr_getstackaddr.
+ (std-notimpl): Remove pthread_attr_[gs]etstackaddr, as they were
+ removed from SUSv4.
+ * thread.cc (pthread_attr::pthread_attr): Initialize stackaddr.
+ (pthread_attr_getstack): New function.
+ (pthread_attr_getstackaddr): New function.
+ (pthread_attr_setstacksize): Return EINVAL if passed size less than
+ PTHREAD_STACK_MIN, as required by POSIX.
+ (pthread_getattr_np): New function.
+ * thread.h (class pthread_attr): Add stackaddr member.
+ * include/pthread.h (pthread_attr_getstack): Declare.
+ (pthread_attr_getstackaddr): Declare unconditionally.
+ (pthread_attr_setstack): Declare inside false conditional for reference.
+ (pthread_getattr_np): Declare.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+
+2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * Makefile.in: Allow CFLAGS to be overridden from the environment.
+
+2011-05-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc (cancelable_wait): Remove test for main thread.
+ * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto.
+
+2011-05-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_tty.cc (andler_pty_master::process_slave_output): Make
+ interruptible and cancelable. Fix nonblocking case.
+
+2011-05-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_console.cc (fhandler_console::read): Make restartable and
+ cancelable.
+
+2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * strace.cc (strace::vprntf): Avoid closing unopened handle.
+
+2011-05-02 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+
+ * sysconf.cc (sca): Set _SC_SPIN_LOCKS to _POSIX_SPIN_LOCKS.
+
+2011-05-02 Christopher Faylor <me.cygwin2011@cgf.cx>
+
+ * dll_init.cc (dll_list::alloc): Reset 'p' in forked process.
+
+ * select.cc (select_stuff::wait): Move cleanup() closer to WFMO to
+ minimize unavoidable (?) race.
+
+2011-05-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_serial.cc (fhandler_serial::raw_read): Add restartability
+ after a signal. Add cancelability.
+ (fhandler_serial::raw_write): Wait for write to succeed if O_NONBLOCK
+ is not set. Add signal handling and cancelability.
+
+2011-05-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_windows.cc (fhandler_windows::read): Use
+ pthread::get_cancel_event to fetch thread's cancel event.
+ * flock.cc (lf_setlock): Ditto.
+ * posix_ipc.cc (ipc_cond_timedwait): Ditto.
+ * thread.cc (pthread::get_cancel_event): New static method.
+ * thread.h (pthread::get_cancel_event): Declare.
+
+2011-05-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/minires-os-if.c (get_dns_info): Remove unnecessary test for
+ existence of DnsQuery_A.
+
+2011-05-01 Corinna Vinschen <corinna@vinschen.de>
+
+ Throughout, use user32 UNICODE functions rather than ANSI functions.
+ * autoload.cc: Convert all definitions for ANSI user32 functions to
+ definitions for the corresponding UNICODE function.
+ (SendMessageA): Remove.
+ (SendNotifyMessageW): Define.
+ * fhandler.h (fhandler_windows::is_slow): Remove.
+ * fhandler_windows.cc (fhandler_windows::write): Use SendNotifyMessageW
+ call rather than SendMessage to make function always return immediately.
+ (fhandler_windows::read): Make function interruptible and a cancellation
+ point. Handle O_NONBLOCK.
+ * select.cc (peek_serial): Don't wait for signal_arrived here.
+ * window.cc (wininfo::winthread): Call CreateWindowExW directly rather
+ than CreateWindow wrapper.
+
+2011-05-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (fdsock): Drop setting uninterruptible_io to true.
+
+2011-05-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_socket::is_slow): Remove.
+
+2011-04-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * fcntl.cc (fcntl64): Call pthread_testcancel.
+ * fhandler_socket.cc (fhandler_socket::connect): Ditto.
+ (fhandler_socket::accept4): Ditto.
+ (fhandler_socket::recvfrom): Ditto.
+ (fhandler_socket::recvmsg): Ditto.
+ (fhandler_socket::sendto): Ditto.
+ (fhandler_socket::sendmsg): Ditto.
+ * flock.cc (lf_setlock): Allow to cancel thread running blocking
+ file lock. Try to make code more readable.
+ (lockf): Call pthread_testcancel.
+ * mmap.cc (msync): Ditto.
+ * posix_ipc.cc (ipc_cond_timedwait): Call pthread::static_cancel_self
+ rather than pthread_testcancel.
+ * select.cc (cygwin_select): Call pthread_testcancel.
+ * syscalls.cc (pread): Ditto.
+ (pwrite): Ditto.
+ (readv): Ditto.
+ (writev): Ditto.
+ (open): Ditto.
+ (close): Ditto.
+ (fsync): Ditto.
+ * termios.cc (tcdrain): Ditto.
+ * thread.cc: Align list of cancellation points with above changes.
+ Mark not-implemented functions, too.
+ (cancelable_wait): Don't set unused object indices to WAIT_FAILED
+ since that could result in wrong behaviour. Set them to the invalid
+ value WAIT_TIMEOUT + 1 instead.
+
+2011-04-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.h (class pthread): Add bool member canceled.
+ * thread.cc (pthread::pthread): Initialize canceled to false.
+ (pthread::cancel): Set canceled before setting cancel_event.
+ (pthread::testcancel): Check for canceled. Only wait for cancel_event
+ if canceled is true. Explain why.
+ (pthread::_fixup_after_fork): Set canceled to false.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * errno.cc (errmap): Sort. Map ERROR_EXE_MACHINE_TYPE_MISMATCH to
+ ENOEXEC.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * thread.cc: Update comment listing cancellation points per POSIX.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc: Add comment.
+ (EqualSid): Remove.
+ (CopySid): Remove.
+ (AddAccessAllowedAce): Remove.
+ (AddAccessDeniedAce): Remove.
+ (MakeSelfRelativeSD): Remove.
+ * flock.cc: Replace above functions throughout with their ntdll.dll
+ equivalent.
+ * sec_acl.cc: Ditto.
+ * sec_auth.cc: Ditto.
+ * sec_helper.cc: Ditto.
+ * security.cc: Ditto.
+ * security.h: Ditto.
+ (RtlEqualSid): Declare. Explain why.
+ (RtlCopySid): Ditto.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (AccessCheck): Remove.
+ (PrivilegeCheck): Remove.
+ (OpenThreadToken): Remove.
+ * fhandler_tty.cc: Replace above functions throughout with their
+ ntdll.dll equivalent.
+ * security.cc: Ditto.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntdll.h (IsEventSignalled): New inline function.
+ * cygthread.cc (cygthread::terminate_thread): Use IsEventSignalled in
+ place of WaitForSingleObject on event with 0 timeout.
+ * fhandler.cc (fhandler_base_overlapped::has_ongoing_io): Ditto.
+ * fhandler_fifo.cc (fhandler_fifo::open_nonserver): Ditto.
+ (fhandler_fifo::wait): Ditto.
+ * fhandler_termios.cc (fhandler_termios::bg_check): Ditto.
+ * select.cc (verify_tty_slave): Ditto.
+ * thread.cc (pthread::testcancel): Ditto.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (GetTokenInformation): Remove.
+ (SetTokenInformation): Remove.
+ * grp.cc: Replace above functions throughout with their ntdll.dll
+ equivalent.
+ * sec_auth.cc: Ditto.
+ * syscalls.cc: Ditto.
+ * uinfo.cc: Ditto.
+
+2011-04-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix_ipc.cc (ipc_cond_timedwait): Only wait for pthread's
+ cancel_event if thread's cancelability isn't disabled.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (SetSecurityDescriptorDacl): Remove.
+ (SetSecurityDescriptorGroup): Remove.
+ (SetSecurityDescriptorOwner): Remove.
+ * pinfo.cc: Replace above functions throughout with their ntdll.dll
+ equivalent.
+ * sec_acl.cc: Ditto.
+ * sec_helper.cc: Ditto.
+ * security.cc: Ditto.
+
+ * sec_helper.cc (__sec_user): Remove old comment.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix_ipc.cc (ipc_cond_timedwait): Also wait for pthread's
+ cancel_event, if any. Call pthread_testcancel if cancel_event has been
+ signalled.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * posix_ipc.cc (ipc_cond_timedwait): Remove pthread_testcancel calls.
+ (_mq_send): Add pthread_testcancel call at start of function.
+ (_mq_receive): Ditto.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygerrno.h (geterrno_from_nt_status): Declare.
+ * errno.cc (geterrno_from_nt_status): Define.
+ * flock.cc: Fix copyright dates.
+ * ntdll.h (enum _TIMER_TYPE): Define.
+ (PTIMER_APC_ROUTINE): Define.
+ (NtCancelTimer): Declare.
+ (NtCreateTimer): Declare.
+ (NtSetTimer): Declare.
+ * posix_ipc.cc (ipc_cond_timedwait): Rewrite to make interruptible and
+ restartable. Call pthread_testcancel in case of timeout to enable
+ pthread_cancel on waiting thread. Replace WFMO timeout with waiting
+ for a waitable timer. Explain why. Replace single call to WFMO with
+ two calls, one for the event, one for the mutex. Don't lock mutex in
+ case of error.
+ (ipc_cond_signal): Make void function.
+ (ipc_cond_close): Ditto.
+ (_mq_send): Immediately return -1 in case of error from
+ ipc_cond_timedwait.
+ (_mq_receive): Ditto.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (GetSecurityDescriptorDacl): Remove.
+ (GetSecurityDescriptorGroup): Remove.
+ (GetSecurityDescriptorOwner): Remove.
+ * sec_acl.cc: Replace above functions throughout with their ntdll.dll
+ equivalent. Remove redundant debug output.
+ * sec_auth.cc: Ditto.
+ * security.cc: Ditto.
+ * uinfo.cc: Ditto.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (InitializeAcl): Remove.
+ (AddAce): Remove.
+ (FindFirstFreeAce): Remove.
+ (GetAce): Remove.
+ (InitializeSecurityDescriptor): Remove.
+ (OpenProcessToken): Remove.
+ * dcrt0.cc: Replace above functions throughout with their ntdll.dll
+ equivalent.
+ * fhandler_tty.cc: Ditto.
+ * flock.cc: Ditto.
+ * pinfo.cc: Ditto. Drop unnecessary error handling.
+ * sec_acl.cc: Ditto.
+ * sec_auth.cc: Ditto.
+ * sec_helper.cc: Ditto.
+ * security.cc: Ditto.
+
+2011-04-28 Corinna Vinschen <corinna@vinschen.de>
+
+ * advapi32.cc (InitializeSid): Remove.
+ (EqualPrefixSid): Remove.
+ (GetLengthSid): Remove.
+ (GetSidSubAuthority): Remove.
+ (GetSidSubAuthorityCount): Remove.
+ (GetSidIdentifierAuthority): Remove.
+ * fhandler_disk_file.cc: Replace above functions throughout with their
+ ntdll.dll equivalent.
+ * sec_auth.cc: Ditto.
+ * sec_helper.cc: Ditto.
+ * security.cc: Ditto.
+
2011-04-28 Corinna Vinschen <corinna@vinschen.de>
* advapi32.cc (AllocateLocallyUniqueId): Remove.