From: Philip Homburg Date: Thu, 7 Dec 2006 20:01:43 +0000 (+0000) Subject: Missing lseek64 library functions. X-Git-Tag: v3.1.3~135 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/already%20found%20%2A/doxygen-warnings.log?a=commitdiff_plain;h=170a72fd61b1fd4af493a9e3b05db1abeed1f1a1;p=minix.git Missing lseek64 library functions. --- diff --git a/lib/other/_lseek64.c b/lib/other/_lseek64.c new file mode 100644 index 000000000..e4aa9c506 --- /dev/null +++ b/lib/other/_lseek64.c @@ -0,0 +1,22 @@ +#include +#define lseek64 _lseek64 +#include +#include + +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; +} diff --git a/lib/syscall/lseek64.s b/lib/syscall/lseek64.s new file mode 100644 index 000000000..ec8600ec9 --- /dev/null +++ b/lib/syscall/lseek64.s @@ -0,0 +1,7 @@ +.sect .text +.extern __lseek64 +.define _lseek64 +.align 2 + +_lseek64: + jmp __lseek64