[MPlayer-dev-eng] Some small AmigaOS4 patches to compile last mplayer

Diego Biurrun diego at biurrun.de
Fri Sep 19 15:41:50 CEST 2008


On Fri, Sep 19, 2008 at 12:49:47PM +0200, Andrea Palmatè wrote:
> 
> Il giorno 19/set/08, alle ore 12:00, mplayer-dev-eng-request at mplayerhq.hu 
>   ha scritto:
> 
> >> Another thing.
> >> Where i must send the diff of libdvdcss?
> >
> > Send it to the libdvdcss-devel mailing list.
> >
> ok...
> 
> > This file is never added, the patch is broken.
> ...
> >
> > You got this whole portability thing backwards.  The goal is clearly  
> > not
> > to have 'if some_os' everywhere...
> ...
> >
> > These should also really be proper configure checks.
> >
> ...
> > same below
> >
> ...
> >
> > ditto
> >
> ...
> > This file has no __foo_os__ ugliness in it, we should not be adding  
> > any.
> >
> Sorry, just in my ignorance.. but can you explain me a way to proposet  
> pathc?
> It is simply to say. No.. no.. no.. and no..

It's also simple to litter a codebase with #ifdef and then leave it for
others to maintain.

> If I want to add a new platform implementation, like glob for example,  
> in which way i can do it?

First off: If you add a new file, you have to add it to the patch as
well.

> It is simply to tell "We don't want to add any other platform to those  
> existent. Stop"

I never said this.

> IMHO my patches was nothing of so strange. i've post a lot of patches  
> to many other programs (and also on mplayer..) and no one has rejected  
> them only because there is another #ifdef MYOS IMHO.

That way lies total madness.  Wonderful examples are the screen and wget
source code if you want to see some scary #ifdef hell.

If you want to code in a portable way, add a check for $FEATURE to
configure and then add something like

#ifndef $FEATURE
foo(); bar();
#endif

to the code.  This way all platforms that do not support $FEATURE will
be supported and your platform will not be broken if somebody adds
support for $FEATURE to it.

Even better would be a library that adds $FEATURE to your OS.  You will
only have to write it once and suddenly many programs will run on your
OS.

Diego

P.S.: Fix your mailer, it breaks threads.



More information about the MPlayer-dev-eng mailing list