Thanks for all suggestions.

On Sun, Apr 23, 2017 at 12:52 PM Stuart Henderson <[email protected]>
wrote:

> On 2017/04/23 21:18, Jeremie Courreges-Anglas wrote:
> > Greg Steuck <[email protected]> writes:
> >
> > > On Sun, Apr 23, 2017 at 12:07 AM Greg Steuck <[email protected]> wrote:
> > >
> > >> I found some references to BSD_SOURCE and POSIX_C_SOURCE as being
> related,
> > >> but I don't see a cookie-cutter recipe to borrow, so I thought I
> should ask.
> > >>
> > >
> > > Adding CXXFLAGS="-D_POSIX_SOURCE" to CONFIGURE_ENV is doing the trick.
> Is
> > > this the canonical approach?
> >
> > Not really, because then you're overriding CXXFLAGS (-O2 -pipe by
> > default).
>

That it does. It was a bit of a boon though for fast iteration :) Can I get
the effect on the command line somehow to avoid building -O2 when I want to
e.g. run the tests more quickly?

> CONFIGURE_ENV =               CPPFLAGS="-D_POSIX_C_SOURCE=200809L"
>

This seems like a winner.


> >
> > works and would teach the build to see anything recent and in
> > posix.  See /usr/include/sys/cdefs.h for a list of the values you can
> > pass for _POSIX_C_SOURCE.
>
> Note that this also disables __BSD_VISIBLE which can in turn result in
> things
> failing.


Lucky enough for me, lack of __BSD_VISIBLE is not causing trouble.


> I don't think there is a "cookie cutter" approach, different situations
> need different things.
>

Glad I asked then.

BTW, Stuart, fortuitous timing with your gtest upgrade. I was about to
embark on that to make new protobuf testable.

Thanks
Greg

Reply via email to