[OpenAFS-devel] string.h or strings.h

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 30 Jul 2001 16:15:54 -0400 (EDT)


On 29 Jul 2001, Patrick J. LoPresti wrote:

> Chas Williams <chas@cmf.nrl.navy.mil> writes:
> 
> > i would also be happy if string.h was the default instead of strings.h
> >  string.h is usually considered to be more correct.  strings.h usually
> > contains the older bsd routines bcmp, etc which are generally
> > considered deprecated.
> 
> You are right; string.h is ISO C and therefore POSIX, whereas
> strings.h is not guaranteed to provide anything in particular.
> 
> If you do include just string.h, you should rely only on things which
> are guaranteed to be declared there:
> 
>   http://www.opengroup.org/onlinepubs/7908799/xsh/string.h.html
> 
> Restricting yourself to these and avoiding the old BSD-isms is
> arguably a good idea.

The thing people seem to be missing is that AFS makes heavy use of the old
BSD-isms, having been written in that era to run on BSD systems.  Until
this changes, the "right" thing to do for AFS is probably to do what is
needed to satisfy its desire for the bsd-ish interfaces. 

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA