From 43fd9d8f3497706b0abd968c734cc7d5d73b4516 Mon Sep 17 00:00:00 2001 From: Nikolaus Demmel Date: Wed, 13 May 2020 19:36:24 +0200 Subject: [PATCH] fix compiler warning on __STDC_FORMAT_MACROS redef Fixes #91 Without this, if I include 2 libraries that define this macro, I get warnings like ``` warning: '__STDC_FORMAT_MACROS' macro redefined [-Wmacro-redefined] ``` This is on macos 10.15 with AppleClang 11. --- picojson.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/picojson.h b/picojson.h index ef4b903..708a067 100644 --- a/picojson.h +++ b/picojson.h @@ -75,7 +75,9 @@ extern "C" { // experimental support for int64_t (see README.mkdn for detail) #ifdef PICOJSON_USE_INT64 +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif #include #if __cplusplus >= 201103L #include