[FFmpeg-devel] [PATCH] fix compilation (was Re: r12489 broke all builds)
Wed Mar 19 11:40:16 CET 2008
On Wed, Mar 19, 2008 at 08:38:43AM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > The cleanest approuch is to never include headers from other headers.
> Wherever did you get that notion? It is pure madness. If you
> disagree, come visit me at my dayjob, where some madmen operated under
> that rule for years. The resulting chaos is hard to imagine.
I have no problem believing the chaos, but I doubt that header inclusion
rules are the reason. At least I can't see that much of MPlayer's chaos
would have come from _that_ rule.
> > But i suspect that i, ivan and arpi are in the minority with that view.
> I didn't know you were that many.
Well, I do not like headers including everything too much either,
because it makes it less clear which headers one is supposed to include.
As an example (that probably can not happen in exactly this way, so just
to give you an idea of what I think of) a file might include bswap.h,
then later adds endian dependent code under #ifdef WORDS_BIGENDIAN.
Later then someone removes the bswap.h include and suddenly
WORDS_BIGENDIAN never gets defined since nobody included any other
header - since it was not necessary, due to bswap.h including
everything, stdint.h, common.h, config.h,...
More information about the ffmpeg-devel