* cygerrno.h (set_errno): Define more informative version of this function for

debugging.
(__set_errno): Declare when DEBUGGING.
* cygheap.h (cygheap_fdget::cygheap_fdget): Add a flag to control when errno is
set.
* debug.cc (__set_errno): New function.
* fcntl.cc (_fcntl): Fix so that correct fd is used for second argument to
dup2.
* syscalls.cc (_cygwin_istext_for_stdio): Don't set errno here when using
cygheap_fdget.
This commit is contained in:
Christopher Faylor
2001-10-16 03:31:50 +00:00
parent df63bd490a
commit 0f4db8cbe0
6 changed files with 32 additions and 10 deletions

View File

@@ -1461,7 +1461,7 @@ _cygwin_istext_for_stdio (int fd)
return 0; /* we do it for old apps, due to getc/putc macros */
}
cygheap_fdget cfd (fd);
cygheap_fdget cfd (fd, false, false);
if (cfd < 0)
{
syscall_printf (" _cifs: fd not open\n");