From 1f0c11760668cdc72d22b269dfb5a2031dbebc95 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 7 Jan 2001 14:58:58 +0000 Subject: [PATCH] Added sh_ftruncate(), but it currently works only on 32-bit files, so I've switched the default configuration to 32 bits. --- lib/config.h | 4 ++-- lib/lfs.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/config.h b/lib/config.h index 68d688a8..7b3fab4b 100644 --- a/lib/config.h +++ b/lib/config.h @@ -13,8 +13,8 @@ /* Features */ -#define SHERLOCK_CONFIG_LARGE_DB /* Support for DB files >4GB */ -#define SHERLOCK_CONFIG_LFS /* Large files on 32-bit systems */ +#undef SHERLOCK_CONFIG_LARGE_DB /* Support for DB files >4GB */ +#undef SHERLOCK_CONFIG_LFS /* Large files on 32-bit systems */ #undef SHERLOCK_CONFIG_LFS_LIBC /* LFS supported directly by libc */ /* Types */ diff --git a/lib/lfs.h b/lib/lfs.h index 7a63597f..b9fb4872 100644 --- a/lib/lfs.h +++ b/lib/lfs.h @@ -1,7 +1,7 @@ /* * Sherlock Library -- Large File Support * - * (c) 1999--2000 Martin Mares + * (c) 1999--2001 Martin Mares */ #ifndef _SHERLOCK_LFS_H @@ -24,12 +24,13 @@ #define sh_seek lseek64 #define sh_pread pread64 #define sh_pwrite pwrite64 +#define sh_ftruncate ftruncate64 #define SHERLOCK_HAVE_PREAD #else /* - * Talk directly with the kernel. The LFS implementations of LFS in Linux 2.2 + * Talk directly with the kernel. The 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. */ @@ -84,6 +85,7 @@ extern loff_t llseek(int fd, loff_t pos, int whence); #define sh_open open #define sh_seek(f,o,w) lseek(f,o,w) +#define sh_ftruncate(f,o) ftruncate(f,o) #endif /* !SHERLOCK_CONFIG_LFS */ -- 2.39.2