From d10c930a25eb4850e15dec870eb46c92a636f95c Mon Sep 17 00:00:00 2001 From: joerg_wunsch Date: Fri, 8 Jan 2010 20:02:35 +0000 Subject: [PATCH] * bitbang.c: Fix Win32 build error: move freq up to the file level. * buspirate.c: Fix Win32 build warning: include to to get a declaration for alloca(). git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@898 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 7 +++++++ bitbang.c | 3 +-- buspirate.c | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30b0789a..199a0637 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-08 Joerg Wunsch + + * bitbang.c: Fix Win32 build error: move freq up to the file + level. + * buspirate.c: Fix Win32 build warning: include to + to get a declaration for alloca(). + 2010-01-08 Thomas Fischl bug #28520: Programming with USBasp with low clock speed fails diff --git a/bitbang.c b/bitbang.c index c7ba89b1..24b85183 100644 --- a/bitbang.c +++ b/bitbang.c @@ -44,6 +44,7 @@ static int delay_decrement; #if defined(WIN32NATIVE) static int has_perfcount; +static LARGE_INTEGER freq; #else static volatile int done; @@ -63,8 +64,6 @@ static void alarmhandler(int signo) static void bitbang_calibrate_delay(void) { #if defined(WIN32NATIVE) - static LARGE_INTEGER freq; - /* * If the hardware supports a high-resolution performance counter, * we ultimately prefer that one, as it gives quite accurate delays diff --git a/buspirate.c b/buspirate.c index 443efec5..ea1b6c2e 100644 --- a/buspirate.c +++ b/buspirate.c @@ -41,6 +41,9 @@ #include #include #include +#if defined(WIN32NATIVE) +# include /* for alloca() */ +#endif #include "avrdude.h" #include "avr.h"