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:
Nathan Binkert 2003-10-10 22:59:51 -04:00
parent 6770411543
commit b61ec9773a
3 changed files with 6 additions and 3 deletions

View file

@ -91,6 +91,7 @@
#include <unistd.h>
#include <cstdio>
#include <string>
#include "cpu/exec_context.hh"

View file

@ -132,21 +132,21 @@ namespace Time
ostream &
operator<<(ostream &out, const Start &start)
{
out << ::ctime(&start.get().tv_sec);
out << ::ctime((const time_t *)&start.get().tv_sec);
return out;
}
ostream &
operator<<(ostream &out, const Now &now)
{
out << ::ctime(&now.get().tv_sec);
out << ::ctime((const time_t *)&now.get().tv_sec);
return out;
}
ostream &
operator<<(ostream &out, const Elapsed &elapsed)
{
out << ::ctime(&elapsed.get().tv_sec);
out << ::ctime((const time_t *)&elapsed.get().tv_sec);
return out;
}
}

View file

@ -29,6 +29,8 @@
#ifndef __SIM_TIME_HH__
#define __SIM_TIME_HH__
#include <sys/time.h>
#include <iosfwd>
namespace Time {