Subject: Re: Compiling NetBSD with another compiler.
To: None <tech-userlevel@netbsd.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: tech-userlevel
Date: 10/13/2007 14:48:53
 >> But I still don't understand one aspect.
 >> Why non-portable way of doing this renaming is used instead of
 >> just using macro like
 >> 
 >>    #define func func_new
 >> 
 >> for the example above. This may work for all compilers, not only
 >> gcc and pcc.

> The problem is that the #define has far too wide a scope.  Names of
> external functions can also be structure element names, and that
> would give massive problems with the order of #includes.

IMHO it's relatively easy to avoid this sort of conflicts in system
header files. There are only a few tens of renamed functions.
Also, #define can used only when renaming is not possible.
IMHO this is better than 
    #error "No function renaming possible"
and not supporting things other than gcc.

-- 
Best regards, Aleksey Cheusov.