[FFmpeg-devel] [PATCH 2/3] lavfi/psnr: rename pow2 to pow_2

Ronald S. Bultje rsbultje at gmail.com
Mon Mar 27 18:38:00 EEST 2017


Hi,

On Sun, Mar 26, 2017 at 6:39 PM, Clément Bœsch <u at pkh.me> wrote:

> On Sun, Mar 26, 2017 at 06:17:57PM -0400, Ronald S. Bultje wrote:
> [...]
> > > I'll improve the message, but basically the djgpp libc can be
> configured
> > > to be POSIX only, where these functions functions and macro (pow2, PI)
> are
> > > not defined. We could do that in the configure (-D_POSIX_SOURCE).
> > >
> > > Unfortunately, DJGPP does not have posix_memalign(), and will lack its
> own
> > > memalign function we use in lavu/mem.c if we use -D_POSIX_SOURCE. (we
> > > could use the recently defunct memalign hack, but better use the proper
> > > allocation function).
> >
> >
> > I'm not sure I understand. The user might have installed djgpp instead of
> > libc. But we have no influence whatsoever over how the user compiled
> djgpp,
> > so FFmpeg should work with as well as without a posix-compiled djgpp,
> right?
> >
>
> pow2() and memalign() prototypes and macros like PI are exposed
> conditionally in their respective headers. So if you have _POSIX_SOURCE
> defined in your code and include math.h or stdlib.h, you will not see
> these symbols (even though they are present in the djgpp libc).


Oh I understand now, right. The difference between djgpp being posix or us
defining _posic_source was throwing me off...

Ronald


More information about the ffmpeg-devel mailing list