2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
* 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.
This commit is contained in:
parent
ba9af2d7ec
commit
0be2bc94e7
|
@ -1,3 +1,16 @@
|
||||||
|
2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
|
2007-07-06 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* libc/sys/linux/intl/dcigettext.c: Define HAVE_STPCPY.
|
* libc/sys/linux/intl/dcigettext.c: Define HAVE_STPCPY.
|
||||||
|
|
|
@ -80,7 +80,7 @@ extern int _wait_r _PARAMS ((struct _reent *, int *));
|
||||||
extern _ssize_t _write_r _PARAMS ((struct _reent *, int, const void *, size_t));
|
extern _ssize_t _write_r _PARAMS ((struct _reent *, int, const void *, size_t));
|
||||||
|
|
||||||
/* This one is not guaranteed to be available on all targets. */
|
/* This one is not guaranteed to be available on all targets. */
|
||||||
extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *tp, struct timezone *tzp));
|
extern int _gettimeofday_r _PARAMS ((struct _reent *, struct timeval *__tp, void *__tzp));
|
||||||
|
|
||||||
#ifdef __LARGE64_FILES
|
#ifdef __LARGE64_FILES
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ struct itimerval {
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* defined (__rtems__) || defined (__CYGWIN__) */
|
#endif /* defined (__rtems__) || defined (__CYGWIN__) */
|
||||||
|
|
||||||
int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__z));
|
int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz));
|
||||||
int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
|
int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *));
|
||||||
int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp));
|
int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp));
|
||||||
int _EXFUN(getitimer, (int __which, struct itimerval *__value));
|
int _EXFUN(getitimer, (int __which, struct itimerval *__value));
|
||||||
|
|
|
@ -40,7 +40,7 @@ ANSI_SYNOPSIS
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
int _gettimeofday_r(struct _reent *<[ptr]>,
|
int _gettimeofday_r(struct _reent *<[ptr]>,
|
||||||
struct timeval *<[ptimeval]>,
|
struct timeval *<[ptimeval]>,
|
||||||
struct timezone *<[ptimezone]>);
|
void *<[ptimezone]>);
|
||||||
|
|
||||||
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
|
@ -48,7 +48,7 @@ TRAD_SYNOPSIS
|
||||||
int _gettimeofday_r(<[ptr]>, <[ptimeval]>, <[ptimezone]>)
|
int _gettimeofday_r(<[ptr]>, <[ptimeval]>, <[ptimezone]>)
|
||||||
struct _reent *<[ptr]>;
|
struct _reent *<[ptr]>;
|
||||||
struct timeval *<[ptimeval]>;
|
struct timeval *<[ptimeval]>;
|
||||||
struct timezone *<[ptimezone]>;
|
void *<[ptimezone]>;
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
This is a reentrant version of <<gettimeofday>>. It
|
This is a reentrant version of <<gettimeofday>>. It
|
||||||
|
@ -63,7 +63,7 @@ int
|
||||||
_DEFUN (_gettimeofday_r, (ptr, ptimeval, ptimezone),
|
_DEFUN (_gettimeofday_r, (ptr, ptimeval, ptimezone),
|
||||||
struct _reent *ptr _AND
|
struct _reent *ptr _AND
|
||||||
struct timeval *ptimeval _AND
|
struct timeval *ptimeval _AND
|
||||||
struct timezone *ptimezone)
|
void *ptimezone)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ int _system _PARAMS ((const char *));
|
||||||
int _rename _PARAMS ((const char *, const char *));
|
int _rename _PARAMS ((const char *, const char *));
|
||||||
int isatty _PARAMS ((int));
|
int isatty _PARAMS ((int));
|
||||||
clock_t _times _PARAMS ((struct tms *));
|
clock_t _times _PARAMS ((struct tms *));
|
||||||
int _gettimeofday _PARAMS ((struct timeval *, struct timezone *));
|
int _gettimeofday _PARAMS ((struct timeval *, void *));
|
||||||
void _raise _PARAMS ((void));
|
void _raise _PARAMS ((void));
|
||||||
int _unlink _PARAMS ((const char *));
|
int _unlink _PARAMS ((const char *));
|
||||||
int _link _PARAMS ((void));
|
int _link _PARAMS ((void));
|
||||||
|
@ -559,9 +559,9 @@ _raise (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_gettimeofday (struct timeval * tp, struct timezone * tzp)
|
_gettimeofday (struct timeval * tp, void * tzvp)
|
||||||
{
|
{
|
||||||
|
struct timezone *tzp = tzvp;
|
||||||
if (tp)
|
if (tp)
|
||||||
{
|
{
|
||||||
/* Ask the host for the seconds since the Unix epoch. */
|
/* Ask the host for the seconds since the Unix epoch. */
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
struct timeval;
|
struct timeval;
|
||||||
struct timezone;
|
struct timezone;
|
||||||
|
|
||||||
int gettimeofday(struct timeval *ptimeval, struct timezone *ptimezone)
|
int gettimeofday(struct timeval *ptimeval, void *ptimezone)
|
||||||
{
|
{
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -185,7 +185,7 @@ _times (struct tms *tp)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
_gettimeofday (struct timeval *tv, struct timezone *tz)
|
_gettimeofday (struct timeval *tv, void *tz)
|
||||||
{
|
{
|
||||||
tv->tv_usec = 0;
|
tv->tv_usec = 0;
|
||||||
tv->tv_sec = __trap34 (SYS_time);
|
tv->tv_sec = __trap34 (SYS_time);
|
||||||
|
|
|
@ -43,7 +43,7 @@ _DEFUN (time, (t),
|
||||||
{
|
{
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
|
||||||
if (_gettimeofday_r (_REENT, &now, (struct timezone *) 0) >= 0)
|
if (_gettimeofday_r (_REENT, &now, NULL) >= 0)
|
||||||
{
|
{
|
||||||
if (t)
|
if (t)
|
||||||
*t = now.tv_sec;
|
*t = now.tv_sec;
|
||||||
|
|
Loading…
Reference in New Issue