[OpenAFS-devel] Refactoring the Solaris libafs code base

Marcus Watts mdw@umich.edu
Wed, 27 Dec 2006 22:10:13 -0500


Many wrote:
...
> Russ Allbery wrote:
> >> #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.
> 
> fcntl.h is available on Windows.  The typical issue is that some of the
> preprocessor symbols you expect to find on UNIX do not exist on Windows.
> 
> Jeffrey Altman

fcntl.h has been in bsd since 4.2, in AT&T since system III, in SunOS since
it was called Sun UNIX, and in linux since presumably its start.  Since it's
clearly in windows a well, it should be safe to include it everywhere needed
with no configure test or #ifdef logic.

string.h has been in bsd since 4.4bsd, and in AT&T since system 5.  It
wasn't in 4.2bsd, sunos, etc, but as people have pointed out
this probably doesn't matter.  I doubt there are any supported platforms
for AFS where there needs to configured ifdef logic when including it.

				-Marcus Watts