projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Andreas Krennmair:
[apps/madmutt.git]
/
hcache.c
diff --git
a/hcache.c
b/hcache.c
index
1d168e3
..
dea409e
100644
(file)
--- a/
hcache.c
+++ b/
hcache.c
@@
-18,12
+18,19
@@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
-#ifdef USE_HCACHE
-
+# if HAVE_INTTYPES_H
+# include <inttypes.h>
+# else
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+# endif
#if HAVE_CONFIG_H
#include "config.h"
#if HAVE_CONFIG_H
#include "config.h"
-#endif /* HAVE_CONFIG_H */
+#endif /* HAVE_CONFIG_H */
+
+#ifdef USE_HCACHE
#if HAVE_GDBM
#include <gdbm.h>
#if HAVE_GDBM
#include <gdbm.h>
@@
-65,7
+72,7
@@
header_cache
typedef union
{
struct timeval timeval;
typedef union
{
struct timeval timeval;
- u
nsigned long long
uid_validity;
+ u
int64_t
uid_validity;
} validate;
static void *
} validate;
static void *
@@
-515,7
+522,7
@@
mutt_hcache_per_folder(const char *path, const char *folder)
/* This function transforms a header into a char so that it is useable by
* db_store */
static void *
/* This function transforms a header into a char so that it is useable by
* db_store */
static void *
-mutt_hcache_dump(void *_db, HEADER *h, int *off, u
nsigned long long
uid_validity)
+mutt_hcache_dump(void *_db, HEADER *h, int *off, u
int64_t
uid_validity)
{
struct header_cache *db = _db;
unsigned char *d = NULL;
{
struct header_cache *db = _db;
unsigned char *d = NULL;
@@
-524,7
+531,7
@@
mutt_hcache_dump(void *_db, HEADER *h, int *off, unsigned long long uid_validity
d = lazy_malloc(sizeof(validate));
if (uid_validity) {
d = lazy_malloc(sizeof(validate));
if (uid_validity) {
- memcpy(d, &uid_validity, sizeof(
long long
));
+ memcpy(d, &uid_validity, sizeof(
uint64_t
));
} else {
struct timeval now;
gettimeofday(&now, NULL);
} else {
struct timeval now;
gettimeofday(&now, NULL);
@@
-657,7
+664,7
@@
mutt_hcache_fetch(void *db, const char *filename, size_t (*keylen)(const char *f
}
int
}
int
-mutt_hcache_store(void *db, const char *filename, HEADER *header, u
nsigned long long
uid_validity, size_t (*keylen)(const char *fn))
+mutt_hcache_store(void *db, const char *filename, HEADER *header, u
int64_t
uid_validity, size_t (*keylen)(const char *fn))
{
struct header_cache *h = db;
datum key;
{
struct header_cache *h = db;
datum key;
@@
-838,7
+845,7
@@
mutt_hcache_fetch(void *db, const char *filename, size_t (*keylen)(const char *f
}
int
}
int
-mutt_hcache_store(void *db, const char *filename, HEADER *header, u
nsigned long long
uid_validity, size_t (*keylen)(const char *fn))
+mutt_hcache_store(void *db, const char *filename, HEADER *header, u
int64_t
uid_validity, size_t (*keylen)(const char *fn))
{
DBT key;
DBT data;
{
DBT key;
DBT data;