org-arl / unet-contrib

Unet user contributions
BSD 3-Clause "New" or "Revised" License
11 stars 15 forks source link

Minor fixes for compilation on Windows (UnetSocket C APIs) #57

Closed prasadtiru closed 3 years ago

prasadtiru commented 3 years ago

Few minor fixes were needed to compile on Windows after addition of more sample programs.

notthetup commented 3 years ago

I guess we need to do the changes because variable-length arrays aren't allowed in msvc?

prasadtiru commented 3 years ago

That is correct. Having something like float buf[siglen] where siglen is a variable initialized was causing a problem.

notthetup commented 3 years ago

TIL Variable-length arrays are not a kosher C feature.. https://stackoverflow.com/questions/1887097/why-arent-variable-length-arrays-part-of-the-c-standard and https://en.wikipedia.org/wiki/C11_(C_standard_revision)