mirror of
https://github.com/open-simh/simh.git
synced 2026-04-24 19:40:22 +00:00
Compiler warning cleanup
This commit is contained in:
@@ -175,7 +175,7 @@ return sim_os_msec () - stime;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SIM_ASYNCH_IO)
|
#if defined(SIM_ASYNCH_IO)
|
||||||
#ifdef NEED_CLOCK_REALTIME
|
#ifdef NEED_CLOCK_GETTIME
|
||||||
int clock_gettime(int clk_id, struct timespec *tp)
|
int clock_gettime(int clk_id, struct timespec *tp)
|
||||||
{
|
{
|
||||||
uint32 secs, ns, tod[2], unixbase[2] = {0xd53e8000, 0x019db1de};
|
uint32 secs, ns, tod[2], unixbase[2] = {0xd53e8000, 0x019db1de};
|
||||||
@@ -247,7 +247,7 @@ Sleep (msec);
|
|||||||
return sim_os_msec () - stime;
|
return sim_os_msec () - stime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NEED_CLOCK_REALTIME)
|
#if defined(NEED_CLOCK_GETTIME)
|
||||||
int clock_gettime(int clk_id, struct timespec *tp)
|
int clock_gettime(int clk_id, struct timespec *tp)
|
||||||
{
|
{
|
||||||
t_uint64 now, unixbase;
|
t_uint64 now, unixbase;
|
||||||
@@ -338,7 +338,7 @@ treq.tv_nsec = (milliseconds % MILLIS_PER_SEC) * NANOS_PER_MILLI;
|
|||||||
return sim_os_msec () - stime;
|
return sim_os_msec () - stime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(NEED_CLOCK_REALTIME)
|
#if defined(NEED_CLOCK_GETTIME)
|
||||||
int clock_gettime(int clk_id, struct timespec *tp)
|
int clock_gettime(int clk_id, struct timespec *tp)
|
||||||
{
|
{
|
||||||
struct timeval cur;
|
struct timeval cur;
|
||||||
@@ -399,7 +399,7 @@ if (tim > SIM_IDLE_MAX)
|
|||||||
return tim;
|
return tim;
|
||||||
}
|
}
|
||||||
#if !defined(_POSIX_SOURCE) && defined(SIM_ASYNCH_IO)
|
#if !defined(_POSIX_SOURCE) && defined(SIM_ASYNCH_IO)
|
||||||
#ifdef NEED_CLOCK_REALTIME
|
#ifdef NEED_CLOCK_GETTIME
|
||||||
typedef int clockid_t;
|
typedef int clockid_t;
|
||||||
int clock_gettime(clockid_t clk_id, struct timespec *tp)
|
int clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,14 @@
|
|||||||
|
|
||||||
#ifndef CLOCK_REALTIME
|
#ifndef CLOCK_REALTIME
|
||||||
#define CLOCK_REALTIME 1
|
#define CLOCK_REALTIME 1
|
||||||
#define NEED_CLOCK_REALTIME 1
|
#define NEED_CLOCK_GETTIME 1
|
||||||
|
#ifndef HAVE_STRUCT_TIMESPEC
|
||||||
|
#define HAVE_STRUCT_TIMESPEC 1
|
||||||
|
struct timespec {
|
||||||
|
long tv_sec;
|
||||||
|
long tv_nsec;
|
||||||
|
};
|
||||||
|
#endif /* HAVE_STRUCT_TIMESPEC */
|
||||||
int clock_gettime(int clock_id, struct timespec *tp);
|
int clock_gettime(int clock_id, struct timespec *tp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user