Skip to content

Commit 68159a4

Browse files
handle uint64_t redefinition error on Windows (#341)
Co-authored-by: Jeff McKenna <[email protected]>
1 parent 0e97742 commit 68159a4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

lib/imageio_png.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@
3333
#include <apr_strings.h>
3434

3535
#ifdef _WIN32
36-
typedef unsigned char uint8_t;
37-
typedef unsigned short uint16_t;
38-
typedef unsigned int uint32_t;
39-
typedef unsigned long int uint64_t;
36+
#include <stdint.h>
4037
#endif
4138

4239
#ifndef Z_BEST_SPEED

lib/util.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@
4545
#endif
4646

4747
#ifdef _WIN32
48-
typedef unsigned char uint8_t;
49-
typedef unsigned short uint16_t;
50-
typedef unsigned int uint32_t;
51-
typedef unsigned long int uint64_t;
48+
#include <stdint.h>
5249
#endif
5350

5451
const double mapcache_meters_per_unit[MAPCACHE_UNITS_COUNT] = {1.0,6378137.0 * 2.0 * M_PI / 360,0.3048};

0 commit comments

Comments
 (0)