[OpenAFS-devel] Re: [patch] Refactoring the Solaris libafs code base

Sean O'Malley omalleys@msu.edu
Wed, 27 Dec 2006 08:28:54 -0500 (EST)


> > 2) Clean up src/afs/SOLARIS code.
> >
> I -just- submitted a patch to clean up missing string.h headers.
> basically it either added a string.h header file or changed

(but i don't think it touches much of the src/afs/SOLARIS directory..)

If I need to ifdef these so they are more platform specific, I will do it.
They are global right now and I don't want to break anything. That patch
cuts the compiler warnings from ~4500 down to ~3750 on Solaris or at least
it did with the recompile. I didn't test these on another platform. I just
assume and possibly incorrectly, it might fix compiler warnings on other
platforms also. Since I was going to ifdef the fcntl.h headers the
same way, it is helpful to know whether I need to make these more platform
specific.

> #include <string.h> to:
>
> #ifdef HAVE_STRING_H
> #include <string.h>
> #else
> #ifdef HAVE_STRINGS_H
> #include <strings.h>
> #endif
> #endif
>
> And a couple of places where the afs headers werent getting pulled in
> where HAVE_STRING_H is being defined.. It was done almost everywhere
> except the NT/ branch.
>
> (I assume strings.h is needed by the BSD port because it doesnt have
> string.h thus I left it in..)
>
> If you want this patch before it gets applied to cvs head. Let me know. I
> can send it to ya.
>
> I was going to attempt to ifdef fcntl.h and add it next...
>
> ie basically the same as string.h but
>
> #ifdef HAVE_FCNTL_H
> #include <fcntl.h>
> #endif
>
> This should mainly fix open/open64 implicit declarations.

--------------------------------------
  Sean O'Malley, Information Technologist
  Michigan State University
-------------------------------------