[Snort-devel] snprintf: grrr....

Fyodor fygrave at ...1...
Wed Nov 1 04:16:41 EST 2000


On Tue, Oct 31, 2000 at 09:39:36PM -0500, Martin Roesch wrote:
> This wasn't happening the other day, and now I can't get the fargin'
> thing to compile:
> 
> snprintf.c:234: `sys_nerr' undeclared (first use in this function)
> snprintf.c:234: (Each undeclared identifier is reported only once
> snprintf.c:234: for each function it appears in.)
> snprintf.c:240: `sys_errlist' undeclared (first use in this function)
> 
> Here's the declaration in snprintf.c:
> 
> # if !HAVE_STRERROR && !defined(ERRLIST_PREDEFINED)
>         extern char *sys_errlist[];
>         extern int sys_nerr;
> # endif
> 


Basically I changed `HASSTRERROR' to standard configure definition `HAVE_STRERROR', which
gets defined in config.h if function is present. Obviously missed another HASSTRERROR
definition down in the code *oops* :). Also added ERRLIST_PREDEFINED since on freeBSD
you get warnings if you igore this. I think we could go along fixing/adding other defines
on the way we need them. Sendmail definetely supports much more platforms that we do with
snort, so with some we don't have to be bothered. (like non-ansi compiant compiler, one
day we may want to make a step forward to support it as well).





More information about the Snort-devel mailing list