+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
static void
-json_integer (struct sprinter *sp, int val)
+json_integer (struct sprinter *sp, int64_t val)
{
struct sprinter_json *spj = json_begin_value (sp);
- fprintf (spj->stream, "%d", val);
+ fprintf (spj->stream, "%"PRId64, val);
}
static void
* Author: Peter Feigl <peter.feigl@gmx.at>
*/
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
static void
-sexp_integer (struct sprinter *sp, int val)
+sexp_integer (struct sprinter *sp, int64_t val)
{
struct sprinter_sexp *sps = sexp_begin_value (sp);
- fprintf (sps->stream, "%d", val);
+ fprintf (sps->stream, "%"PRId64, val);
}
static void
+#include <inttypes.h>
#include <stdbool.h>
#include <stdio.h>
#include <talloc.h>
}
static void
-text_integer (struct sprinter *sp, int val)
+text_integer (struct sprinter *sp, int64_t val)
{
struct sprinter_text *sptxt = (struct sprinter_text *) sp;
- fprintf (sptxt->stream, "%d", val);
+ fprintf (sptxt->stream, "%"PRId64, val);
}
static void
*/
void (*string)(struct sprinter *, const char *);
void (*string_len)(struct sprinter *, const char *, size_t);
- void (*integer)(struct sprinter *, int);
+ void (*integer)(struct sprinter *, int64_t);
void (*boolean)(struct sprinter *, bool);
void (*null)(struct sprinter *);
\"unread\"]}]"
test_begin_subtest "Search message: json, 64-bit timestamp"
-test_subtest_known_broken
add_message "[subject]=\"json-search-64bit-timestamp-subject\"" "[date]=\"Tue, 01 Jan 2999 12:00:00 -0000\"" "[body]=\"json-search-64bit-timestamp-message\""
output=$(notmuch search --format=json "json-search-64bit-timestamp-message" | notmuch_search_sanitize)
test_expect_equal_json "$output" "[{\"thread\": \"XXX\",