LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$BDB_LIB"
AC_DEFINE(HAVE_DB4, 1, [Sleepycat DB4 Support])
else
- AC_MSG_ERROR(You need Sleepycat DB4 or GDBM for --enable-hcache)
+ AC_MSG_ERROR(You need QDBM, Sleepycat DB4 or GDBM for --enable-hcache)
fi
fi])
dnl -- end cache --
WHERE char *Maildir;
#if USE_HCACHE
WHERE char *HeaderCache;
+#if HAVE_GDBM || HAVE_DB4
WHERE char *HeaderCachePageSize;
-#endif
+#endif /* HAVE_GDBM || HAVE_DB4 */
+#endif /* USE_HCACHE */
WHERE char *MhFlagged;
WHERE char *MhReplied;
WHERE char *MhUnseen;
mutt_hcache_open(const char *path, const char *folder)
{
struct header_cache *h = safe_calloc(1, sizeof (HEADER_CACHE));
- int flags = 0;
-#if 0 /* FIXME */
- int pagesize = atoi(HeaderCachePageSize) ? atoi(HeaderCachePageSize) : 16384;
-#endif
+ int flags = VL_OWRITER | VL_OCREAT;
h->db = NULL;
h->folder = safe_strdup(folder);
h->crc = generate_crc32();
path = mutt_hcache_per_folder(path, folder);
if (option(OPTHCACHECOMPRESS))
- flags = VL_OZCOMP;
+ flags |= VL_OZCOMP;
h->db = vlopen(path, flags, VL_CMPLEX);
-
if (h->db)
return h;
else
** files when the header cache is in use. This incurs one stat(2) per
** message every time the folder is opened.
*/
+#if HAVE_GDBM || HAVE_DB4
{ "header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, UL "16384" },
/*
** .pp
** or less the best you can get. For details, google for mutt header
** cache (first hit).
*/
+#endif /* HAVE_GDBM || HAVE_DB4 */
#if HAVE_QDBM
{ "header_cache_compress", DT_BOOL, R_NONE, OPTHCACHECOMPRESS, 0 },
/*