1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Reworked the __putc() and putc() macros to reference the 'c' input

parameter only once, and to be free of side-effects when tinkering
  with the buffer position.

- isatty() had the __fd_lock() call in the wrong place, which could have
  led to cleanup problems later.

- The close action in the stdio, socket and termios hook code now
  also zaps the fd pointer itself after cleaning up the file descriptor
  table entry.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15211 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2010-10-20 13:12:59 +00:00
parent 81e66075e2
commit a436ebdad1
8 changed files with 35 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* $Id: unistd_isatty.c,v 1.10 2008-04-16 07:46:05 obarthel Exp $
* $Id: unistd_isatty.c,v 1.11 2010-10-20 13:12:59 obarthel Exp $
*
* :ts=4
*
@@ -67,14 +67,14 @@ isatty(int file_descriptor)
goto out;
}
__fd_lock(fd);
if(FLAG_IS_SET(fd->fd_Flags,FDF_IS_SOCKET))
{
__set_errno(ENOTTY);
goto out;
}
__fd_lock(fd);
result = 1;
if(FLAG_IS_CLEAR(fd->fd_Flags,FDF_IS_INTERACTIVE))