Hi, On Thu, Dec 24, 2015 at 11:47 AM, Ganesh Ajjanagadde <gajja...@mit.edu> wrote:
> On Thu, Dec 24, 2015 at 8:37 AM, Ronald S. Bultje <rsbul...@gmail.com> > wrote: > > Hi, > > > > On Wed, Dec 23, 2015 at 7:49 PM, Ganesh Ajjanagadde <gajja...@mit.edu> > > wrote: > > > >> What I meant was the following (I casually labelled it as ifdef, I > >> meant some preprocessor stuff): > >> #if !HAVE_EXP10 || !(defined(_GNU_SOURCE)) > >> ... > >> #endif > >> > >> I have reproduced your issues via a minimal configure line, and the > >> above idea fixes those. Do you see any issues? Of course, there is the > >> theoretical one of a libc (more precisely libm) having exp10 without > >> GNU_SOURCE, but in that case it should just use the fallback. > > > > > > I don't like this as much. In all other instances of any other function > > whatsoever, we just check if the function exists. We should do the same > > thing here. If implemented correctly in configure, #if !HAVE_EXP10 should > > always work. If we can fail to compile when compiling some video filter, > we > > can fail alike when testing for the feature in configure. > > It is not easy to do via configure, as Michael points out since > GNU_SOURCE may get enabled from pkg-config and other steps in > configure. Basically then this will need to be deferred to a stage way > below in configure, once all cflags have been set to their values. > This will add IMHO greater complexity to configure than the ugly hack > above. > > Ultimately, it is a question of which one is preferred. If you still > feel this way, I will delve a bit into configure to see what can be > done. exp10 is just one of the many bits where this will come in useful, so I'd rather have a solution that covers all bases than adding many ||GNU_SOURCE hacks all across the codebase in random, undefined places. Ronald _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel