groff
[Top][All Lists]
Advanced

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

Re: [Groff] [PATCH] compiling error on grolbp with latest CVS update


From: Werner LEMBERG
Subject: Re: [Groff] [PATCH] compiling error on grolbp with latest CVS update
Date: Sat, 10 Jun 2000 10:33:03 +0000 (GMT)

> lbp.cc:37: declaration of C function `int strncasecmp(const char *,
>            const char *, int)' conflicts with 
> /usr/include/strings.h:52: previous declaration `int
>            strncasecmp(const char *, const char *, unsigned int)' here 
> 
> With all evidence, there's a typo in the lbp.cc file. Here's a patch for
> it:
> 
> -#ifdef HAVE_STRNCASECMP
> +#ifndef HAVE_STRNCASECMP
>  extern "C" {
>    // SunOS's string.h fails to declare this.
>    int strncasecmp(const char *, const char *, int);

This is the wrong patch.  The very problem is that certain old
versions of Sun's compiler actually has strncasecmp() but no prototype
for it.

The right fix would be to use `size_t' instead of `int'.  Ken, can you
please check whether `size_t' works?

Or is there a better solution?


    Werner


reply via email to

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