mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 07:38:56 +08:00
6599da043e
From-SVN: r14877
18 lines
419 B
C
18 lines
419 B
C
/* 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;
|
|
}
|