2011-02-26 Corinna Vinschen * autoload.cc: Make autoloaded ntdll function non-optional. Ditto for secur32 functions, except for LsaRegisterLogonProcess. Change return value to ERROR_PROC_NOT_FOUND. Explain why. * sec_auth.cc (lsaauth): Handle ERROR_PROC_NOT_FOUND from call to LsaRegisterLogonProcess when generating the errno value. 2011-02-22 Corinna Vinschen * dcrt0.cc: Fix copyright dates. * winsup.h: Ditto. * syscalls.cc (_read): Move EXPORT_ALIAS to its rightful place. 2011-02-21 Christopher Faylor * cygwin.din: Mark __assert* and _abort as NOSIGFE. 2011-02-21 Corinna Vinschen * fhandler_socket (fhandler_socket::readv): Call recv_internal directly, rather than recvmsg. (fhandler_socket::writev): Call send_internal directly, rather than sendmsg. * net.cc (cygwin_recv): Call fhandler_socket::recvfrom directly, rather than cygwin_recvfrom. (cygwin_send): Call fhandler_socket::sendto directly, rather than cygwin_sendto. 2011-02-20 Christopher Faylor * fhandler.cc (fhandler_base_overlapped::close): Finish any pending I/O before closing. (fhandler_base_overlapped::wait_overlapped): Defensively zero bytes read. Add more info to debugging output. 2011-02-18 Christopher Faylor * dcrt0.cc (dll_crt0_1): Add a CYGHEAP_DEBUG conditional for debugging which allocates a lot of space at startup. 2011-02-18 Corinna Vinschen * cygwin.sc: Set alignment of .cygheap section to 64K. 2011-02-15 Corinna Vinschen * spawn.cc (spawn_guts): Only set PID_NOTCYGWIN in _P_OVERLAY mode. Drop flag if creating new process failed. 2011-02-15 Corinna Vinschen * Throughout fix copyright dates. 2011-02-15 Corinna Vinschen * devices.in: Throughout use slashes instead of backslashes in the native path of devices not backed by native NT devices. * devices.cc: Regenerate. * globals.cc (ro_u_pmem): Use correct case. (ro_u_globalroot): New R/O unicode string. * path.cc (path_conv::check): Fix incorrect handling of /proc/sys block devices if they are just visited due to a component check. (symlink_info::posixify): Fix typo in comment. (cygwin_conv_path): Use ro_u_globalroot instead of string constant. (fast_cwd_version): New shared variable to store FAST_CWD version used on the system. (find_fast_cwd_pointer): Rename from find_fast_cwd_pointers. Don't set global fast_cwd_ptr pointer here. Return pointer value instead. (find_fast_cwd): New function to set fast_cwd_ptr and fast_cwd_version. (cwdstuff::override_win32_cwd): Call find_fast_cwd from here. Check for fast_cwd_version to differ between old and new FAST_CWD structure. Check old_cwd for NULL to avoid SEGV. Don't set CWD if we have neitehr a valid fast_cwd_ptr, nor a valid CWD handle in the process parameter block. (cwdstuff::set): Create Win32 path taking /proc/sys paths into account. * spawn.cc (spawn_guts): Recode creating runpath. Also take /proc/sys paths into account. Drop special CWD handling when starting non-Cygwin processes. 2011-02-15 Corinna Vinschen * fhandler_procsys.cc (fhandler_procsys::opendir): Avoid SEGV if opening object directory fails. * fhandler_virtual.cc (fhandler_virtual::opendir): Don't leak memory. 2011-02-15 Corinna Vinschen * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't append slash if there is one already. 2011-02-15 Corinna Vinschen Revert change from 2010-08-31: * path.cc (normalize_posix_path): Drop support for //./ and //?/ prefixes. (path_conv::check): Ditto. 2011-02-15 Corinna Vinschen * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Use POSIX path to check for symlink. 2011-02-14 Corinna Vinschen * config/i386/profile.h: Sync with Mingw. 2011-02-13 Corinna Vinschen * path.cc (struct _FAST_CWD): Redefine to new layout used since patch for KB 2393802. Adjust comments throughout. (struct _FAST_CWD_OLD): Rename former definition. (cwdstuff::override_win32_cwd): Check if the OS is using the old or the new FAST_CWD structure layout and handle accordingly. 2011-02-11 Christopher Faylor * mkstatic: Make sure that we are not cd'ed to temporary directory on exit to avoid bogus warnings on directory cleanup. * speclib: Ditto. * mkimport: Ditto. 2011-02-11 Christopher Faylor * cygwin.sc: Eliminate __cygheap_mid. * cygheap.cc: Ditto. 2011-02-11 Christopher Faylor * cygheap.cc (_cygheap_mid): Drop unneeded section attribute. (cygheap_init): Just zero cygheap structure. * cygwin.sc: Keep 16 byte alignment but drop all other alignments related to cygheap. Eliminate unused __cygheap_end1. 2011-02-11 Corinna Vinschen * cygwin.sc: Raise default cygheap size to 1 Meg. Set alignment to standard 64K. 2011-02-11 Corinna Vinschen * include/endian.h: Move definitions of __BIG_ENDIAN, __LITTLE_ENDIAN, and __BYTE_ORDER into ... * include/bits/endian.h: New file. * include/arpa/nameser_compat.h: Include endian.h rather than defining BYTE_ORDER here. * include/asm/byteorder.h: Include bits/endian.h. Drop definition of __LITTLE_ENDIAN. * include/netinet/ip.h: Include bits/endian.h. Drop definitions of BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. Use underscored variants of aforementioned constants. * include/netinet/tcp.h: Ditto. * include/sys/param.h: Drop disabled definitions of BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER. * include/netinet/ip.h: Reformat. Define setsockopt IP_TOS options matching recent RFCs. Tweak comments. 2011-02-10 Eric Blake * errno.cc (includes): Avoid compilation failure if settles on wrong strerror_r signature. * errno.cc (__xpg_strerror_r): New function. (strerror_r): Update to copy newlib's fixes. (strerror): Set errno on failure. (_sys_errlist): Cause EINVAL failure for reserved values. * cygwin.din: Export new function. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Combine this into minor 236. 2011-02-09 Yaakov Selkowitz * cygwin.din (pthread_yield): Export as alias to sched_yield. * include/pthread.h (pthread_yield): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * posix.sgml (std-deprec): Add pthread_yield. 2011-02-09 Christopher Faylor * cygheap.cc: Add some __stdcall decoration where appropriate. * lib/cygwin_crt0.c: __attribute -> __attribute__. 2011-02-09 Christopher Faylor * hookapi.cc (hook_or_detect_cygwin): Prevent i from being considered uninitialized by gcc. 2011-02-09 Christopher Faylor * exception.h: Remove DEBUG_EXCEPTION left over debugging ifdef. 2011-02-08 Christopher Faylor * dll_init.cc: Fix typo in comment. 2011-02-07 Corinna Vinschen * configure.in: Remove AC_ALLOCA test and test for __builtin_memset. * configure: Regenerate. 2011-02-07 Corinna Vinschen * fhandler_console.cc (fhandler_console::write_normal): Remove erroneous premature return after collecting truncated multibyte sequence in trunc_buf. Rather fall through to printing routine. Fix return value to take trunc_buf content into account. Improve comments. 2011-02-05 Christopher Faylor * autoload.cc (wsock_init): Properly define WSAStartup function pointer to avoid stack damage. 2011-02-02 Corinna Vinschen * libc/bsdlib.cc: Include err.h. 2011-02-02 Eric Blake * include/err.h: Fix loss of semicolons in previous patch. 2011-02-02 Corinna Vinschen * include/err.h (err): Add noreturn attribute. (errx): Ditto. (verr): Ditto. (verrx): Ditto. 2011-02-02 Corinna Vinschen * path.cc (conv_path_list): Remove enclosing quotes and trailing backslashes from Win32 environment path lists. 2011-02-01 Christian Franke * fhandler.cc (fhandler_base::fsync): Ignore ERROR_INVALID_FUNCTION error from FlushFileBuffers(). 2011-01-31 Corinna Vinschen * syscalls.cc (utmp_data): Fix potential buffer overflow. 2011-01-31 Corinna Vinschen * fhandler_socket.cc (address_in_use): Improve comment readability. 2011-01-30 Corinna Vinschen * fhandler_socket.cc (address_in_use): Disable. Add comment. (fhandler_socket::bind): Change comment to explain setting the SO_EXCLUSIVEADDRUSE socket option. Remove code which checks for address in use. * net.cc (cygwin_setsockopt): Never set SO_REUSEADDR option. Improve comment to compensate for the deleted comment in fhandler_socket::bind. * wincap.cc: Throughout, drop has_enhanced_socket_security from wincaps. * wincap.h (struct wincaps): Drop has_enhanced_socket_security flags and method. 2011-01-28 Peter Foley * configure.in: Define LIBSERVER regardless of cross_host. * configure: Regenerate. 2011-01-28 Corinna Vinschen * fhandler_socket.cc (fhandler_socket::wait_for_events): Call pthread_testcancel in case of timeout to enable pthread_cancel on waiting thread. 2011-01-27 Corinna Vinschen * include/features.h (__STDC_ISO_10646__): Move to newlib's sys/features.h. 2011-01-26 Corinna Vinschen * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Fix computation of st_blocks. (fhandler_base::fstat_helper): Fix formatting. 2011-01-24 Corinna Vinschen * include/features.h (__STDC_ISO_10646__): Define. Add comment. 2011-01-21 Corinna Vinschen * syscalls.cc (rename): Fix permission problem with symlinks on NFS. Rework how NtOpenFile gets called to make it more readable. Change comment. 2011-01-20 Corinna Vinschen * exec.cc: Include pinfo.h. * winf.h: Move definitions of _P_PATH_TYPE_EXEC and _P_MODE from here... * pinfo.h: ...to here. (_P_PATH_TYPE_EXEC): Redefine to be bigger than _P_SYSTEM. (_P_MODE): Redefine so as not to mask out _P_SYSTEM. * spawn.cc (spawnlp): Add _P_PATH_TYPE_EXEC flag in call to spawnve. (spawnlpe): Ditto. (spawnvp): Ditto. 2011-01-19 Corinna Vinschen * spawn.cc (av::fixup): Reenable #! handling for all exec functions. Return ENOEXEC in !p_type_exec case only for unrecognized files. Fix comment formatting. 2011-01-19 Corinna Vinschen * exec.cc (execlp): Add missing _P_PATH_TYPE_EXEC flag in call to spawnve. 2011-01-19 Corinna Vinschen * exec.cc: Rearrange functions in alphabetical order. (_execve): Drop temporary define and drop export alias. (execl): Call spawnve. (execle): New function. (execlp): New function. (execv): Call spawnve. (execve): Drop converting NULL envp to emtpy envp. (execvp): Call spawnve. (execvpe): Drop converting NULL envp to emtpy envp. Call spawnve. (fexecve): Call spawnve. * spawn.cc (spawnve): Convert NULL envp to emtpy envp. Remove outdated comment. (spawnlp): Call spawnve. (spawnlpe): Ditto. (spawnvp): Ditto. (spawnvpe): Fix formatting. 2011-01-19 Corinna Vinschen * exec.cc (strccpy): Move function from here... * strfuncs.cc (strccpy): ...to here. * string.h (strccpy): Declare. * winsup.h (strccpy): Drop declaration. 2011-01-19 Corinna Vinschen * errno.cc (errmap): Add error codes for invalid binaries. * exec.cc (execvp): Call spawnve with _P_PATH_TYPE_EXEC flag from here. (execvpe): Ditto. * spawn.cc (spawn_guts): Filter _P_PATH_TYPE_EXEC from mode and store in p_type_exec. Call av::fixup with addtional p_type_exec argument. (spawnve): Check for filtered mode. (spawnvpe): Add _P_PATH_TYPE_EXEC flag when calling spawnve. (av::fixup): Accept additional bool parameter p_type_exec. Only check for script if p_type_exec is true. * winf.h (_P_PATH_TYPE_EXEC): Define. (_P_MODE): Define. (av::fixup): Declare with additional bool parameter. 2011-01-17 Corinna Vinschen * fhandler_proc.cc (format_proc_partitions): Fix compiler warning. 2011-01-17 Corinna Vinschen * path.cc (path_conv::check): Don't follow reparse point symlinks if PC_SYM_NOFOLLOW_REP flag is set. (cygwin_conv_path): Set PC_SYM_NOFOLLOW_REP flag when converting from POSIX to Win32. * path.h (enum pathconv_arg): Define PC_SYM_NOFOLLOW_REP flag. 2011-01-17 Corinna Vinschen * fhandler_proc.cc (proc_tab_cmp): Fix typo in comment. (fhandler_proc::fill_filebuf): Handle return value of 0 from format function as error. (format_proc_stat): Set errno when returning 0 size. (format_proc_partitions): Rewrite method to fetch partition info. 2011-01-13 Corinna Vinschen * fhandler_disk_file.cc (fhandler_base::fstat_helper): Always set st_size of directories to 0. Explain why. 2011-01-12 Corinna Vinschen * posix.sgml: Add madvise to BSD list. 2011-01-12 Corinna Vinschen * cygwin.din (madvise): Export posix_madvise as madvise. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR. * include/sys/mman.h: Define madvise constants, keep Linux-specific constants undefined. (madvise): Declare. 2011-01-12 Corinna Vinschen * fhandler.h (struct part_t): New type. (class fhandler_dev_floppy): Convert partitions to part_t pointer. Add lock_partition method. * fhandler_floppy.cc (fhandler_dev_floppy::lock_partition): New method to implement ondemand partition locking. (fhandler_dev_floppy::write_file): Call lock_partition from here if writing failed due to a potential write restriction on a disk partition. (fhandler_dev_floppy::open): Don't lock partitions here. (fhandler_dev_floppy::close): Keep track of partition handle reference count. Close handles and remove partitions pointer ony if count is 0. (fhandler_dev_floppy::dup): Just copy partitions pointer and increment reference count. 2011-01-11 Corinna Vinschen * fhandler.h (MAX_PARTITIONS): New definition. (class fhandler_dev_floppy): Add partitions array member. Add close method. * fhandler_floppy.cc (fhandler_dev_floppy::fhandler_dev_floppy): Zero out partitions array. (fhandler_dev_floppy::open): Fix "entire disk" condition for call to DeviceIoControl (FSCTL_ALLOW_EXTENDED_DASD_IO). When opening disks for writing, call DeviceIoControl (FSCTL_LOCK_VOLUME) on all affected disk partitions starting with Vista. (fhandler_dev_floppy::close): New method. (fhandler_dev_floppy::dup): Duplicate handles in partitions, if any. * wincap.h (wincaps::has_restricted_raw_disk_access): New element. * wincap.cc: Implement above element throughout. 2011-01-11 Yaakov Selkowitz * termios.cc (cfgetospeed, cfgetispeed): Constify argument per POSIX. * include/sys/termios.h (cfgetospeed, cfgetispeed): Declare functions. Move macros after declarations and make conditional on !__cplusplus. 2011-01-11 Corinna Vinschen * cygtls.cc (_cygtls::init_thread): Call _REENT_INIT_PTR. Drop setting current locale and calling srand48. 2011-01-02 Christopher Faylor * ChangeLog-2010: Create from ChangeLog. * ChangeLog: Start fresh.