diff options
| author | No Author <no-author@gcc.gnu.org> | 1997-08-21 22:58:49 +0000 |
|---|---|---|
| committer | No Author <no-author@gcc.gnu.org> | 1997-08-21 22:58:49 +0000 |
| commit | 9d67cee02262346526bb25cbcf54750ebf134ecb (patch) | |
| tree | b5402095de45a8d16fd7dd80a4fa06b7f02a0bda /libio/stdio/setfileno.c | |
| parent | 2f08086dbba6a317202d4655c14984f55c84e1b0 (diff) | |
This commit was manufactured by cvs2svn to create tag 'start'.misc/start
From-SVN: r14881
Diffstat (limited to 'libio/stdio/setfileno.c')
| -rw-r--r-- | libio/stdio/setfileno.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libio/stdio/setfileno.c b/libio/stdio/setfileno.c new file mode 100644 index 00000000000..f7ccc6fdd66 --- /dev/null +++ b/libio/stdio/setfileno.c @@ -0,0 +1,17 @@ +/* Some known programs (xterm, pdksh?) non-portably change the _file + field of s struct _iobuf. This kludge allows the same "functionality". + This code is an undocumented feature for iostream/stdio. Use it at + your own risk. */ + +#include "libioP.h" +#include "stdio.h" + +void +setfileno(fp, fd) + _IO_FILE* fp; + int fd; +{ + CHECK_FILE(fp, ); + if ((fp->_flags & _IO_IS_FILEBUF) != 0) + fp->_fileno = fd; +} |
