2 * See the file LICENSE for redistribution information.
5 * Sleepycat Software. All rights reserved.
11 static const char sccsid[] = "@(#)os_seek.c 10.6 (Sleepycat) 10/25/97";
14 #ifndef NO_SYSTEM_INCLUDES
15 #include <sys/types.h>
25 * Seek to a page/byte offset in the file.
27 * PUBLIC: int __os_seek __P((int, size_t, db_pgno_t, u_long, int));
30 __os_seek(fd, pgsize, pageno, relative, whence)
39 offset = pgsize * pageno + relative;
41 return (lseek(fd, offset, whence) == -1 ? errno : 0);