+2009-12-22 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * select.cc (fhandler_fifo::select_read): Fill in device specific
+ record.
+ (fhandler_fifo::select_write): Ditto.
+ (fhandler_fifo::select_except): Ditto.
+
+2009-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (cygwin_conv_path): Add band-aid including comment to avoid
+ conversion from POSIX "." to Win32 ".\\".
+
+2009-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * exec.cc (execvp): Call find_exec with FE_NNF flag to enforce
+ a NULL return when executable isn't found in $PATH. Convert NULL
+ to "".
+ (execvpe): Ditto.
+ * spawn.cc (spawn_guts): Return with EFAULT if prog_arg is NULL.
+ Return with ENOENT if prog_arg is empty string. Add a comment.
+
+2009-12-21 Thomas Wolff <towo@towo.net>
+
+ * fhandler_console.cc (get_nonascii_key): Generate ESC prefix
+ for Alt modifier generically for function keys and keypad keys.
+ Distinguish Normal, Ctrl, Shift, Ctrl-Shift rather
+ than Normal, Ctrl, Shift, Alt, so that in combination with generic
+ Alt handling all 8 combinations of these modifiers are distinguished.
+ (keytable): Add escape sequences for remaining modified
+ function keys as a compatible extension using rxvt escape codes.
+ Also distinguish keypad keys modified with Ctrl, Shift, Ctrl-Shift
+ using xterm-style modifier coding.
+
+2009-12-21 Corinna Vinschen <corinna@vinschen.de>
+
+ Throughout, revert ill-conceived replacement of hMainThread with
+ GetCurrentThread/NtCurrentThread.
+ * dcrt0.cc (dll_crt0_0): Duplicate main thread handle to hMainThread
+ again.
+
+2009-12-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_console.cc (__vt100_conv): Minor formatting change.
+
+2009-12-19 Thomas Wolff <towo@towo.net>
+
+ * fhandler_console.cc (write_console): Check for VT100
+ graphics mode and transform wide characters in ASCII small
+ letter range to corresponding graphics.
+ (__vt100_conv): Table to transform small ASCII letters to line
+ drawing graphics for use in VT100 graphics mode.
+ (write_normal): Check for SO/SI control characters to
+ enable/disable VT100 graphics mode.
+ (base_chars): Enable SO/SI control characters for detection.
+ (write): Check for ESC ( 0 / ESC ( B escape sequences to
+ enable/disable VT100 graphics mode. Also detect ">" while
+ parsing ESC [ sequences to distinguish specific requests.
+ (char_command): Distinguish Secondary from Primary Device Attribute
+ request to report more details about cygwin console terminal version.
+ * fhandler.h (vt100_graphics_mode_active): New flag to indicate mode.
+ (saw_greater_than_sign): New parse flag for ESC [ > sequences.
+ (gotparen, gotrparen): New state values to parse ESC ( / ) sequences.
+
+ * fhandler_console.cc (read): Allow combined Alt-AltGr modifiers
+ to also produce an ESC prefix like a plain Alt modifier, e.g. to make
+ Alt-@ work on a keyboard where @ is AltGr-q.
+
+2009-12-18 Eric Blake <ebb9@byu.net>
+
+ * signal.cc (nanosleep): Fix bug in previous patch.
+
+2009-12-18 Corinna Vinschen <corinna@vinschen.de>
+
+ Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcess
+ according to context. Throughout, replace hMainThread with
+ GetCurrentThread/NtCurrentThread according to context.
+ * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to
+ hMainProc. Drop duplication of GetCurrentThread to hMainThread.
+ * dtable.cc (dtable::stdio_init): Remove useless comment.
+ * globals.cc (hMainProc): Remove.
+ (hMainThread): Remove.
+ * ntdll.h (NtCurrentProcess): Define.
+ (NtCurrentThread: Define.
+
+2009-12-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (fhandler_registry::value_name): Convert to wchar_t*.
+ * fhandler_registry.cc: Call UNICODE registry functions throughout
+ and convert to multibyte using current locale's charset. Accommodate
+ throughout.
+ (must_encode): Take wchar_t.
+ (encode_regname): Convert from wchar_t *.
+ (decode_regname): Convert to wchar_t *.
+
+2009-12-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.sgml (func-cygwin-conv-path): Clarify meaning of size parameter.
+ (func-cygwin-conv-path-list): Fix typo.
+ (func-cygwin-posix-path-list-p): Ditto.
+
+2009-12-17 Corinna Vinschen <corinna@vinschen.de>
+
+ * syscalls.cc (try_to_bin): Handle remote shares as well. Just rename
+ files in this case, instead of moving them to the recycler. Create
+ even more unique filename. Add comment to explain filename.
+ (unlink_nt): Remove code returning with EBUSY on remote shares.
+ Set bin_stat to move_to_bin except on NFS. Add comment to explain.
+
+2009-12-17 Eric Blake <ebb9@byu.net>
+
+ * signal.cc (nanosleep): Support 'infinite' sleep times.
+ (sleep): Avoid uninitialized memory.
+
+2009-12-16 Thomas Wolff <towo@towo.net>
+
+ * fhandler_console.cc (read): Detect and handle mouse wheel scrolling
+ events (for completion of mouse reporting mode 1000) and mouse
+ movement events (for additional mouse reporting modes 1002 and 1003).
+ Use mouse_aware() as a guard and only condition for mouse
+ reporting in order to enforce consistence of read() and select().
+ Add focus reports (for additional focus reporting mode 1004).
+ (mouse_aware): Enable detection of additional mouse events for select().
+ Tune function to precisely match actual reporting criteria.
+ Move adjustment of mouse position (by window scroll offset)
+ here to avoid duplicate code.
+ (char_command): Initialization of enhanced mouse reporting modes.
+ Initialization of focus reporting mode.
+ * fhandler.h (use_mouse): Change flag (bool->int) to indicate
+ additional mouse modes. Add flag to indicate focus reporting.
+ (mouse_aware): Move enhanced function into fhandler_console.cc.
+ * select.cc (peek_console): Use modified mouse_aware() for more
+ general detection of mouse events. Also check for focus reports.
+
+2009-12-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * registry.cc (cygnus_class): Remove.
+ (reg_key::build_reg): Don't set class when creating key.
+
+2009-12-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (cygwin_setsockopt): Only skip calling setsockopt(SO_REUSEADDR)
+ on stream sockets under systems supporting enhanced socket security.
+
+2009-12-15 Thomas Wolff <towo@towo.net>
+
+ * fhandler_console.cc (char_command): Fix code to select dim mode
+ to 2 rather than 9. Add entries for mode 22 (normal, not bold)
+ 28 (visible, not invisible), 25 (not blinking).
+
+2009-12-14 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/getopt.c (getopt_internal): Set optreset according to optind
+ setting earlier. Reevaluate POSIXLY_CORRECT if optreset is set to !0.
+ Handle a leading '-' in options independently of posixly_correct.
+
+2009-12-09 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after
+ it has been explicitly set.
+
+ * include/cygwin/version.h: Bump DLL minor version number to 2.
+
+2009-12-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * include/cygwin/version.h: Bump DLL minor version number to 1.
+
+2009-12-02 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (send_internal): Don't split datagram messages
+ into pieces.
+
+ * syslog.cc (vsyslog): Set default facility to LOG_USER if it hasn't
+ been set yet.
+
+2009-12-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_registry.cc (fhandler_registry::open): Mark /proc/registry
+ directory and siblings as nohandle fhandler.
+
+2009-11-30 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * speclib: Use last dll found since that's the real name of the cygwin
+ DLL.
+
+2009-11-27 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix typos in
+ comments. Always open file synchronized when reading header bytes,
+ otherwise suffer stack corruption.
+
+2009-11-26 Corinna Vinschen <corinna@vinschen.de>
+
+ * dtable.cc (dtable::stdio_init): Use GetCurrentProcess() rather than
+ hMainProc as process handle when duplicating the stdout handle.
+ Explain why. Add Win32 error code to debug output.
+
+2009-11-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add
+ socket handle value to debug output.
+ (fhandler_socket::fixup_after_fork): Ditto. Make new socket handle
+ OVERLAPPED, just as if it has been created with socket().
+ * net.cc (fdsock): Close duplicated socket and explain why. Disable
+ the entire WSADuplicateSocket test for now and explain why.
+
+2009-11-23 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_socket.cc (fhandler_socket::set_close_on_exec): Only call
+ fhandler_base::set_close_on_exec for inheritable sockets.
+
+2009-11-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * globals.cc (ro_u_dll): New R/O unicode string.
+ * syscalls.cc (nt_path_has_executable_suffix): Add ro_u_dll to
+ blessed_executable_suffixes array. Explain why.
+
+2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
+ original BSD code, but keep it in and documented why we can't use it.
+
+2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntea.cc (read_ea): Always add length of "user." prefix, not only
+ on Samba. Change comment.
+
+2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+
+ * ntea.cc (read_ea): Try to open file first to have more sensible
+ error codes. Always refuse non "user." EAs for Linux compatibility
+ and return EOPNOTSUPP. Fix handling of empty (== non-existant) EAs.
+ Always prepend "user." prefix to EA names.
+ (write_ea): Try to open file first to have more sensible error codes.
+ Always refuse non "user." EAs for Linux compatibility and return
+ EOPNOTSUPP. Delay skipping "user." prefix until after potential call
+ to read_ea.
+
+2009-11-17 Corinna Vinschen <corinna@vinschen.de>
+
+ Reintegrate socket duplication via WSADuplicateSocket/WSASocket.
+ * autoload.cc (WSADuplicateSocketW): Define.
+ (WSASocketW): Define.
+ * dtable.cc (dtable::release): Call dec_need_fixup_before if necessary.
+ (dtable::fixup_before_fork): New function.
+ (dtable::fixup_before_exec): New function.
+ * dtable.h (class dtable): Add member cnt_need_fixup_before. Add
+ declarations for above new functions.
+ (dtable::dec_need_fixup_before): New inline method.
+ (dtable::inc_need_fixup_before): New inline method.
+ (dtable::need_fixup_before): New inline method.
+ * fhandler.h (fhandler_base::fixup_before_fork_exec): New virtual
+ method.
+ (fhandler_base::need_fixup_before): New virtual method.
+ (class fhandler_socket): Add member prot_info_ptr.
+ (fhandler_socket::init_fixup_before): Declare.
+ (fhandler_socket::need_fixup_before): New inline method.
+ (fhandler_socket::fixup_before_fork_exec): Declare.
+ (fhandler_socket::fixup_after_exec): Declare.
+ * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
+ prot_info_ptr to NULL.
+ (fhandler_socket::~fhandler_socket): Free prot_info_ptr conditionally.
+ (fhandler_socket::init_fixup_before): New method.
+ (fhandler_socket::fixup_before_fork_exec): Ditto.
+ (fhandler_socket::fixup_after_fork): Use WSASocketW to duplicate
+ socket if necessary.
+ (fhandler_socket::fixup_after_exec): New method.
+ (fhandler_socket::dup): Use fixup_before_fork_exec/fixup_after_fork
+ to duplicate socket if necessary.
+ * fork.cc (frok::parent): Start child suspended if some fhandler
+ needs fixup before fork. If so, call dtable::fixup_before_fork after
+ CreateProcess and resume child.
+ * net.cc (fdsock): Try to find out if socket needs fixup before and
+ initialize socket accordingly. Add HUGE comment to explain what happens
+ and why.
+ * spawn.cc (spawn_guts): Start child suspended if some fhandler needs
+ fixup before exec. If so, call dtable::fixup_before_exec after
+ CreateProcess.
+
+2009-11-16 Eric Blake <ebb9@byu.net>
+
+ * environ.cc (setenv): Detect invalid argument.
+ (unsetenv): Distinguish EFAULT from EINVAL.
+
+2009-11-13 Corinna Vinschen <corinna@vinschen.de>
+
+ * net.cc (fdsock): Fill _rmem and _wmem with valid values returned
+ from getsockopt if setsockopt with desired values failed.
+
+2009-11-12 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
+ Corinna Vinschen <corinna@vinschen.de>
+
+ * sysconf.cc (get_nprocs): New function.
+ (get_nprocs_conf): Ditto.
+ (get_avphys_pages): Ditto.
+ (get_phys_pages): Ditto.
+ * cygwin.din: Export them.
+ * include/sys/sysinfo.h: New header, decalre above new functions.
+ * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
+ * posix.sgml: Mention them as GNU extensions.
+
+2009-11-11 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.h (class fhandler_mailslot): Declare new private method
+ get_object_attr.
+ * fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Implement.
+ (fhandler_mailslot::open): Replace calls to path_conv::get_object_attr
+ with calls to fhandler_mailslot::get_object_attr.
+
+2009-11-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_console.cc (fhandler_console::read): Revert change from
+ 2009-11-09.
+
+2009-11-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (is_volume_mountpoint): Align check with
+ symlink_info::check_reparse_point().
+ * path.cc (symlink_info::check_reparse_point): Rearrange slightly.
+ Add code path for unrecognized repare point types. Add comment.
+
+2009-11-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check_reparse_point): Always check
+ SubstituteName for volume string to recognize volume mount points.
+ Reuse subst when calling sys_wcstombs.
+ * syscalls.cc (rename): Set errno to EBUSY when trying to rename
+ volume mount points. Explain why.
+
+2009-11-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_console.cc (fhandler_console::read): Restrict generating
+ META key sequences to singlebyte input chars.
+
+2009-11-08 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop all "other"
+ permissions from st_mode, if the reading the file's security descriptor
+ failed. Explain why.
+
+2009-11-06 Corinna Vinschen <corinna@vinschen.de>
+
+ * globals.cc (ro_u_scr): New R/O unicode string.
+ (ro_u_sys): Ditto.
+ * syscalls.cc (nt_path_has_suffix): Replace with ...
+ (nt_path_has_executable_suffix): New function checking for explicit
+ executable suffixes.
+ (rename): Call nt_path_has_executable_suffix instead of
+ nt_path_has_suffix. Check oldpath for nt_path_has_executable_suffix
+ as well to set old_explicit_suffix.
+
2009-11-06 Corinna Vinschen <corinna@vinschen.de>
* shared.cc (inst_root_inited): New static bool variable.