Re: [PATCH] bring sanity to div64.h and do_div usage

Andreas Schwab
2002-02-22T15:56:19Z

Jeff Garzik <jgarzik@mandrakesoft.com> writes:

|> Jes Sorensen wrote:
|> >
|> > >>>>> "Jeff" == Jeff Garzik <jgarzik@mandrakesoft.com> writes:
|> >
|> > Jeff> Jes Sorensen wrote:
|> > >> __mc68000__ is the correct define, I don't know who put in
|> > >> CONFIG_M68K but it doesn't belong there.
|> >
|> > Jeff> I disagree -- look at arch/*/config.in.
|> >
|> > Jeff> Each arch needs to define a CONFIG_$ARCH.
|> >
|> > Why? CONFIG_$ARCH only makes sense if you can enable two architectures
|> > in the same build. What does CONFIG_M68K give you that __mc68000__
|> > doesn't provide?
|>
|> 1) it is a Linux kernel standard. all arches save two define
|> CONFIG_$arch.
|>
|> 2) you have two tests, "ARCH==m68k" in config.in and "__mc68000__" in C
|> code. CONFIG_M68K means you only test one symbol, the same symbol, in
|> all code.
|>
|> 3) as this thread shows, due to #1, users -expect- that CONFIG_M68K will
|> exist

If consistency is your goal then CONFIG_I386 should be defined.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."