[OpenAFS-devel] which OS's can't handle prototypes in kernel
code?
Neulinger, Nathan
nneul@umr.edu
Mon, 11 Jun 2001 13:13:06 -0500
> I believe that the more common way of handling this is to
> use the __P() macro, which would be defined in sys/cdefs.h
Ah. I wasn't familiar with that macro, although I have seen it used.
> On the other hand, I'm generally in favor of just using
> ANSI prototypes everywhere. I deal with at least eight
> different operating systems, and they all have compilers
> which understand prototypes.
>
> Also note that it's a *compiler* which would not understand
> prototypes, not a "system". So there may be OS's which have
> compilers that do not understand prototypes, but those same
> systems probably have some other C compiler available which
> DOES know about prototypes.
The issue is that on some systems, building kernel code forces the choice of
what compiler to use, and often, the kernel compilers are very lacking (i.e.
I know the c compiler on HP-UX used for the kernel has lots of limitations.)
Using __P() might be a good choice though.
-- Nathan