"Guy Harris" <[EMAIL PROTECTED]> said: > Is "_fmode" some kind of global on Windows?
Yes, defined in <stdlib.h> for MingW and MSVC (and most DOS compilers). MingW: #define _fmode (*_imp___fmode) > > Does > > #ifndef O_BINARY > #define O_BINARY 0 /* UNIX */ > #endif > > ... > > fd = open(fname, O_RDONLY|O_BINARY); > > also work? (That's what we do in Ethereal to open files in binary > mode.) It seems a bit cleaner. Agreed, it seems cleaner. And it works with MingW. I've not setup the project files to test with MSVC, but assume it will works. Found only MSDN documentation for _open(). It accepts O_RDONLY|O_BINARY. Assume open() is compatible. > > > Also need this patch in libpcap: > > ------------------------------------------- > > --- ./scanner.l.orig Fri Dec 6 00:01:36 2002 > > +++ ./scanner.l Sat Feb 8 14:58:28 2003 > > @@ -276,7 +276,7 @@ > > connectmsg return CONNECTMSG; > > metaconnect return METACONNECT; > > > > -[ \n\t] ; > > +[ \r\n\t] ; > > In another thread you said > > Exactly. scanner.l doesn't understand '\'r' in line-endings. I > tried to modify scanner.l to say "[ \r\n\t] ;" instead of "[ > \n\t] ;", but that didn't work. So I modified read_infile() to > strip all CR and LF from buffer and now it works. > > so does that now work? Must have been mistaken the 1st time (or forgot to rebuild the .dll). Gisle V. - This is the TCPDUMP workers list. It is archived at http://www.tcpdump.org/lists/workers/index.html To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe
