Re: Unix-domain sockets - abstract addresses

From: Keith Owens (kaos@ocs.com.au)
Date: Fri Aug 09 2002 - 21:19:13 EST


On Fri, 09 Aug 2002 18:41:04 -0700 (PDT),
"David S. Miller" <davem@redhat.com> wrote:
> From: Keith Owens <kaos@ocs.com.au>
> Date: Sat, 10 Aug 2002 11:35:04 +1000
>
> af_unix.c is linked into unix.o so we have -DKBUILD_MODNAME=unix. Alas
> we also have -Dunix=1. __stringify(KBUILD_MODNAME) -> __stringify(unix) ->
> "1" instead of "unix".
>
>This seems really tacky. There must be a better way to do this.
>Perhaps prepending some constant string prefix to these module
>names such that they will not collide with the namespace in
>this way. For example, "kmod_".

Adding a constant prefix to every label and string will increase the
size of the kernel. I would much rather find a way for cpp to strip
quotes from a #define, then -DKBUILD_OBJECT=\"unix\" has no problems.
But I don't know any cpp construct to convert KBUILD_OBJECT ("unix") to
bare 'unix' without the quotes. Undefining conflicting names is tacky
but it has the least (zero) impact on the kernel size.

ps. The variable name is KBUILD_OBJECT, not KBUILD_MODNAME. The
comment is wrong.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:21 EST