[tlbuild] build failure: libs/zziplib/zziplib-0.13.58/zzip/stat.c needs #include <strings.h> for strcasecmp

Philipp Stephani st_philipp at yahoo.de
Thu May 27 22:52:00 CEST 2010


Am 27.05.2010 um 19:37 schrieb Karl Berry:

>    linux man page for strcasecmp says that it is defined in <strings.h>
>    as well..
> 
> So it does, missed that.  Seems equally wrong.  So I wonder how it was
> ever found.  It certainly compiles for me (and everyone else).

On Linux and Mac OS X, strcasecmp is declared in string.h *and* strings.h; strings.h checks for string.h and doesn't redeclare them if string.h was already included. A comment in strings.h says

/* We don't need and should not read this file if <string.h> was already
   read. The one exception being that if __USE_BSD isn't defined, then
   these aren't defined in string.h, so we need to define them here.  */

However, POSIX makes it clear that strings.h must be included for strcasecmp.


More information about the tlbuild mailing list