From 981c91d72f535467f18d5311aac1ea1f0bc17600 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Wed, 19 Nov 2008 23:32:30 +0000 Subject: [PATCH] Change the prototype for usleep() to be more Cygwin-friendly. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@788 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 6 ++++++ avrdude.h | 2 +- ppiwin.c | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ede8cabe..f43a10ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-20 Joerg Wunsch + + * avrdude.h: Change the prototype for usleep() to be more Cygwin- + friendly. + * ppiwin.c: (Ditto.) + 2008-11-06 Joerg Wunsch Submitted by limor diff --git a/avrdude.h b/avrdude.h index 189103fd..2db9c9bd 100644 --- a/avrdude.h +++ b/avrdude.h @@ -46,7 +46,7 @@ extern "C" { #define ANTIWARP 3 #define usleep(us) Sleep(us/1000*ANTIWARP) */ -void usleep(unsigned long us); +int usleep(unsigned int us); #if !defined(HAVE_GETTIMEOFDAY) struct timezone; diff --git a/ppiwin.c b/ppiwin.c index f32940ef..49c83e3f 100644 --- a/ppiwin.c +++ b/ppiwin.c @@ -374,7 +374,7 @@ int gettimeofday(struct timeval *tv, struct timezone *unused){ #endif -void usleep(unsigned long us) +int usleep(unsigned int us) { int has_highperf; LARGE_INTEGER freq,start,stop,loopend; @@ -407,6 +407,8 @@ void usleep(unsigned long us) } DEBUG_DisplayTimingInfo(start, stop, freq, us, has_highperf); + + return 0; } #endif