Skip to content

Commit

Permalink
fix compiler warning on __STDC_FORMAT_MACROS redef
Browse files Browse the repository at this point in the history
Fixes kazuho#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.
  • Loading branch information
NikolausDemmel authored May 13, 2020
1 parent 5440d44 commit 43fd9d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions picojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cerrno>
#if __cplusplus >= 201103L
#include <cinttypes>
Expand Down

0 comments on commit 43fd9d8

Please sign in to comment.