DONT_RESOLVE_DLL_REFERENCES if a normal LoadLibrary call failed with
ERROR_INVALID_ADDRESS.
(LsaRegisterLogonProcess): Align comment to previous change.
to LoadDLLprime.
(LoadDLLprime): Take an extra argument indicating whether this dll needs
special handling on fork. Place this information in the "handle" location.
(LoadDLLfuncEx3): Eliminate "func" handling. Pass new no_resolve_on_fork
argument to LoadDLLprime.
(dll_load): New function.
(std_dll_init): Accommodate changes to dll_info::handle. Use dll_load to load
DLL in both cases where it is used.
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.
* 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.
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.
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.
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.
(cygheap_init): Just zero cygheap structure.
* cygwin.sc: Keep 16 byte alignment but drop all other alignments related to
cygheap. Eliminate unused __cygheap_end1.
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.
* 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.
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.
(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.
* 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.
* 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.
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.
(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.
(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.
(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.
with the tls.
* pinfo.cc (status_exit): Add debug output to report on unexpected exit.
* tls_pbuf.cc (tmp_pathbuf::c_get): Add more details to internal error.
* net.cc (get_flags): Set IFF_NOARP flag for PPP and SLIP devices.
(get_xp_ifs): Unify IFF_BROADCAST setting. Drop calling SendARP to
set IFF_NOARP flag.
(FS_IS_NETAPP_DATAONTAP): Drop test for FILE_PERSISTENT_ACLS.
(fs_info::update): Set filetype to ntfs in remote case, too. Fix a
couple of comments. Add test for Netapps faking to be FAT.
* mount.h (IMPLEMENT_FS_FLAG): Simplify definition and usage.
standard macro.
(lcl_is_set): Define as an enum.
(tzsetwall): Assign lcl_is_set to correct enum values.
(tzset): Ditto. Copy as much of TZ as will fit to TZ buffer.
closed since an fd may rely on a thread.
* fhandler_tty.cc: Reformat comment.
(fhandler_pty_master::pty_master_thread): Refuse ERROR_PIPE_CONNECTED state as
an error.
* globals.cc (exit_states): Reorder ES_THREADTERM.
* path.cc (find_fast_cwd_pointers): Remove excessively wordy DEBUGGING output.