This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gettimeofday and POSIX


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]