From 6bd43301e19010e2c14e177674f06a86058ff248 Mon Sep 17 00:00:00 2001 From: dockes Date: Wed, 21 Oct 2009 11:32:49 +0000 Subject: [PATCH] gcc43+linux compile --- src/internfile/mh_text.cpp | 6 ++++-- src/utils/closefrom.cpp | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/internfile/mh_text.cpp b/src/internfile/mh_text.cpp index d7f742f9..66ec6615 100644 --- a/src/internfile/mh_text.cpp +++ b/src/internfile/mh_text.cpp @@ -96,7 +96,9 @@ bool MimeHandlerText::set_document_string(const string& otext) bool MimeHandlerText::skip_to_document(const string& ipath) { - sscanf(ipath.c_str(), "%lld", &m_offs); + long long t; + sscanf(ipath.c_str(), "%lld", &t); + m_offs = (off_t)t; readnext(); return true; } @@ -136,7 +138,7 @@ bool MimeHandlerText::next_document() // be to use a different mtype for files over the page size, // and keep text/plain only for smaller files. char buf[20]; - sprintf(buf, "%lld", m_offs - m_text.length()); + sprintf(buf, "%lld", (long long)(m_offs - m_text.length())); if (m_offs - m_text.length() != 0) m_metaData["ipath"] = buf; readnext(); diff --git a/src/utils/closefrom.cpp b/src/utils/closefrom.cpp index 77e48e10..2dde6a63 100644 --- a/src/utils/closefrom.cpp +++ b/src/utils/closefrom.cpp @@ -47,6 +47,7 @@ static char rcsid[] = "@(#$Id: $ (C) 2009 J.F.Dockes"; #include #include #include +#include #include /* #define DEBUG_CLOSEFROM*/