Missing lseek64 library functions.

This commit is contained in:
Philip Homburg 2006-12-07 20:01:43 +00:00
parent 8a2a957d49
commit 170a72fd61
2 changed files with 29 additions and 0 deletions

22
lib/other/_lseek64.c Normal file
View file

@ -0,0 +1,22 @@
#include <lib.h>
#define lseek64 _lseek64
#include <unistd.h>
#include <minix/u64.h>
PUBLIC int lseek64(fd, offset, whence, newpos)
int fd;
u64_t offset;
int whence;
u64_t *newpos;
{
message m;
m.m2_i1 = fd;
m.m2_l1 = ex64lo(offset);
m.m2_l2 = ex64hi(offset);
m.m2_i2 = whence;
if (_syscall(FS, LLSEEK, &m) < 0) return -1;
if (newpos)
*newpos= make64(m.m2_l2, m.m2_l1);
return 0;
}

7
lib/syscall/lseek64.s Normal file
View file

@ -0,0 +1,7 @@
.sect .text
.extern __lseek64
.define _lseek64
.align 2
_lseek64:
jmp __lseek64