* cygtls.h (class tls_pathbuf): Move counter variables into a union.
Add 64 bit element _counters covering both counter variables to
optimize save and restore operations.
(class san/x86_64): Only store single 64 bit value.
(san::san/x86_64): Implement.
(san::leave/x86_64): Only declare here, as returns_twice function.
Explain why.
(class san/i686): Change type of _c_cnt and _w_cnt to uint32_t.
(__try/x86_64): Move definition of __sebastian after the first memory
barrier. Drop __sebastian.setup call.
handler.
* cygtls.cc (_cygtls::remove): Accommodate the fact that pathbufs
has been moved from _local_storage to _cygtls.
* cygtls.h (class tls_pathbuf): Add comment to hint to gendef usage
of counters. Change type of counters to uint32_t for clarity.
Remove _cygtls as friend class.
(struct _local_storage): Move pathbufs from here...
(struct _cygtls): ...to here, allowing to access it from _sigbe.
(class san): Only define on 32 bit. Remove errno, _c_cnt and _w_cnt
members.
(san::setup): Drop parameter. Don't initialize removed members.
(san::leave): Don't set removed members.
(class myfault): Only define on 32 bit.
(myfault::faulted): Only keep implementation not taking any parameter.
Drop argument in call to sebastian.setup.
(__try/__leave/__except/__endtry): Implement to support real SEH. For
now stick to SJLJ on 32 bit.
* dcrt0.cc (dll_crt0_0): Drop 64 bit call to
exception::install_myfault_handler.
* exception.h (exception_handler): Define with EXCEPTION_DISPOSITION
as return type.
(PDISPATCHER_CONTEXT): Define as void * on 32 bit. Define as pointer
to _DISPATCHER_CONTEXT on 64 bit.
(class exception): Define separately for 32 and 64 bit.
(exception::myfault): Add handler for myfault SEH handling on 64 bit.
(exception::exception): Fix mangled method name to account for change
in type of last parameter.
(exception::install_myfault_handler): Remove.
* exceptions.cc (exception::myfault_handle): Remove.
(exception::myfault): New SEH handler for 64 bit.
* gendef (_sigbe): Set tls_pathbuf counters to 0 explicitely when
returning to the caller.
* ntdll.h: Move a comment to a better place.
(struct _SCOPE_TABLE): Define on 64 bit.
* thread.cc (verifyable_object_isvalid): Remove gcc 4.7 workaround.
* tls_pbuf.cc (tls_pbuf): Fix to accommodate new place of pathbufs.
(tls_pathbuf::destroy): Change type of loop variables to uint32_t.
* tls_pbuf.h (class tmp_pathbuf): Change type of buffer counters to
uint32_t. Accommodate new place of pathbufs.
* tlsoffsets.h: Regenerate.
* tlsoffsets64.h: Regenerate.
(telldir): Per POSIX, return -1 and set errno to EBADF, rather than
just returning 0, on invalid directory stream.
* signal.cc (sigwaitinfo): Return -1, not EFAULT, when SEGV was catched.
(class fhandler_socket): Grant another bit to connect_state flag.
* fhandler_socket.cc (fhandler_socket::af_local_connect): Rearrange
variable definition. Set connect_state to connect_credxchg.
(fhandler_socket::af_local_accept): Ditto.
(fhandler_socket::recv_internal): Accept connect_credxchg on connection
oriented AF_LOCAL sockets as well to allow the credential exchange.
Extend comment to explain.
* dcrt0.cc (initial_env): Drop strlwr calls. Call strcasestr instead.
* fhandler_netdrive.cc: Throughout, convert to calling WNet UNICODE
functions. Use tmp_pathbuf rather than alloca. Replace call to
strlwr with call to RtlDowncaseUnicodeString.
handles are kernel objects since Windows 8.
* fhandler.h (enum conn_state): Add "listener" state.
(class fhandler_socket): Drop listener status flag.
(fhandler_socket::lseek): Return -1 and errno ESPIPE.
(fhandler_serial::lseek): Ditto.
* fhandler_socket.cc (fhandler_socket::listen): Set connect_state to
listener. Add comment.
(fhandler_socket::accept4): Explicitely check if the socket is listening
and fail with EINVAL, if not. Explain why we have to do that.
(fhandler_socket::recv_internal): Explicitely check if the socket is
connected if it's a stream socket. Explain why we have to do that.
(fhandler_socket::getpeereid): Drop now redundant test.
appropriate.
(DBXDIRS): Remove.
(XSLTPROC): Define for symmetry. Use throughout.
(clean): Drop removing cygwin-api.xml and doctool.*.
(cygwin-api.xml): Drop rule.
(doctool): Drop rule.
(Makefile.dep): Add dependency to cygwin-api.xml.
* cygwin-api.in.xml: Rename to cygwin-api.xml. Convert includes to
XML XInclude style.
* doctool.c: Remove.
* doctool.txt: Remove.
* faq-programming.xml: Drop reference to local utils.xml file.
* path.xml: Moved from ../cygwin and converted to XML.
* posix.xml: Ditto.
* using.xml: Drop relative path from utils.xml include.
* utils.xml: Moved from ../utils.
instead of unsigned throughout. Change functions to static inline and
always inline.
(cpuid): Add parameter to set ecx, allowing to request extended CPUID
info.
* fhandler_proc.cc (format_proc_cpuinfo): Use uint32_t instead of
unsigned throughout. Add fake decimal places to MHz info. Handle more
feature flags.
* fhandler_random.cc (fhandler_dev_random::write): Allow up to 4K
input to add entropy.
* syscalls.cc: Drop including cpuid.h.
* dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit.
* dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for
__cxa_finalize as well.
as naming style. Drop enum name_style_t, use a boolean
"fully_qualified_name" value instead. Rework function to drop
"plus_prepended" handling througout and default to "name only" style
as replacement.
As pointed out here:
https://cygwin.com/ml/cygwin/2014-07/msg00371.html
any use of __attribute__ in a header that can be included by a user
should be namespace-safe, by decorating the attribute arguments with __
(while gcc does a lousy job at documenting it, ALL attributes have a __
counterpart, precisely so that public headers can use attributes without
risk of collision with macros belonging to user namespace).
* include/pthread.h: Decorate attribute names with __, for
namespace safety.
* include/cygwin/core_dump.h: Likewise.
* include/cygwin/cygwin_dll.h: Likewise.
* include/sys/cygwin.h: Likewise.
* include/sys/strace.h: Likewise.
* new-features.xml: (ov-new1.7.32): Add new section.
* ntsec.xml: Rename top-level section to reflect extension of topics.
Remove old /etc/passwd, /etc/group considerations. Add new sections
explaining Windows to POSIX account mapping. Make setuid sections
third level sections.
* pathnames.xml: Note new method of account mapping for fstab.d/$USER.
* faq-setup.xml: Rework references to /etc/passwd and /etc/group to
reflect changes to account handling.
* faq-using.xml: Ditto.
* ldap.cc (cyg_ldap::fetch_posix_offset_for_domain): Return UINT32_MAX
in case of error.
* security.h (PRIMARY_POSIX_OFFSET): Define.
(NOACCESS_POSIX_OFFSET): Define.
(UNUSABLE_POSIX_OFFSET): Define.
* uinfo.cc (cygheap_domain_info::init): Drop initializing
lowest_tdo_posix_offset.
(pwdgrp::fetch_account_from_file): Set PosixOffset to either
UNUSABLE_POSIX_OFFSET or NOACCESS_POSIX_OFFSET in case we don't get a
sensible offset from AD. Explain why. Drop setting ch
lowest_tdo_posix_offset.
(pwdgrp::fetch_account_from_windows): Replace constant 0x100000 with
PRIMARY_POSIX_OFFSET throughout.