[Snort-devel] Re: [Snort-users] CVS Build w/ Solaris?
fygrave at ...1...
Sun Feb 18 12:28:39 EST 2001
On Sat, Feb 17, 2001 at 11:31:39AM -0800, Erek Adams wrote:
> On Sun, 18 Feb 2001, Fyodor wrote:
> > Ooops.. overlooked this portability issue in the patch which I committed
> > yesterday. I just committed a fix, works for me on solaris now.
> Well... Now I'm getting a different one. :) In some testing late last night,
> I backed out the umask patch, then tried the compile. When I did, I got the
> same error.
I committed a fix by replacing strsep with ISO C compliant strtok, but got stumbled with a question too:
Do we want to keep using strsep in our code and supply our own version of the function if needed, or we
want to be ISO C compiant (in this particular case :)) and just fix up our parsers abit to remove leading
spaces/delimeters in strtok returned tokens? :)
Quoting strsep(3) :
The strsep() function is intended as a replacement for the strtok() func-
tion. While the strtok() function should be preferred for portability
reasons (it conforms to ISO 9899: 1990 (``ISO C'')) it is unable to han-
dle empty fields, i.e. detect fields delimited by two adjacent delimiter
characters, or to be used for more than a single string at a time. The
strsep() function first appeared in 4.4BSD.
More information about the Snort-devel