* Makefile.in (clean): Remove non-existant regexp dir.

	* collate.h: New header.
	(__collate_range_cmp): Declare.
	(__collate_load_error): Define.
	* glob.cc: Pull in latest version from FreeBSD.  Simplify and reduce
	Cygwin-specific changes.
	* regex/regcomp.c: Include collate.h on Cygwin as well.
	(__collate_range_cmp): Move from here...
	* nlsfuncs.cc (__collate_range_cmp): ...to here.

	* miscfuncs.cc (thread_wrapper): Fix typo in comment.
	(CygwinCreateThread): Take dead zone of Windows stack into account.
	Change the way how the stack is commited and how to handle guardpages.
	Explain how and why.
	* thread.h (PTHREAD_DEFAULT_STACKSIZE): Change definition.  Explain why.
	* miscfuncs.cc (struct thread_wrapper_arg): Convert char * to PBYTE.
	Change related casts throughout.
	(thread_wrapper): Only do the thread change if the application provided
	the stack.  Otherwise, just use the Windows-provided stack.  Set up
	POSIX guardpage here, if necessary.  Move related comment from
	CygwinCreateThread here.
	(CygwinCreateThread): Never allocate and set up own stack here.  Just
	compute stack size to reserve and use value in CreateThread call if
	stack hasn't been provided by the application.
	* thread.cc: Drop including unused headers.
	* cygheap.cc (init_cygheap::init_installation_root): Convert function
	init_installation_root into a cygheap method.
	* cygheap.h (struct init_cygheap): Move installation_root,
	installation_key, and installation_key_buf from shared
	.cygwin_dll_common DLL section to cygheap.  Declare new method
	init_installation_root.
	* dtable.cc (handle_to_fn): Accommodate the move of installation strings
	to the cygheap.
	* external.cc (cygwin_internal): Ditto.
	* fhandler_console.cc (fhandler_console::open_shared_console): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::get_object_attr): Ditto.
	* fhandler_tty.cc: Ditto, throughout.
	* mount.cc (mount_info::init): Ditto.
	* pipe.cc (fhandler_pipe::create): Ditto.
	* shared.cc: Ditto, throughout.
	(installation_root): Remove.
	(installation_key): Move to cygheap.
	(installation_key_buf): Ditto.
	(installation_root_inited): Remove.
	(SPIN_WAIT): Remove.
	(init_installation_root): Move to cygheap.
	(memory_init): Call cygheap->init_installation_root right after
	cygheap->user.init.  Drop call of init_installation_root function.
	* shared_info.h (init_installation_root): Drop declaration.
	(installation_root): Ditto.
	(installation_key): Ditto.
	* uinfo.cc (pwdgrp::load): Accommodate the move of installation strings
	to the cygheap.
	* flock.cc (lf_setlock): Don't close waited lock object handle before
	we own the node lock.  Fix comment.
	* transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
	Always use cygwin_internal to fetch installation key.
	* fhandler_disk_file.cc (fhandler_cygdrive::fstat): Don't bother to
	set st_nlink correctly, just set it to 1 to avoid potential network
	timeouts.
* pinfo.cc (_pinfo::set_ctty): Revert 2012-02-07 change to skip function if tty
in question == our ctty.
* syscalls.cc (setsid): Avoid two function calls.
* dtable.cc (dtable::dup_worker): Remove debugging.
* init.cc (search_for): Calculate for every new process rather than using
shared value.
(threadfunc_ix): Fill in for ever new process rather than sing shared value.
.
	* flock.cc (lf_setlock): Add timeout variable and set before calling
	WFMO.  Drop debug output if process is not available.  Set timeout to
	0 instead.  Document timeout 0 in WFMO comment.
	(lf_getblock): Drop invalid F_POSIX lock type shortcut.  Only return
	overlap if event is not signalled.  Fix comment.
* smallprint.cc (tmpbuf): Declare new class holding a static buffer, protected
by a lock.
(__small_vsprintf): Use tmpbuf to hold large buffer.
(__small_vswprintf): Ditto.
	* dtable.cc (dtable::init_std_file_from_handle): Use tmp_pathbuf for
	name.
	(handle_to_fn): Ditto for device.  Fix size in QueryDosDeviceW call.
	* miscfuncs.cc: Revert change from 2012-02-13 which used the
	Windows-provided stack rather than an own stack created in
	CygwinCreateThread.
	(struct thread_wrapper_arg): Rename commitsize to stacklimit.
	(CygwinCreateThread): Rename commitsize to real_stacklimit.
	* autoload.cc (NetUseGetInfo): Define.
	* fhandler_disk_file.cc (fhandler_cygdrive::opendir): Rename flptst
	to drive.  Call new get_disk_type function rather than is_floppy and
	check SMB drives with the NetUseGetInfo function.  Explain why.
	* mount.cc (get_disk_type): New function to evaluate disk type from
	native NT device name.
	(is_floppy): Remove.
	* mount.h (enum disk_type): Define.
	(get_disk_type): Declare.
	* path.h (is_floppy): Drop declaration.
*** empty log message ***
	* mount.cc (get_disk_type): Drop unneeded toupper call.  Convert case
	constants to wide chars.
	* ntdll.h (struct _PEB): Add EnvironmentUpdateCount member.
	* spawn.cc (child_info_spawn::worker): Speed up job recognition.  Expand
	comment to explain every little detail and so we never forget.
	* wincap.h (wincaps::has_program_compatibility_assitant): New element.
	* wincap.cc: Implement above element throughout.
	* timer.cc (getitimer): Don't create another local ret variable in
	timer_gettime calling branch.  Simplify conditional since timer_gettime
	always returns 0 or -1 anyway.
	* flock.cc (inode_t::del_my_locks): Drop useless counter lc.  Close
	lock object handle explicitely in case of called during fork.  Add
	comment to explain why.
	* fork.cc (frok::child): Drop declaration of fixup_lockf_after_fork.
	* faq-using.xml (faq.using.bloda): Add AVAST and Citrix Metaframe
	Presentation Server.