public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* af_unix.c, KBUILD_MODNAME and unix
@ 2005-03-20 13:45 Magnus Damm
  2005-03-20 13:52 ` Russell King
  0 siblings, 1 reply; 6+ messages in thread
From: Magnus Damm @ 2005-03-20 13:45 UTC (permalink / raw)
  To: linux-kernel

Hello All,

af_unix.c is currenty built with KBUILD_MODNAME=unix. This seems to
work rather well today, but if someone actually tries to use
KBUILD_MODNAME then they will end up with a preprocessor surprise:
KBUILD_MODNAME -> unix -> 1, because "unix" is defined to 1.

With other words, if someone adds module_param(foo,...) code to
af_unix.c and compiles the code as built in then they will have to use
"1.foo" to set the variable instead of "unix.foo" as expected.

Solution? #undef unix?

I came across this when trying to autogenerate parameter documentation...

/ magnus

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <fa.jj4t62d.1j5ccif@ifi.uio.no>]

end of thread, other threads:[~2005-03-20 21:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-20 13:45 af_unix.c, KBUILD_MODNAME and unix Magnus Damm
2005-03-20 13:52 ` Russell King
2005-03-20 14:01   ` Jan Engelhardt
2005-03-20 15:52     ` Magnus Damm
2005-03-20 21:51       ` Jan Engelhardt
     [not found] <fa.jj4t62d.1j5ccif@ifi.uio.no>
2005-03-20 20:21 ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox