From 170a72fd61b1fd4af493a9e3b05db1abeed1f1a1 Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Thu, 7 Dec 2006 20:01:43 +0000 Subject: [PATCH] Missing lseek64 library functions. --- lib/other/_lseek64.c | 22 ++++++++++++++++++++++ lib/syscall/lseek64.s | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 lib/other/_lseek64.c create mode 100644 lib/syscall/lseek64.s 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 -- 2.44.0