avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] problem with win32 cygwin build - gettimeofday conflic


From: Joerg Wunsch
Subject: Re: [avrdude-dev] problem with win32 cygwin build - gettimeofday conflict
Date: Sun, 20 Aug 2006 08:55:21 +0200
User-agent: Mutt/1.5.11

As Neil Davey wrote:

> Grabbed the latest version from CVS lastnight to build it on win32
> cygwin.  The build failed with a complaint about gettimeofday type
> conflict.

Well, the existing implementation in ppiwin.c was in heavy
disagreement with the common prototype for gettimeofday():

void gettimeofday(struct timeval *, void *);

vs.

int gettimeofday(struct timeval *, struct timezone *);

I did the following:

. changed the prototype to match the common Unix version
. added a test for gettimeofday() to configure.ac
. #include ac_cfg.h in ppiwin.c, and define the replacement
  only if !defined(HAVE_GETTIMEOFDAY)

This will hopefully get you running on Cygwin.

Only remaining question is whether struct timezone will be found on
!Cygwin Win32 systems.  However, as <sys/time.h> is included
unconditionally, I hope so.  There's also a test for whether
<sys/time.h> does exist at all, but that test has not been used in
ppiwin.c.  Should struct timezone not exist in MinGW environments, we
could work around that by if defined(HAVE_SYS_TIME_H), maybe.

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]