[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strncasecmp dcl

From: Werner LEMBERG
Subject: Re: strncasecmp dcl
Date: Wed, 20 Jun 2001 22:11:53 +0200 (CEST)

> GROFF_NEED_DECLARATION includes headers in a fashion considerably
> different from "lib.h".  This causes NEED_DECLARATION_STRNCASECMP to
> be defined on a system having it, which can cause conflict between
> dcls in "lib.h" and <strings.h>.
> --- /home/gin/celesta/groff-1.17/aclocal.m4   2001/06/20 10:37:17     1.1
> +++ /home/gin/celesta/groff-1.17/aclocal.m4   2001/06/20 10:38:59     1.2
> @@ -492,10 +492,9 @@
>  #include <stdio.h>
>  #ifdef HAVE_STRING_H
>  #include <string.h>
> -#else
> +#endif
>  #ifdef HAVE_STRINGS_H
>  #include <strings.h>
> -#endif
>  #endif
>  #ifdef HAVE_STDLIB_H
>  #include <stdlib.h>

Hmm, this is a difficult topic.  On older systems it is possible that
you can include either `string.h' or `strings.h' but not both at the
same time.  ANSI C99 fixes this by making `strings.h' an official
header, moving all string functions inherited from BSD to this file.

How can this be fixed properly?  The above code snippet is shown in
the autoconf info file of version 2.50, but recent systems doesn't
seem to like it (as you've pointed out).  Can the autoconf community
give some advice?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]