mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-31 18:44:48 +01:00
346d84c900
git-svn-id: file:///srv/svn/repos/haiku/trunk/buildtools@9577 a95241bf-73f2-0310-859d-f6bbb57e9c96
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;
|
|
}
|