From 0be2bc94e7ecd7b5555d114a54fc3a48b405ebbd Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Fri, 6 Jul 2007 16:56:30 +0000 Subject: 2007-07-06 Jeff Johnston * libc/include/sys/time.h (gettimeofday): Change to proper prototype where second parameter is void *. * libc/reent/gettimeofdayr.c (_gettimeofday_r): Change prototype accordingly. * libc/include/reent.h: Fix prototype for _gettimeofday_r. * libc/sys/arm/syscalls.c: Fix gettimeofday function signature. * libc/sys/rdos/gettod.c: Ditto. * libc/sys/sh/syscalls.c: Ditto. * libc/time/time.c (time): Change call to _gettimeofday_r to pass NULL as 2nd argument. --- newlib/libc/sys/arm/syscalls.c | 6 +++--- newlib/libc/sys/rdos/gettod.c | 2 +- newlib/libc/sys/sh/syscalls.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'newlib/libc/sys') diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c index 0e9cbc270..65c96b1e2 100644 --- a/newlib/libc/sys/arm/syscalls.c +++ b/newlib/libc/sys/arm/syscalls.c @@ -22,7 +22,7 @@ int _system _PARAMS ((const char *)); int _rename _PARAMS ((const char *, const char *)); int isatty _PARAMS ((int)); clock_t _times _PARAMS ((struct tms *)); -int _gettimeofday _PARAMS ((struct timeval *, struct timezone *)); +int _gettimeofday _PARAMS ((struct timeval *, void *)); void _raise _PARAMS ((void)); int _unlink _PARAMS ((const char *)); int _link _PARAMS ((void)); @@ -559,9 +559,9 @@ _raise (void) } int -_gettimeofday (struct timeval * tp, struct timezone * tzp) +_gettimeofday (struct timeval * tp, void * tzvp) { - + struct timezone *tzp = tzvp; if (tp) { /* Ask the host for the seconds since the Unix epoch. */ diff --git a/newlib/libc/sys/rdos/gettod.c b/newlib/libc/sys/rdos/gettod.c index b1801502d..66380e75c 100644 --- a/newlib/libc/sys/rdos/gettod.c +++ b/newlib/libc/sys/rdos/gettod.c @@ -8,7 +8,7 @@ struct timeval; struct timezone; -int gettimeofday(struct timeval *ptimeval, struct timezone *ptimezone) +int gettimeofday(struct timeval *ptimeval, void *ptimezone) { errno = ENOSYS; return -1; diff --git a/newlib/libc/sys/sh/syscalls.c b/newlib/libc/sys/sh/syscalls.c index f0e924297..f8ed7365f 100644 --- a/newlib/libc/sys/sh/syscalls.c +++ b/newlib/libc/sys/sh/syscalls.c @@ -185,7 +185,7 @@ _times (struct tms *tp) } int -_gettimeofday (struct timeval *tv, struct timezone *tz) +_gettimeofday (struct timeval *tv, void *tz) { tv->tv_usec = 0; tv->tv_sec = __trap34 (SYS_time); -- cgit v1.2.3