All of lore.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: af_unix.c, KBUILD_MODNAME and unix
Date: Sun, 20 Mar 2005 14:45:36 +0100	[thread overview]
Message-ID: <aec7e5c305032005451899b18b@mail.gmail.com> (raw)

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

             reply	other threads:[~2005-03-20 13:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-20 13:45 Magnus Damm [this message]
2005-03-20 13:52 ` af_unix.c, KBUILD_MODNAME and unix 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aec7e5c305032005451899b18b@mail.gmail.com \
    --to=magnus.damm@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.