Use compiler-defined constants to deduce endianness

Most compilers already define __BYTE_ORDER__, __ORDER_LITTLE_ENDIAN__
and __ORDER_BIG_ENDIAN__, but not all systems have <arpa/inet.h>
and <endian.h>. For instance, those two headers are missing on
Windows under Visual Studio. Using the compiler-defined constants here
increases portability.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Fix comparison between signed and unsigned numbers

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Drop variable-length arrays and explicitely request memory

Variable-length array are a C99 feature, so in theory we could use
them. However, some crappy IDE called Visual Studio does only support
a small subset of C99, even in its 2013 version, and variable-length
arrays are not part of it.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
iio_info: Fix to comply with ISO C99

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Fix iio.h header for use with Visual Studio

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Make public API visible in DLLs built for Windows

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>