[FFmpeg-devel] [PATCH] remove MSVC cruft

Michael Niedermayer michaelni
Sat Feb 9 17:54:16 CET 2008


On Sat, Feb 09, 2008 at 04:10:18PM +0100, Reimar D?ffinger wrote:
> 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).

Iam fine with that as well.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I know you won't believe me, but the highest form of Human Excellence is
to question oneself and others. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080209/971740dc/attachment.pgp>



More information about the ffmpeg-devel mailing list