[OpenAFS-devel] Refactoring the Solaris libafs code base

Dale Ghent daleg@umbc.edu
Thu, 28 Dec 2006 00:44:09 -0500


Russ Allbery wrote:

> At least in user-space code (I don't know if kernel-space is special), at
> least all of the following C headers can be included without any guards on
> any Unix platform we care about:
> 
...
> string.h

Not this one, at least on Solaris. It collides with <sys/systm.h> if 
_KERNEL is defined.

I found this out this evening after testing the string.h patch from Sean 
(thanks Sean!)

sys/systm.h is completely wrapped in a _KERNEL ifdef, and breaks the 
compilation of xdr_array.c if string.h is also included. The colliding 
prototype is for ffs:

sys/systm.h:  int ffs(long)
string.h:     int ffs(int)

/dale

-- 
Dale Ghent
UNIX Systems Specialist
UMBC - Office of Information Technology
ECS 201 - x51705