forked from KolibriOS/kolibrios
Added git source kolibri-libc and
Configured autobuild git-svn-id: svn://kolibrios.org@8687 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/ksys.h>
|
||||
|
||||
int fseek(FILE *stream, long int offset, int whence) {
|
||||
if (whence == SEEK_SET) {
|
||||
stream->position = offset;
|
||||
} else if (whence == SEEK_CUR) {
|
||||
stream->position += offset;
|
||||
} else if (whence == SEEK_END) {
|
||||
ksys_bdfe_t info;
|
||||
if (_ksys_file_get_info(stream->name, &info)) {
|
||||
return -1;
|
||||
}
|
||||
stream->position = info.size + offset;
|
||||
}
|
||||
stream->eof = 0;
|
||||
}
|
||||
Reference in New Issue
Block a user