gcc 4 compat, thanks to Kartik Mistry
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: docseqhist.cpp,v 1.1 2007-01-19 10:32:39 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: docseqhist.cpp,v 1.2 2007-12-13 06:58:21 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -19,6 +19,7 @@ static char rcsid[] = "@(#$Id: docseqhist.cpp,v 1.1 2007-01-19 10:32:39 dockes E
|
||||
*/
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "docseqhist.h"
|
||||
#include "rcldb.h"
|
||||
@@ -48,7 +49,7 @@ bool DocSequenceHistory::getDoc(int num, Rcl::Doc &doc, int *percent,
|
||||
if (percent)
|
||||
*percent = 100;
|
||||
if (sh) {
|
||||
if (m_prevtime < 0 || abs(m_prevtime - m_it->unixtime) > 86400) {
|
||||
if (m_prevtime < 0 || abs (float(m_prevtime) - float(m_it->unixtime)) > 86400) {
|
||||
m_prevtime = m_it->unixtime;
|
||||
time_t t = (time_t)(m_it->unixtime);
|
||||
*sh = string(ctime(&t));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: history.cpp,v 1.8 2007-06-20 13:16:11 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: history.cpp,v 1.9 2007-12-13 06:58:21 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -21,6 +21,7 @@ static char rcsid[] = "@(#$Id: history.cpp,v 1.8 2007-06-20 13:16:11 dockes Exp
|
||||
#ifndef TEST_HISTORY
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "history.h"
|
||||
#include "base64.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: recollq.cpp,v 1.11 2007-11-13 18:40:51 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: recollq.cpp,v 1.12 2007-12-13 06:58:21 dockes Exp $ (C) 2006 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -26,6 +26,7 @@ static char rcsid[] = "@(#$Id: recollq.cpp,v 1.11 2007-11-13 18:40:51 dockes Exp
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
Reference in New Issue
Block a user