* configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.

* libc/sys/sh/syscalls.c (_gettimeofday): New.
This commit is contained in:
Alexandre Oliva 2001-01-25 21:40:28 +00:00
parent 6bdf786b95
commit 610b895aa1
3 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2001-01-25 Alexandre Oliva <aoliva@redhat.com>
* configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.
* libc/sys/sh/syscalls.c (_gettimeofday): New.
2001-01-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (signgam): Regress previous fix as

View File

@ -429,6 +429,7 @@ case "${host}" in
syscall_dir=syscalls
;;
sh*-*-*)
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
syscall_dir=syscalls
;;
sparc-sun-sunos*)

View File

@ -1,6 +1,7 @@
#include <_ansi.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "sys/syscall.h"
int errno;
@ -174,3 +175,11 @@ _pipe (int *fd)
{
return __trap34 (SYS_pipe, fd);
}
int
_gettimeofday (struct timeval *tv, struct timezone *tz)
{
tv->tv_usec = 0;
tv->tv_sec = __trap34 (SYS_time);
return 0;
}