]> mj.ucw.cz Git - libucw.git/commitdiff
Resurrected CONFIG_LARGE_DB.
authorMartin Mares <mj@ucw.cz>
Sat, 11 Dec 2004 13:22:50 +0000 (13:22 +0000)
committerMartin Mares <mj@ucw.cz>
Sat, 11 Dec 2004 13:22:50 +0000 (13:22 +0000)
Large database format and LFS really should be different switches --
small DB combined with LFS gives a 4GB limit, small with no LFS gives
2GB limit.

CONFIG_LFS is now always on (it's supported by all current Linux libc's
and the performance penalty for using 64-bit sh_off_t is negligible),
CONFIG_LARGE_DB is controlled by config.mk.

lib/config.h
lib/lfs.h

index c601cd2848da370b139b5cc9fb1ee737a770f66b..7000d63aa912996a91f04bd0dc61ffa7ea8332fe 100644 (file)
@@ -34,7 +34,7 @@ typedef unsigned int sh_time_t;               /* Timestamp */
 #define NULL (void *)0
 #endif
 
-#ifdef CONFIG_LARGE_FILES              /* File positions */
+#ifdef CONFIG_LFS                      /* File positions */
 typedef s64 sh_off_t;
 #else
 typedef s32 sh_off_t;
index fcd64d76deb4598958da4748c1a63b0f8923b4b4..5a9ab5d2493e6d8f4ff53331bdeffdbe27dabf9d 100644 (file)
--- a/lib/lfs.h
+++ b/lib/lfs.h
@@ -13,7 +13,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 
-#ifdef CONFIG_LARGE_FILES
+#ifdef CONFIG_LFS
 
 #define sh_open open64
 #define sh_seek lseek64
@@ -24,7 +24,7 @@
 #define sh_pread pread64
 #define sh_pwrite pwrite64
 
-#else  /* !CONFIG_LARGE_FILES */
+#else  /* !CONFIG_LFS */
 
 #define sh_open open
 #define sh_seek(f,o,w) lseek(f,o,w)
@@ -33,7 +33,7 @@
 #define sh_pread pread
 #define sh_pwrite pwrite
 
-#endif /* !CONFIG_LARGE_FILES */
+#endif /* !CONFIG_LFS */
 
 #define HAVE_PREAD