mlibc: Implement ftell, fseek.

* lib/libc+tcc.c (ftell, fseek): Implement.
This commit is contained in:
Jan Nieuwenhuizen 2018-05-29 19:33:32 +02:00
parent 2cda87257a
commit 26e1876d12
No known key found for this signature in database
GPG Key ID: F3C1A0D9C1D65273
1 changed files with 7 additions and 9 deletions

View File

@ -98,18 +98,16 @@ fread (void *data, size_t size, size_t count, FILE *stream)
return bytes;
}
int
fseek (FILE *stream, long offset, int whence)
{
eputs ("fseek stub\n");
return 0;
}
long
ftell (FILE *stream)
{
eputs ("ftell stub\n");
return 0;
return lseek ((int)stream, 0, SEEK_CUR);
}
int
fseek (FILE *stream, long offset, int whence)
{
return lseek ((int)stream, offset, whence);
}
int