Make sure the correct errno is reported by warn* or err* and notthe errno of an intervening cleanup operation like close/unlink/etc.Diff from Doug Hogan (doug (at) acyclic.org)
Delete unused variables found by -Wall
* add #includes to pull in missing prototypes, as pointed out by gcc4* fix CFLAGS syntax for make dependok blambert@
Add regression tests for stdio threading. Originally by blambert withsome further hacking by me