> On Sept. 17, 2015, 12:17 p.m., Jie Yu wrote: > > src/Makefile.am, line 111 > > <https://reviews.apache.org/r/38030/diff/4/?file=1076134#file1076134line111> > > > > Have you guys looked at the code in the picojson? > > https://github.com/kazuho/picojson/blob/master/picojson.h#L61 > > > > Looks like that macro should be defined. I don't understand why this > > fixed the issue. > > Joseph Wu wrote: > So the issue is that other libraries like glog and protobuf have an > `#include <inttypes.h>` too. But the flag isn't defined when those libraries > call it. > Later on, when we include `picojson.h`, the fact that it defines the flag > doesn't do anything, since `inttypes.h` has already been included. > > I added a note in the next review to explain why we have an #undef (top > of the diff). Would a similar note be appropriate here? > > Jie Yu wrote: > Aha, got it. Wondering if that'll break glog/protobuf because they are > not expecting this Macro to be defined? > > Definitely worth adding what you've just said to the code as a > comment/note.
I think it's unlikely that these extra macros will break anything. It does add a bunch of items to the global namespace (See: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/inttypes.h.html). But the naming is odd/idiosyncratic enough that it's probably not going to conflict with anything that follows the google style guide. - Joseph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38030/#review99423 ----------------------------------------------------------- On Sept. 17, 2015, 2:01 p.m., Joseph Wu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/38030/ > ----------------------------------------------------------- > > (Updated Sept. 17, 2015, 2:01 p.m.) > > > Review request for mesos, Ben Mahler, Artem Harutyunyan, Joris Van > Remoortere, and Vinod Kone. > > > Bugs: MESOS-3345 > https://issues.apache.org/jira/browse/MESOS-3345 > > > Repository: mesos > > > Description > ------- > > Add `PICOJSON_USE_INT64` and `__STDC_FORMAT_MACROS` flag to mesos compilation > flags. > > > Diffs > ----- > > src/Makefile.am 2286366852b272c808490b6bd87ac9e894de57ac > > Diff: https://reviews.apache.org/r/38030/diff/ > > > Testing > ------- > > No testing done until the last patch in the chain. > > > Thanks, > > Joseph Wu > >
