qnx6 patches

David Shaw dshaw at jabberwocky.com
Sun Apr 15 22:00:59 CEST 2007


On Sun, Apr 15, 2007 at 09:24:58PM +0200, Werner Koch wrote:
> On Sun, 15 Apr 2007 20:58, dshaw at jabberwocky.com said:
> 
> >>  #include <string.h>
> >> +#include <strings.h>
> >
> > I assume the various <strings.h> changes are for strcasecmp().
> 
> I consider the use of strings.h as a bad choice.  It defines legacy
> functions like bcmp and index and especially the latter one will lead to
> a lot of warnings in some code.

This is true, but nevertheless, POSIX does place strcasecmp in
strings.h.  It works on glibc and most other systems anyway, as there
is a second copy of strcasecmp in string.h, but that's not POSIX.
glibc systems actually define bcmp and index and the like in string.h
(unless strict POSIX is requested), so we aren't really avoiding those
functions by avoiding strings.h.

> Anyway strcasecmp is locale dependend and should thus be avoided.  In
> general we use the ascii_* replacements.

Unless the goal is to be locale dependent (for the group name stuff,
for example).

David



More information about the Gnupg-devel mailing list