Sean O'Malley <[EMAIL PROTECTED]> writes: > I -just- submitted a patch to clean up missing string.h headers. > basically it either added a string.h header file or changed #include > <string.h> to:
> #ifdef HAVE_STRING_H > #include <string.h> > #else > #ifdef HAVE_STRINGS_H > #include <strings.h> > #endif > #endif Surely we don't care about K&R compilers any more and can write this as: #if HAVE_STRING_H # include <string.h> #elif HAVE_STRINGS_H # include <strings.h> #endif which is quite a bit more readable. However, you really don't need this at all, I bet. > (I assume strings.h is needed by the BSD port because it doesnt have > string.h thus I left it in..) I'm pretty sure there are no platforms outside of a museum that lack <string.h> and we can just include it unconditionally. The last system I know of without <string.h> was SunOS. > 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 There is no need to ifdef fcntl.h unless the code has to also compile on Windows (and there, I'm not sure if fcntl.h is available or not). We don't care about SunOS any more. -- Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/> _______________________________________________ OpenAFS-devel mailing list OpenAFS-devel@openafs.org https://lists.openafs.org/mailman/listinfo/openafs-devel