projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
hcache.c
diff --git
a/hcache.c
b/hcache.c
index
ed1cae5
..
c34efd9
100644
(file)
--- a/
hcache.c
+++ b/
hcache.c
@@
-18,11
+18,17
@@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*/
-
+# 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
#ifdef USE_HCACHE
@@
-66,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 *
@@
-130,6
+136,7
@@
dump_char(char *c, unsigned char *d, int *off)
return d;
}
return d;
}
+#if 0
static unsigned char *
dump_char_size(char *c, unsigned char *d, int *off, ssize_t size)
{
static unsigned char *
dump_char_size(char *c, unsigned char *d, int *off, ssize_t size)
{
@@
-146,6
+153,7
@@
dump_char_size(char *c, unsigned char *d, int *off, ssize_t size)
return d;
}
return d;
}
+#endif
static void
restore_char(char **c, const unsigned char *d, int *off)
static void
restore_char(char **c, const unsigned char *d, int *off)
@@
-245,6
+253,7
@@
restore_list(LIST **l, const unsigned char *d, int *off)
*l = NULL;
}
*l = NULL;
}
+#if 0
static unsigned char *
dump_buffer(BUFFER *b, unsigned char *d, int *off)
{
static unsigned char *
dump_buffer(BUFFER *b, unsigned char *d, int *off)
{
@@
-281,6
+290,7
@@
restore_buffer(BUFFER **b, const unsigned char *d, int *off)
restore_int(& (*b)->dsize, d, off);
restore_int((unsigned int *) & (*b)->destroy, d, off);
}
restore_int(& (*b)->dsize, d, off);
restore_int((unsigned int *) & (*b)->destroy, d, off);
}
+#endif
static unsigned char *
dump_parameter(PARAMETER *p, unsigned char *d, int *off)
static unsigned char *
dump_parameter(PARAMETER *p, unsigned char *d, int *off)
@@
-516,7
+526,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;
@@
-525,7
+535,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);
@@
-658,7
+668,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;
@@
-839,7
+849,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;