[Snort-devel] Re: [snort-cvs] CVS: snort rules.c,1.10,1.11

Bill Marquette wlmarque at ...10...
Tue Oct 24 10:40:59 EDT 2000


snprintf is in my version of Solaris...2.6 which is admittedly old

Standard I/O Functions                                 printf(3S)
NAME
     printf, fprintf, sprintf, snprintf - print formatted output

SYNOPSIS
     #include <stdio.h>

     int printf(const char *format, /* args */ ... );
     int fprintf(FILE *strm, const char *format,
           /* args */ ... );
     int sprintf(char *s, const char *format, /* args */ ...);
     int snprintf(char *s, size_t n, const char *format,
          /* args */ ...);

do newer releases not contain snprintf?

as for isblank...the OpenBSD sources clearly mention that it's not POSIX or ANSI
     #if !defined(_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
     #if notyet
     #define isblank(c)      ((_ctype_ + 1)[(unsigned char)(c)] & _B)
     #endif

I can't say that isblank is _standard_ although admittedly it would be nice; I
agree it's a flaw in Solaris and that Solaris is rather ummm...broken, but I
don't think it's fair to say that isblank() is a standard function when it's not
part of a standard.  Sorry, I just had to stick up for an OS that I'm not
particularly fond of but have to use on a daily basis (and patch code for from
time to time).

--Bill




From: Jed Pickel <jpickel at ...64...> on 10/23/2000 05:55 PM

To:   snort-cvsinfo at lists.sourceforge.net
cc:
Client:
Subject:  [snort-cvs] CVS: snort rules.c,1.10,1.11



Update of /cvsroot/snort/snort
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4368

Modified Files:
     rules.c
Log Message:
Quick fix because "isblank" is not on Solaris...

What is the deal with Solaris -- seems to be missing many standard
functions (ie. snprintf)?


Index: rules.c
===================================================================
RCS file: /cvsroot/snort/snort/rules.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** rules.c    2000/10/12 07:12:01 1.10
--- rules.c    2000/10/23 22:55:00 1.11
***************
*** 136,140 ****
  #endif
          /* advance through any whitespace at the beginning of the line */
!         while( isblank((int) *index) )
              index++;

--- 136,140 ----
  #endif
          /* advance through any whitespace at the beginning of the line */
!         while( *index == ' ' || *index == '\t' )
              index++;


_______________________________________________
Snort-cvsinfo mailing list
Snort-cvsinfo at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/snort-cvsinfo









More information about the Snort-devel mailing list