From: Pierre Habouzit Date: Tue, 20 Nov 2007 21:06:40 +0000 (+0100) Subject: let's drop qdbm. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=ec42b5f9dbca7a552524c138f6764671612fe385;p=apps%2Fmadmutt.git let's drop qdbm. Signed-off-by: Pierre Habouzit --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 338c0e3..b818ed6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,7 +171,6 @@ LIST(APPEND MUTTLIBS -llockfile) IF(USE_HCACHE) OPTION(WITH_TC "Use tokyocabinet for header caching [default: on]" ON) - OPTION(WITH_QDBM "Use qdbm for header caching [default: off]" OFF) OPTION(WITH_GDBM "Use gdbm for header caching [default: off]") SET(USE_HCACHE) @@ -182,15 +181,6 @@ IF(USE_HCACHE) SET(USE_HCACHE 1) SET(HAVE_TOKYOCABINET 1) ENDIF(WITH_TC) - IF(WITH_QDBM) - pkg_search_module(QDBM REQUIRED qdbm) - ADD_DEFINITIONS(${QDBM_CFLAGS}) - SET(QDBM_LDFLAGS "${QDBM_LDFLAGS}") - # LIST(APPEND MUTTLIBS ${QDBM_LDFLAGS}) - LIST(APPEND MUTTLIBS -lqdbm) - SET(USE_HCACHE 1) - SET(HAVE_QDBM 1) - ENDIF(WITH_QDBM) IF(NOT USE_HCACHE AND WITH_GDBM) CHECK_LIBRARY_EXISTS(gdbm gdbm_open "" GDBM) diff --git a/config.h.cmake b/config.h.cmake index 61058b1..f9f05ee 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -49,7 +49,6 @@ #cmakedefine HAVE_GDBM 1 #cmakedefine HAVE_GPGME 1 #cmakedefine HAVE_LIBIDN 1 -#cmakedefine HAVE_QDBM 1 #cmakedefine HAVE_TOKYOCABINET 1 #cmakedefine USE_FCNTL 1 #cmakedefine USE_FLOCK 1 diff --git a/lib-lua/madmutt.cpkg b/lib-lua/madmutt.cpkg index b47a867..ff9985e 100644 --- a/lib-lua/madmutt.cpkg +++ b/lib-lua/madmutt.cpkg @@ -116,8 +116,6 @@ static void madmutt_update_cachedir(const char *dir) #if defined(HAVE_TOKYOCABINET) # define HCACHE_BACKEND "tokyocabinet" #elif defined(HAVE_QDBM) -# define HCACHE_BACKEND "qdbm" -#elif defined(HAVE_GDBM) # define HCACHE_BACKEND "gdbm" #elif defined(HAVE_DB4) # define HCACHE_BACKEND "db4" diff --git a/lib-mx/hcache.c b/lib-mx/hcache.c index 63ea970..a82921b 100644 --- a/lib-mx/hcache.c +++ b/lib-mx/hcache.c @@ -16,10 +16,6 @@ #if defined(HAVE_TOKYOCABINET) #include #include -#elif defined(HAVE_QDBM) -#include -#include -#include #elif defined(HAVE_GDBM) #include #else @@ -33,8 +29,6 @@ struct hcache_t { #if defined(HAVE_TOKYOCABINET) TCHDB *db; -#elif defined(HAVE_QDBM) - VILLA *db; #elif defined(HAVE_GDBM) GDBM_FILE db; #endif @@ -385,8 +379,6 @@ hcache_t *mutt_hcache_open(const char *folder) tchdbdel(h->db); h->db = NULL; } -#elif defined(HAVE_QDBM) - h->db = vlopen(path, VL_OWRITER | VL_OCREAT, VL_CMPLEX); #elif defined(HAVE_GDBM) h->db = gdbm_open((char *) path, 16384, GDBM_WRCREAT, 00600, NULL); #endif @@ -407,8 +399,6 @@ void mutt_hcache_close(hcache_t **db) #if defined(HAVE_TOKYOCABINET) tchdbdel((*db)->db); (*db)->db = NULL; -#elif defined(HAVE_QDBM) - vlclose((*db)->db); #elif defined(HAVE_GDBM) gdbm_close((*db)->db); #endif @@ -433,8 +423,6 @@ void *mutt_hcache_fetch(hcache_t *db, const char *filename, #if defined(HAVE_TOKYOCABINET) int unused; data = tchdbget(db->db, path, ksize, &unused); -#elif defined(HAVE_QDBM) - data = vlget(db->db, path, ksize, NULL); #elif defined(HAVE_GDBM) datum k = { .dptr = path, .dsize = ksize }; @@ -470,8 +458,6 @@ int mutt_hcache_store(hcache_t *db, const char *filename, HEADER *header, int ksize = keylen(path); #if defined(HAVE_TOKYOCABINET) ret = !!tchdbput(db->db, path, ksize, data->data, data->len) - 1; -#elif defined(HAVE_QDBM) - ret = !!vlput(db->db, path, ksize, data->data, data->len, VL_DOVER) - 1; #elif defined(HAVE_GDBM) datum k = { .dptr = path, .dsize = ksize }; datum v = { .dptr = data->data, .dsize = data->len }; @@ -498,8 +484,6 @@ void mutt_hcache_delete(hcache_t *db, const char *filename, int ksize = keylen(path); #if defined(HAVE_TOKYOCABINET) tchdbout(db->db, path, ksize); -#elif defined(HAVE_QDBM) - vlout(db->db, path, ksize); #elif defined(HAVE_GDBM) datum k = { .dptr = path, .dsize = ksize }; gdbm_delete(db->db, k); diff --git a/main.c b/main.c index afa5ef8..017e9b8 100644 --- a/main.c +++ b/main.c @@ -46,8 +46,8 @@ extern int optind; #endif #ifdef USE_HCACHE -#if defined(HAVE_QDBM) -#include +#if defined(HAVE_TOKYOCABINET) +#include #elif defined(HAVE_GDBM) #include #endif @@ -118,8 +118,8 @@ static void show_version (void) printf(" libidn %s\n", STRINGPREP_VERSION); #endif #ifdef USE_HCACHE -#if defined(HAVE_QDBM) - printf(" qdbm %s\n", dpversion); +#if defined(HAVE_TOKYOCABINET) + printf(" tokyocabinet %s\n", tcversion); #elif defined(HAVE_GDBM) printf(" gdbm %s\n", gdbm_version); #endif