[FFmpeg-devel] [PATCH] remove MSVC cruft
Reimar Döffinger
Reimar.Doeffinger
Sat Feb 9 16:10:18 CET 2008
Hello,
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.
Just as well for me, but I very much dislike the current way of making
the least supported variant the default case.
Though what I do not like much about your suggestion is that the default
case will now probably create broken code with only a warning...
Given that Intel and Solaris compilers both (partially?) support the gcc syntax, I'd
suggest to make the gcc case the default one (assuming nobody wants to
make up a proper configure check).
Greetings,
Reimar D?ffinger
More information about the ffmpeg-devel
mailing list