freebsd-src/usr.sbin/xntpd/lib/machines.c

44 lines
740 B
C
Raw Normal View History

1994-02-03 22:09:07 +00:00
/* machines.c - provide special support for peculiar architectures
1993-12-21 18:36:48 +00:00
*
* Real bummers unite !
1994-02-03 22:09:07 +00:00
*
* $Id:$
1993-12-21 18:36:48 +00:00
*/
1994-02-03 22:09:07 +00:00
#include "ntp_stdlib.h"
1993-12-21 18:36:48 +00:00
#ifdef SYS_PTX
#include <sys/types.h>
#include <sys/procstats.h>
1994-02-03 22:09:07 +00:00
int
settimeofday(tvp)
1993-12-21 18:36:48 +00:00
struct timeval *tvp;
{
1994-02-03 22:09:07 +00:00
return (stime(&tvp->tv_sec)); /* lie as bad as SysVR4 */
1993-12-21 18:36:48 +00:00
}
1994-02-03 22:09:07 +00:00
int
gettimeofday(tvp)
1993-12-21 18:36:48 +00:00
struct timeval *tvp;
{
/*
* hi, this is Sequents sneak path to get to a clock
* this is also the most logical syscall for such a function
*/
1994-02-03 22:09:07 +00:00
return (get_process_stats(tvp, PS_SELF, (struct procstats *) 0,
(struct procstats *) 0));
1993-12-21 18:36:48 +00:00
}
#endif
1994-02-03 22:09:07 +00:00
#if !defined(NTP_POSIX_SOURCE) || defined(NTP_NEED_BOPS)
void
ntp_memset(a, x, c)
char *a;
int x, c;
1993-12-21 18:36:48 +00:00
{
1994-02-03 22:09:07 +00:00
while (c-- > 0)
*a++ = x;
1993-12-21 18:36:48 +00:00
}
1994-02-03 22:09:07 +00:00
#endif /*POSIX*/