Skip to content

Commit e3aa02b

Browse files
committed
Make use of MSVC specific macros for format specifiers
Where inttypes.h is not availabale for VS<=2012 the MSVC specific macros still can be used. See #257
1 parent a277ea7 commit e3aa02b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/objectc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@
2020
#include <stdio.h>
2121
#include <string.h>
2222

23-
#if !defined(_MSC_VER) || _MSC_VER >= 1800
23+
#if defined(_MSC_VER)
24+
#if _MSC_VER >= 1800
25+
#include <inttypes.h>
26+
#else
27+
#define PRIu64 "I64u"
28+
#define PRIi64 "I64i"
29+
#define PRIi8 "i"
30+
#endif
31+
#else
2432
#include <inttypes.h>
2533
#endif
2634

0 commit comments

Comments
 (0)