[FFmpeg-devel] [PATCH] remove MSVC cruft
Diego Biurrun
diego
Tue Feb 12 00:55:15 CET 2008
On Sat, Feb 09, 2008 at 08:10:05PM +0100, Diego Biurrun wrote:
> On Sat, Feb 09, 2008 at 02:51:53PM +0100, Michael Niedermayer wrote:
> > On Sat, Feb 09, 2008 at 02:09:04PM +0100, Diego Biurrun wrote:
> > > On Sat, Feb 09, 2008 at 02:06:01PM +0100, Diego Biurrun wrote:
> > > > As noted by Reimar, the following two lines in libavutil/mem.h are
> > > > probably MSVC cruft:
> > > >
> > > > #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
> > > > #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const
> > > >
> > > > I suggest the attached patch removing them.
> > >
> > > *sigh*
> >
> > I am against it.
> >
> > it rather should be
> > #elif HAVE_DECLSPEC
> > #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
> > #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
> > #else
> > #warning no align and asm directives, this might fail
> > #define DECLARE_ALIGNED(n,t,v) t v
> > #define DECLARE_ASM_CONST(n,t,v) static const t v
> > #endif
> >
> > There are people who maintain a hacked up version of ffmpeg which does
> > compile under msvc. Theres no need to make their work harder by removing
> > clean and seperated code. Its only the messy parts which we should reject.
>
> These two lines do not help them. Also, this code is not clean and
> separated, it is the fallback when __GNUC__ is not defined. So anybody
> trying compiler X will run into problems. I don't see anybody coming
> up with a proper configure check. Until then these lines do more harm
> than good and should IMO be removed.
May I insist here? The fallback case should definitely not be MSVC,
i.e. an unsupported and non-standards-compliant compiler.
Diego
More information about the ffmpeg-devel
mailing list