* cygtls.h (_threadinfo::find_tls): New function.
* exceptions.cc (_threadinfo::find_tls): Rename from find_tls.  Use critical
section to protect access to linked list.
* cygtls.h (_threadinfo::find_tls): New function.
* exceptions.cc (_threadinfo::find_tls): Rename from find_tls.  Use critical
section to protect access to linked list.
Revert last commit, build problems.
* exceptions.cc (_threadinfo::remove): Avoid a linked list walk.
* exceptions.cc (_threadinfo::remove): Avoid a linked list walk.
	* syscalls.cc (locked_append): New.
	(updwtmp): Remove mutex code and call locked_append.
	(pututline): Ditto.
More reversion of incomplete m32r changes.  Should be back to normal.
2003-12-07  Andrew Cagney  <cagney@redhat.com>

	* defs.h (DEPRECATED_STREQN, DEPRECATED_STREQ): Simplify by
	directly calling strcmp equivalents.  Add disclaimer.
	* elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
	Remove casts that were only needed for K&R compatibility.
	* elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
	Remove casts that were only needed for K&R compatibility.
	* ld-mips-elf/elf-rel-xgot-n32.d: Fix offset for "lw $5,dl1+34($5)".
	* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
throughout.
* tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit
some comments.
* cygheap.h (init_cygheap::ctty): Add new element.
* devices.in (device::parse): Remove special handling for /dev/tty.
* devices.cc: Regenerate.
* dtable.cc (build_fh_pc): Don't reset /dev/tty device.  Let the device opener
do that.
* fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting
noninherit flag for ctty.
* tty.h: Move BOOLs to bools.
(tty_min::set_ctty): Redeclare to _pinfo class.
* pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty.
Change first argument from tty number to tty_min class.
* pinfo.h (_pinfo::set_ctty): Declare.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of
set_ctty to _pinfo class.
* fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially.  Use
saved cygheap value if it exists.  Otherwise convert to real device and save on
first time open.
(fhandler_tty_common::dup): Potentially set controlling tty if duping a slave
tty.
* syscalls.cc (setsid): Close controlling tty in cygheap.
* tty.cc: Change some BOOLs to bools.
Change use of BOOL, TRUE, FALSE to bool, true, false, as appropriate,
throughout.
* tty.cc (tty::common_init): Remove call to SetKernelObjectSecurity and edit
some comments.
* cygheap.h (init_cygheap::ctty): Add new element.
* devices.in (device::parse): Remove special handling for /dev/tty.
* devices.cc: Regenerate.
* dtable.cc (build_fh_pc): Don't reset /dev/tty device.  Let the device opener
do that.
* fhandler_termios.cc (tty_min::set_ctty): Redefine to _pinfo class.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Avoid setting
noninherit flag for ctty.
* tty.h: Move BOOLs to bools.
(tty_min::set_ctty): Redeclare to _pinfo class.
* pinfo.cc (_pinfo::set_ctty): Define new function based on tty_min::set_ctty.
Change first argument from tty number to tty_min class.
* pinfo.h (_pinfo::set_ctty): Declare.
* fhandler_console.cc (fhandler_console::get_tty_stuff): Reflect move of
set_ctty to _pinfo class.
* fhandler_tty.cc (fhandler_tty_slave::open): Treat FH_TTY specially.  Use
saved cygheap value if it exists.  Otherwise convert to real device and save on
first time open.
(fhandler_tty_common::dup): Potentially set controlling tty if duping a slave
tty.
* syscalls.cc (setsid): Close controlling tty in cygheap.
* tty.cc: Change some BOOLs to bools.
daily update
	* ldemul.c: Convert to ISO-C.
	* ldver.c: Likewise.
	* ldemul.c: Convert to ISO-C.
	* ldver.c: Likewise.
*** empty log message ***
* spawn.cc (spawn_guts): Change type back to 'int' after erroneous change
below.
* spawn.cc (spawn_guts): Change type back to 'int' after erroneous change
below.
* spawn.cc (spawn_guts): Change type back to 'int' after erroneous change
below.