[FFmpeg-devel] Question on libbrokenos support

Rich Felker dalias
Wed Jan 9 03:27:41 CET 2008


On Tue, Jan 08, 2008 at 07:18:10PM +0100, Michael Niedermayer wrote:
> On Tue, Jan 08, 2008 at 12:56:51PM -0500, Rich Felker wrote:
> > On Tue, Jan 08, 2008 at 06:44:16PM +0100, Michael Niedermayer wrote:
> > > On Tue, Jan 08, 2008 at 05:12:36PM +0100, Luca Abeni wrote:
> > > [...]
> > > > > For headers with actual content, do a ln -s to
> > > > > _actualheadername.h or echo #include "_actualheadername.h" >>
> > > > > actualheadername.h where that _actualheadername.h is part of svn (in
> > > > > libos/*, again).
> > > > In this way, I prevent the inclusion of the header provided by the OS, no?
> > > > In the example above, I need to include the sys/socket.h from the OS for
> > > > having some definitions, and to provide some other definitions in
> > > > libbrokenos's header. Or are you saying that the configure can merge the
> > > > two headers, and libbrokenos can force the inclusion of this "merged header"?
> > > > That could be a solution; I'll think about it...
> > > 
> > > What ronald meant i think is:
> > > /usr/local/include/sys/original_socket.h which is a 
> > > symlink to /usr/include/sys/socket.h
> > > 
> > > then you can just #include <sys/original_socket.h> to include the system header
> > 
> > Locating and making a symlink to the original header is both a lot
> > more difficult and a lot more nonportable than using #include_next.
> > As everyone knows I detest gccisms but I detest hacks like this just
> > as much..
> 
> Making libos dependant on gcc is a very big problem, i dont think ill agree
> to it.

If a system is so broken already, the non-gcc compilers for it
probably provide environments that are a whole order of magnitude more
broken...

> Locating a header with the gnu toolchain (your solution needs it to be used
> for all applications using libos, mine just needs it during libos install)
> is easy:
> 
> just parse the output from
> echo '#include <sys/socket.h>' | cpp -M
> or look at the directories from
> cpp -v

These are gccisms too. Do you see a -M option in:
http://www.opengroup.org/onlinepubs/009695399/utilities/c99.html
A "cpp" command does not even appear in:
http://www.opengroup.org/onlinepubs/009695399/utilities/contents.html

> or even take the first sys/socket.h from
> echo '#include <sys/socket.h>' | cpp

Huh?

Rich




More information about the ffmpeg-devel mailing list