Subject: Re: [boost] 1.65 build failure on FreeBSD 11.1
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-08-25 06:25:06
On 25/08/2017 17:42, Antony Polukhin wrote:
> FreeBSD has the required function definition here:
> It is available if _GNU_SOURCE or _BSD_SOURCE macro is defined.
> I have no idea why _BSD_SOURCE is not defined on FreeBSD. If there's
> some file that defines those macro, please send me the file name and
> path, and I'll include it in the Stacktrace library before the
> inclusion of unwind.h,
_GNU_SOURCE and _BSD_SOURCE (among others) are never defined in the
library headers -- they are application/project-level settings to
indicate that the application author is willing to sacrifice portability
in order to have access to additional features, and which of the
(sometimes incompatible) extensions they prefer.
Library authors don't get to choose (except when building private
translation units); they have to adapt to whatever the application picked.
ie. you should probably be testing those macros and either selecting
alternate functionality or emitting a more comprehensible warning/error
if not defined, rather than let it generate a regular missing symbol error.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk