From dcc81d8db0c3ce867be1afbb5b9625e2a420e280 Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 2 Dec 2011 20:15:14 +0000 Subject: Send the expiry time to CouchDB when deleting old sessions (it's time seems oddly unreliable) Address printf of int64_t at compile time --- project2/common/fileStrmVarWriter.cpp | 5 ++++- project2/json/couchSession.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/project2/common/fileStrmVarWriter.cpp b/project2/common/fileStrmVarWriter.cpp index e5b3eae..0028af8 100644 --- a/project2/common/fileStrmVarWriter.cpp +++ b/project2/common/fileStrmVarWriter.cpp @@ -6,6 +6,9 @@ #include #include +#define __STDC_FORMAT_MACROS +#include + FileStreamVariableWriter::FileStreamVariableWriter(FILE * o, bool q) : out(o), quoting(q) @@ -23,7 +26,7 @@ void FileStreamVariableWriter::operator()(const Boolean & i) const { fprintf(out, i.value ? "true" : "false"); } void FileStreamVariableWriter::operator()(const int64_t & i) const { - fprintf(out, "%ld", i); + fprintf(out, "%"PRId64, i); } void FileStreamVariableWriter::operator()(const double & i) const { fprintf(out, "%g", i); diff --git a/project2/json/couchSession.cpp b/project2/json/couchSession.cpp index fd0d1b0..1f6c444 100644 --- a/project2/json/couchSession.cpp +++ b/project2/json/couchSession.cpp @@ -145,8 +145,8 @@ class CustomCouchSessionLoader : public SessionContainerLoaderImpl