diff options
Diffstat (limited to 'test/read-png.c')
-rw-r--r-- | test/read-png.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/read-png.c b/test/read-png.c index 96259df..ff311c2 100644 --- a/test/read-png.c +++ b/test/read-png.c @@ -35,6 +35,18 @@ # include <inttypes.h> #elif HAVE_SYS_INT_TYPES_H # include <sys/int_types.h> +#elif defined(_MSC_VER) + typedef __int8 int8_t; + typedef unsigned __int8 uint8_t; + typedef __int16 int16_t; + typedef unsigned __int16 uint16_t; + typedef __int32 int32_t; + typedef unsigned __int32 uint32_t; + typedef __int64 int64_t; + typedef unsigned __int64 uint64_t; +# ifndef HAVE_UINT64_T +# define HAVE_UINT64_T 1 +# endif #else #error Cannot find definitions for fixed-width integral types (uint8_t, uint32_t, etc.) #endif @@ -79,7 +91,7 @@ read_png_argb32 (const char *filename, { int i; FILE *file; - static const int PNG_SIG_SIZE = 8; +#define PNG_SIG_SIZE 8 unsigned char png_sig[PNG_SIG_SIZE]; int sig_bytes; png_struct *png; |