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

View file

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