[FFmpeg-devel] [PATCH 1/2] Fix clashes with 'I' and 'complex' defined in complex.h

wm4 nfxjfg at googlemail.com
Wed May 7 20:36:44 CEST 2014


On Thu, 8 May 2014 03:40:46 +1000
Matt Oliver <protogonoi at gmail.com> wrote:

> On 8 May 2014 00:40, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
> 
> > On Wed, May 7, 2014 at 3:42 PM, Matt Oliver <protogonoi at gmail.com> wrote:
> > > complex.h creates defines for 'I' and 'complex' which clash with several
> > > identically named variables used within FFmpeg. This is only an issue
> > when
> > > including complex.h which previously has never been done (hence no
> > problem
> > > previously). However complex.h is included automatically by icl's math.h
> > > header which breaks compilation with icl (and math.h is included almost
> > > everywhere).
> > >
> > > This patch simply renames the offending variables. i.e. 'I' -> 'i' etc.
> >
> > These are very simple and common names, and will break again in the future.
> > You should find a better solution for broken compilers.
> >
> > - Hendrik
> >
> 
> I was a bit surprised at the use of such common names as well. Strangely
> these are not just icl specific but is part of the C standard, its just icl
> is the only compiler that includes them by default.

But including the header recursively in this place _violates_ the C
standard.

> Anyway after watching FATE run all day this was the best I came up with at
> the time. Your comments are correct in that these problems will arise again
> in the future so with some additional thought I have made an improved
> workaround that doesnt need these changes any more.
> 
> This patch can now be ignored.



More information about the ffmpeg-devel mailing list