aboutsummaryrefslogtreecommitdiff
path: root/db2/os/os_seek.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-13 13:36:34 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-13 13:36:34 +0000
commitec239360d13518a13f572b635d036c7d10028010 (patch)
treebdb5111363f45d2107849c2456b575d72779174c /db2/os/os_seek.c
parentfc3703521650a9b6db910a50c4fc0f410496e134 (diff)
downloadglibc-ec239360d13518a13f572b635d036c7d10028010.tar
glibc-ec239360d13518a13f572b635d036c7d10028010.tar.gz
glibc-ec239360d13518a13f572b635d036c7d10028010.tar.bz2
glibc-ec239360d13518a13f572b635d036c7d10028010.zip
Update.
* db2/Makefile (distribute): Remove files which do not exist anymore.
Diffstat (limited to 'db2/os/os_seek.c')
-rw-r--r--db2/os/os_seek.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/db2/os/os_seek.c b/db2/os/os_seek.c
index 159425cc27..ae5272bd1c 100644
--- a/db2/os/os_seek.c
+++ b/db2/os/os_seek.c
@@ -8,7 +8,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)os_seek.c 10.9 (Sleepycat) 4/19/98";
+static const char sccsid[] = "@(#)os_seek.c 10.11 (Sleepycat) 10/12/98";
#endif /* not lint */
#ifndef NO_SYSTEM_INCLUDES
@@ -19,6 +19,7 @@ static const char sccsid[] = "@(#)os_seek.c 10.9 (Sleepycat) 4/19/98";
#endif
#include "db_int.h"
+#include "os_jump.h"
/*
* __os_seek --
@@ -35,10 +36,17 @@ __os_seek(fd, pgsize, pageno, relative, isrewind, whence)
int isrewind, whence;
{
off_t offset;
-
- offset = (off_t)pgsize * pageno + relative;
- if (isrewind)
- offset = -offset;
-
- return (lseek(fd, offset, whence) == -1 ? errno : 0);
+ int ret;
+
+ if (__db_jump.j_seek != NULL)
+ ret = __db_jump.j_seek(fd,
+ pgsize, pageno, relative, isrewind, whence);
+ else {
+ offset = (off_t)pgsize * pageno + relative;
+ if (isrewind)
+ offset = -offset;
+
+ ret = lseek(fd, offset, whence);
+ }
+ return (ret == -1 ? errno : 0);
}