Make things work on OpenBSD again
sim/sim_time.cc: make this work in OpenBSD sim/sim_time.hh: timeval is defined in sys/time.h base/remote_gdb.cc: need to include <cstdio> for sprintf --HG-- extra : convert_revision : a230aa691bb798c37243fe4253399b2e40a2d12d
This commit is contained in:
parent
6770411543
commit
b61ec9773a
3 changed files with 6 additions and 3 deletions
|
@ -91,6 +91,7 @@
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "cpu/exec_context.hh"
|
#include "cpu/exec_context.hh"
|
||||||
|
|
|
@ -132,21 +132,21 @@ namespace Time
|
||||||
ostream &
|
ostream &
|
||||||
operator<<(ostream &out, const Start &start)
|
operator<<(ostream &out, const Start &start)
|
||||||
{
|
{
|
||||||
out << ::ctime(&start.get().tv_sec);
|
out << ::ctime((const time_t *)&start.get().tv_sec);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ostream &
|
ostream &
|
||||||
operator<<(ostream &out, const Now &now)
|
operator<<(ostream &out, const Now &now)
|
||||||
{
|
{
|
||||||
out << ::ctime(&now.get().tv_sec);
|
out << ::ctime((const time_t *)&now.get().tv_sec);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ostream &
|
ostream &
|
||||||
operator<<(ostream &out, const Elapsed &elapsed)
|
operator<<(ostream &out, const Elapsed &elapsed)
|
||||||
{
|
{
|
||||||
out << ::ctime(&elapsed.get().tv_sec);
|
out << ::ctime((const time_t *)&elapsed.get().tv_sec);
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#ifndef __SIM_TIME_HH__
|
#ifndef __SIM_TIME_HH__
|
||||||
#define __SIM_TIME_HH__
|
#define __SIM_TIME_HH__
|
||||||
|
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
|
|
||||||
namespace Time {
|
namespace Time {
|
||||||
|
|
Loading…
Reference in a new issue