[PATCH] Include <strings.h> on Solaris for bzero definition

Guillem Jover guillem at hadrons.org
Wed Apr 25 13:59:41 PDT 2012


On Sat, 2012-02-25 at 10:29:49 -0800, Alan Coopersmith wrote:
> SVR4 OS'es put the ANSI standard funcs (memcpy, memset, etc) in <string.h>
> and the BSD compatibility funcs (bcopy, bzero, etc) in <strings.h>
> 
> If you look in <X11/Xos.h> you'll see other OS'es needed this as well
> in the past, but Solaris is the only one of those libxkbcommon is being
> ported to.

> diff --git a/src/XKBcommonint.h b/src/XKBcommonint.h
> index def7224..1a25b4e 100644
> --- a/src/XKBcommonint.h
> +++ b/src/XKBcommonint.h
> @@ -29,6 +29,9 @@ authorization from the authors.
>  
>  #include <stdlib.h>
>  #include <string.h>
> +#ifdef __sun
> +#include <strings.h>
> +#endif

Given that POSIX specifies that strcasecmp (and frinds) come from
<strings.h> it might make sense to just unconditionally include that?

thanks,
guillem


More information about the xorg-devel mailing list