This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: gettimeofday and POSIX
- From: Pedro Alves <pedro_alves at portugalmail dot pt>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: Eric Blake <ebb9 at byu dot net>, newlib at sources dot redhat dot com
- Date: Thu, 05 Jul 2007 22:39:02 +0100
- Subject: Re: gettimeofday and POSIX
- References: <468D01AB.9050400@byu.net> <468D3018.9040700@redhat.com>
Hi Jeff,
Jeff Johnston wrote:
How about the attached patch instead? It goes through and cleans up
all the implementations as well so there is no need for the flag check.
--- libgloss/crx/time.c 5 Oct 2004 20:00:53 -0000 1.1
+++ libgloss/crx/time.c 5 Jul 2007 17:48:54 -0000
@@ -43,8 +43,9 @@ clock_t times (struct tms *buf)
}
/* _gettimeofday -- implement in terms of time. */
-int gettimeofday (struct timeval *tv, struct timezone *tz)
+int gettimeofday (struct timeval *tv, void *tzvp)
{
+ struct time *tz = (struct timezone *)tzvp;
struct timezone *tz = (struct timezone *)tzvp; ??
And why the casts? Too much c++ recently? :)
Cheers,
Pedro Alves