diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2001-01-25 21:40:28 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2001-01-25 21:40:28 +0000 |
commit | 610b895aa1cb734fd656c8fbb22c74eb97075bed (patch) | |
tree | c158c41f150a771269b76d5803a86d224cd22d06 /newlib | |
parent | 6bdf786b95e920ef4fdabc48f8f8f37abef82188 (diff) | |
download | newlib-610b895aa1cb734fd656c8fbb22c74eb97075bed.zip newlib-610b895aa1cb734fd656c8fbb22c74eb97075bed.tar.gz newlib-610b895aa1cb734fd656c8fbb22c74eb97075bed.tar.bz2 |
* configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.
* libc/sys/sh/syscalls.c (_gettimeofday): New.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/configure.host | 1 | ||||
-rw-r--r-- | newlib/libc/sys/sh/syscalls.c | 9 |
3 files changed, 15 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 22dddf3..27fe6ba 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -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 diff --git a/newlib/configure.host b/newlib/configure.host index aba941e..1df6201 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -429,6 +429,7 @@ case "${host}" in syscall_dir=syscalls ;; sh*-*-*) + newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY" syscall_dir=syscalls ;; sparc-sun-sunos*) diff --git a/newlib/libc/sys/sh/syscalls.c b/newlib/libc/sys/sh/syscalls.c index 3626c0a..f976114 100644 --- a/newlib/libc/sys/sh/syscalls.c +++ b/newlib/libc/sys/sh/syscalls.c @@ -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; +} |