[OpenAFS-devel] osi_Panic on AIX and IRIX

Simon Wilkinson sxw@inf.ed.ac.uk
Tue, 9 Feb 2010 18:45:50 +0000


On 9 Feb 2010, at 18:37, Chaz Chandler wrote:

> Some recent changes to rx_prototypes.h have raised a new question =
about
> how to handle osi_Panic on AIX and IRIX, which don't have vprintf in =
the
> kernel.  (Though IRIX, at least, does have vprintf in libc.)
>=20
> Here's where osi_Panic's non-vararg version is being declared in
> rx_prototypes.h:
> ...
> # elif (defined(AFS_AIX_ENV) && !defined(AFS_AIX61_ENV)) ||
> defined(AFS_SGI_ENV)
> extern void osi_Panic(char *fmt, void *a1, void *a2, void *a3);
> ...
>=20
> This is causing issues throughout the code where osi_Panic is assumed =
to
> be va-capable (mostly in src/afs and src/rx).  While I could go =
through
> and #ifdef every reference, I'm hoping someone might have a more =
elegant
> solution.

I think the best solution here is just to remove the prototype from the =
definition. We've already done that in a number of places - so we'd have

extern void osi_Panic();

for those platforms. This is what the code was originally, before I =
started attacking it with a liberal scattering of prototypes.

S.