* uinfo.cc (pwdgrp::fetch_account_from_windows): Add code to allow
	setting the primary group from the SAM comment field.
	* cygheap.cc (cwcsdup): Change parameter to correct PWCSTR.
	(cwcsdup1): Ditto.
	* cygheap_malloc.h: Change declarations accordingly.
	* uinfo.cc (cygheap_domain_info::init): Fix handling of account domain
	on donmain controllers.  Explain why.
	* uinfo.cc (cygheap_domain_info::init): Drop accidentally leftover if
	statement.
* winsup.h (Interlocked*): Use intrinsic versions of Interlocked functions.
* cygwin.sc.in: More closely emulate default pe/i386 linker script.
	* autoload.cc (NetLocalGroupGetInfo): Replace NetGroupGetInfo.
	* cygheap.h (class cygheap_ugid_cache): Move ugid_cache_t type here
	and rename.
	(struct init_cygheap): Add cygheap_ugid_cache member "ugid_cache".
	* pwdgrp.h (class ugid_cache_t): Remove here.
	* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Accommodate
	move of ugid_cache to cygheap.
	* sec_helper.cc (get_sids_info): Ditto.
	* uinfo.cc (ugid_cache): Remove.
	(pwdgrp::fetch_account_from_windows): Define id_val globally.
	Move SidTypeAlias handling into SidTypeUser/SidTypeGroup branch since
	aliases are handled like groups in SAM.  Accommodate move of ugid_cache
	to cygheap.  Consolidate code reading SAM comments into a single branch
	for both, SidTypeUser and SidTypeAlias.  For SidTypeAlias, fix thinko
	and call NetLocalGroupGetInfo rather than NetGroupGetInfo.  Simplify
	code setting Cygwin primary group for SAM accounts.  Add code to handle
	UNIX uid/gid from SAM comment.
	* ldap.cc (rediscover_thread): Give argument a useful name.
	* miscfuncs.cc (NT_readline::init): It's a really bad idea trying to
	print a pointer to a PUNICODE_STRING as PUNICODE_STRING.  Fix it.
	* uinfo.cc (cygheap_domain_info::init): Print status codes as hex
	values in debug output.
* winsup.h: Turn off previous workaround but leave a comment.
2014-02-11  Joey Ye  <joey.ye@arm.com>

        * libc/sys/arm/syscalls.c (_sbrk): Define as weak symbols.
        (_read, _write): Ditto.