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

- __get_default_file() now dynamically fills in file handles for the

stdin/stdout/stderr streams if it's part of the thread-safe library.

- fpathconf() now checks if the file descriptor is really referring to a file.

- The termios hook entry code could file descriptor's embedded file handle
  rather than what the thread safe library had dynamically bound to the
  stdin/stdout/stderr streams.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15130 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2006-09-12 14:16:44 +00:00
parent ead90dee0d
commit f3dcdfe1ce
4 changed files with 84 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_fpathconf.c,v 1.1 2006-07-28 14:37:28 obarthel Exp $
* $Id: unistd_fpathconf.c,v 1.2 2006-09-12 14:16:44 obarthel Exp $
*
* :ts=4
*
@ -63,6 +63,12 @@ fpathconf(int file_descriptor,int name)
goto out;
}
if(FLAG_IS_SET(fd->fd_Flags,FDF_STDIO) || FLAG_IS_SET(fd->fd_Flags,FDF_IS_SOCKET))
{
__set_errno(EBADF);
goto out;
}
fh = BADDR(fd->fd_DefaultFile);
ret = __pathconf(fh->fh_Type,name); /* Ok if fh->fh_Type==NULL */