|
Message-ID: <53B01902.3030509@gentoo.org> Date: Sun, 29 Jun 2014 15:47:46 +0200 From: Luca Barbato <lu_zero@...too.org> To: musl@...ts.openwall.com Subject: Re: Is there a "right" way to deal with error.h inclusions? On 29/06/14 14:34, Weldon Goree wrote: > Hi all, > > I've been dealing with unconditional inclusions of error.h in a pretty > ad-hoc way in building different things against musl. Does anybody know > of an autohell macro that could be reliably wrapped around error.h > inclusions and its defined functions? (Alternately, any non-auto* based > solution that's worked for people?) Do you need to check for presence or presence of a symbol in the header? For autotools AC_EGREP_CPP could work e.g. AC_EGREP_CPP(error_h_test_succeeded, [ #include <error.h> #ifdef SYMBOL error_h_test_succeeded #endif ]) WAF has a quite nifty check_statement() function. check_statement('error.h', '#ifndef SYMBOL' '#error' '#endif') The Libav build system has a check_cpp_condition that works in the same way. check_cpp_condition error.h "defined SYMBOL" lu
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.