From 6bfb5f1f94c4b17387125d50ef6657e092d02a78 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@788 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ChangeLog | 6 ++++++ avrdude/avrdude.h | 2 +- avrdude/ppiwin.c | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index ede8cabe..f43a10ab 100644 --- a/avrdude/ChangeLog +++ b/avrdude/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/avrdude.h b/avrdude/avrdude.h index 189103fd..2db9c9bd 100644 --- a/avrdude/avrdude.h +++ b/avrdude/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/avrdude/ppiwin.c b/avrdude/ppiwin.c index f32940ef..49c83e3f 100644 --- a/avrdude/ppiwin.c +++ b/avrdude/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