-#define SHERLOCK_HAVE_PREAD
-
-#else
-
-/*
- * Talk directly with the kernel. The LFS implementations of LFS in Linux 2.2
- * and 2.4 differ, but fortunately for us only in things like stat64 which
- * we don't need to use.
- */
-
-#ifndef O_LARGEFILE
-#if defined(__linux__) && defined(__i386__)
-#define O_LARGEFILE 0100000
-#else
-#error O_LARGEFILE unknown
-#endif
-#endif
-
-static inline int
-sh_open(char *name, int flags, int mode)
-{
- return open(name, flags | O_LARGEFILE, mode);
-}
-
-#if 0
-
-/* A "do it yourself" solution */
-
-#include <asm/unistd.h>
-#include <errno.h>
-
-_syscall5(int, _llseek, int, fd, int, hi, int, lo, loff_t *, result, int, whence);
-
-static inline loff_t sh_seek(int fd, sh_off_t pos, int whence)
-{
- loff_t result;
- int err;
-
- err = _llseek(fd, pos >> 32, pos, &result, whence);
- return (err < 0) ? err : result;
-}
-#else
-
-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ > 0
-/* glibc 2.1 or newer -> has lseek64 */
-#define sh_seek(f,o,w) lseek64(f,o,w)
-#else
-/* Touching hidden places in glibc */
-extern loff_t llseek(int fd, loff_t pos, int whence);
-#define sh_seek(f,o,w) llseek(f,o,w)
-#endif
-
-#endif
-
-#endif /* !SHERLOCK_CONFIG_LFS_LIBC */
+#define sh_ftruncate ftruncate64
+#define sh_mmap(a,l,p,f,d,o) mmap64(a,l,p,f,d,o)
+#define sh_pread pread64
+#define sh_pwrite pwrite64