[Ffmpeg-devel] [PATCH] WinCE support (via gcc cross-compiling)
Sun Jan 22 20:19:16 CET 2006
On Sun, 22 Jan 2006 18:28:16 +0100
Diego Biurrun <diego at biurrun.de> wrote:
> On Sun, Jan 22, 2006 at 05:20:07PM +0000, Gildas Bazin wrote:
> > On Sunday 22 January 2006 05:46, Diego Biurrun wrote:
> > > On Sat, Dec 03, 2005 at 01:18:24AM +0000, Gildas Bazin wrote:
> > > >
> > > > So here is a patch that adds an --enable-mingwce config option to the
> > > > build and fixes a few compiling problems with WinCE.
> > > >
> > > > --- libavformat/os_support.c 9 Nov 2004 17:27:33 -0000 1.4
> > > > +++ libavformat/os_support.c 2 Dec 2005 23:53:22 -0000
> > > > @@ -18,7 +18,8 @@
> > > > */
> > > > #include "config.h"
> > > > #include "avformat.h"
> > > > -#ifdef CONFIG_WIN32
> > > > +#if defined(CONFIG_WINCE)
> > > > +#elif defined(CONFIG_WIN32)
> > >
> > > Huh? This change does nothing..
> > When compiling for WinCE we define both CONFIG_WIN32 and CONFIG_WINCE to
> > avoid too many code changes since most Win32 specific parts are also valid
> > for WinCE.
> > There are just a few cases where we don't actually want the Win32 code and
> > the one above is one of them.
> Maybe I'm not being clear..
> You have added
> +#if defined(CONFIG_WINCE)
> +#elif defined(CONFIG_WIN32)
> Thus effectively making #if defined(CONFIG_WINCE) into a noop since
> nothing comes after it before the #elif ...
What you didn't noticed is that CONFIG_WIN32 is now in a #elif section,
so this CONFIG_WIN32 code is now no more parsed when CONFIG_WINCE is defined.
So yes, this hunk seem to be useful, despite being quite ugly.
Something like this would probably be better :
#if defined(CONFIG_WIN32) && !defined(CONFIG_WINCE)
More information about the ffmpeg-devel