summaryrefslogtreecommitdiff
path: root/dbmail-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbmail-message.c')
-rw-r--r--dbmail-message.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/dbmail-message.c b/dbmail-message.c
index 7a7e9383..0465a90e 100644
--- a/dbmail-message.c
+++ b/dbmail-message.c
@@ -733,7 +733,7 @@ static struct DbmailMessage * _fetch_head(struct DbmailMessage *self)
{
char *query_template = "SELECT messageblk, is_header "
"FROM %smessageblks "
- "WHERE physmessage_id = %llu "
+ "WHERE physmessage_id = %" U64_T_FORMAT " "
"AND is_header = '1'";
return _retrieve(self, query_template);
@@ -748,7 +748,7 @@ static struct DbmailMessage * _fetch_full(struct DbmailMessage *self)
{
char *query_template = "SELECT messageblk, is_header "
"FROM %smessageblks "
- "WHERE physmessage_id = %llu "
+ "WHERE physmessage_id = %" U64_T_FORMAT " "
"ORDER BY messageblk_idnr";
return _retrieve(self, query_template);
}
@@ -777,7 +777,7 @@ struct DbmailMessage * dbmail_message_retrieve(struct DbmailMessage *self, u64_t
}
if ((!self) || (! self->content)) {
- TRACE(TRACE_ERROR, "retrieval failed for physid [%llu]", physid);
+ TRACE(TRACE_ERROR, "retrieval failed for physid [%" U64_T_FORMAT "]", physid);
return NULL;
}
@@ -899,7 +899,7 @@ int _message_insert(struct DbmailMessage *self,
snprintf(query, DEF_QUERYSIZE, "INSERT INTO "
"%smessages(mailbox_idnr, physmessage_id, unique_id,"
"recent_flag, status) "
- "VALUES (%llu, %llu, '%s', 1, %d) %s",
+ "VALUES (%" U64_T_FORMAT ", %" U64_T_FORMAT ", '%s', 1, %d) %s",
DBPFX, mailboxid, physmessage_id, unique_id,
MESSAGE_STATUS_INSERT, db_returning("message_idnr"));
@@ -1049,7 +1049,7 @@ static gboolean _header_cache(const char UNUSED *key, const char *header, gpoint
safe_value = dm_stresc(rvalue); g_free(rvalue);
g_string_printf(q,"INSERT INTO %sheadervalue (headername_id, physmessage_id, headervalue) "
- "VALUES (%llu,%llu,'%s')", DBPFX, id, self->physid, safe_value);
+ "VALUES (%" U64_T_FORMAT ",%" U64_T_FORMAT ",'%s')", DBPFX, id, self->physid, safe_value);
g_free(safe_value);
safe_value = NULL;
@@ -1093,7 +1093,7 @@ static void insert_address_cache(u64_t physid, const char *field, InternetAddres
addr = dm_strnesc(ia->value.addr ? ia->value.addr : "", CACHE_WIDTH_ADDR);
g_string_printf(q, "INSERT INTO %s%sfield (physmessage_id, %sname, %saddr) "
- "VALUES (%llu,'%s','%s')", DBPFX, field, field, field,
+ "VALUES (%" U64_T_FORMAT ",'%s','%s')", DBPFX, field, field, field,
physid, name, addr);
g_free(name);
@@ -1122,7 +1122,7 @@ static void insert_field_cache(u64_t physid, const char *field, const char *valu
q = g_string_new("");
g_string_printf(q, "INSERT INTO %s%sfield (physmessage_id, %sfield) "
- "VALUES (%llu,'%s')", DBPFX, field, field, physid, clean_value);
+ "VALUES (%" U64_T_FORMAT ",'%s')", DBPFX, field, field, physid, clean_value);
g_free(clean_value);
@@ -1229,7 +1229,7 @@ void dbmail_message_cache_subjectfield(const struct DbmailMessage *self)
raw = (char *)dbmail_message_get_header(self, "Subject");
if (! raw) {
- TRACE(TRACE_MESSAGE,"no subject field value [%llu]", self->physid);
+ TRACE(TRACE_MESSAGE,"no subject field value [%" U64_T_FORMAT "]", self->physid);
return;
}
@@ -1259,7 +1259,7 @@ void dbmail_message_cache_referencesfield(const struct DbmailMessage *self)
refs = g_mime_references_decode(field);
if (! refs) {
- TRACE(TRACE_MESSAGE, "reference_decode failed [%llu]", self->physid);
+ TRACE(TRACE_MESSAGE, "reference_decode failed [%" U64_T_FORMAT "]", self->physid);
return;
}
@@ -1290,7 +1290,7 @@ void dbmail_message_cache_envelope(const struct DbmailMessage *self)
clean = dm_stresc(envelope);
q = g_strdup_printf("INSERT INTO %senvelope (physmessage_id, envelope) "
- "VALUES (%llu,'%s')", DBPFX, self->physid, clean);
+ "VALUES (%" U64_T_FORMAT ",'%s')", DBPFX, self->physid, clean);
g_free(clean);
g_free(envelope);