Add compatibility shim for MSVC

This commit is contained in:
Marius Greuel
2021-12-28 11:26:09 +01:00
parent 8c4c9d0090
commit c035c91db5
18 changed files with 1086 additions and 38 deletions

View File

@@ -760,7 +760,11 @@ static int stk500_paged_write(PROGRAMMER * pgm, AVRPART * p, AVRMEM * m,
unsigned int page_size,
unsigned int addr, unsigned int n_bytes)
{
#ifdef _MSC_VER
unsigned char* buf = _alloca(page_size + 16);
#else
unsigned char buf[page_size + 16];
#endif
int memtype;
int a_div;
int block_size;