Command syntax problem

Charles Hewson cahewson at eskimo.com
Sat Sep 25 17:16:05 CEST 2004


On Fri, 24 Sep 2004, David Relson wrote:

> On Fri, 24 Sep 2004 17:55:30 -0700 (PDT)
> Charles Hewson wrote:
>
> ...[snip]...
>
> > The extern statement seems to have worked;
>
> ...[snip]...
>
> > extern double strtod (char *, char **);
> >
> > ...
> >
> > [cahewson] ./Bogofilter-new/bin/bogofilter -C -D -v -M -o0.45,0.4 -Q
> > sc 0.0000, hc 0.0000
> > val 0.4500
> > val 0.4000
> > sc 0.4500, hc 0.4000
> > # bogofilter version 0.92.6
>
> Good stuff!  Now we know that the definition of strtod() is needed!
>
> > Grep doesn't like -r on SunOS;
> >
> > [cahewson] grep -r -w strtod /usr/include/
> > grep: illegal option -- r
> > usage: grep [-[[AB] ]<num>] [-[CEFGVchilnqsvwx]] [-[ef]] <expr>
> > [<files...>]
>
>
> As a wild guess, replace the extern statement with:
>
>    #include <math.h>
>
> Also, try this instead of "grep -r":
>
>   find /usr/include -name "*.h" -print | xargs grep strtod
>
> David
> _______________________________________________
> Bogofilter mailing list
> Bogofilter at bogofilter.org
> http://www.bogofilter.org/mailman/listinfo/bogofilter
>
[cahewson] find /usr/include -name "*.h" -print | xargs grep strtod
find: cannot chdir to /usr/include/openssl: Permission denied
/usr/include/floatingpoint.h:extern double   strtod();
[cahewson]

#include <floatingpoint.h>

This also works.

Charles



More information about the Bogofilter mailing list