add new stdio extension functions to make gnulib happy
this is mildly ugly, but less ugly than gnulib trying to poke at the definition of the FILE structure...
This commit is contained in:
parent
a71e0af255
commit
e15171b8d8
1 changed files with 24 additions and 0 deletions
24
src/stdio/ext2.c
Normal file
24
src/stdio/ext2.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include "stdio_impl.h"
|
||||
|
||||
size_t __freadahead(FILE *f)
|
||||
{
|
||||
return f->rend - f->rpos;
|
||||
}
|
||||
|
||||
const char *__freadptr(FILE *f, size_t *sizep)
|
||||
{
|
||||
size_t size = f->rend - f->rpos;
|
||||
if (!size) return 0;
|
||||
*sizep = size;
|
||||
return f->rpos;
|
||||
}
|
||||
|
||||
void __freadptrinc(FILE *f, size_t inc)
|
||||
{
|
||||
f->rpos += inc;
|
||||
}
|
||||
|
||||
void __fseterr(FILE *f)
|
||||
{
|
||||
f->flags |= F_ERR;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue