bro and FreeBSD 5.0

I've been trying to get bro to compile properly under FreeBSD 5.0. It looks
  like the change to gcc3 broke some things. I've attached a patch that gets
  the compile further along than initially, but I got stuck. Of course this
  causes the compiler to kvetch about using depricated headers. Here's the
  error message that has me stumped:

g++ -I. -Ilibedit -O -c DebugCmds.cc
In file included from /usr/include/g++/backward/map.h:59,
                 from Type.h:29,
                 from ID.h:25,
                 from Expr.h:28,
                 from Debug.h:25,
                 from DebugCmds.cc:11:
/usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
DebugCmds.cc: In function `int find_all_matching_cmds(const std::string&, const
   char**)':
DebugCmds.cc:164: invalid conversion from `const char*' to `unsigned int'
DebugCmds.cc:164: initializing argument 1 of `int std::basic_string<_CharT,
   _Traits, _Alloc>::compare(_Alloc::size_type, _Alloc::size_type, const
   _CharT*) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc
   = std::allocator<char>]'
DebugCmds.cc:164: invalid conversion from `unsigned int' to `const char*'
DebugCmds.cc:164: initializing argument 3 of `int std::basic_string<_CharT,
   _Traits, _Alloc>::compare(_Alloc::size_type, _Alloc::size_type, const
   _CharT*) const [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]'
*** Error code 1

  I can't seem to get it to find the hash<> templates.

  I'm guessing that someone with more experience in C++ would be able to see
  what's going on. I have very little experience with templates, etc in C++.

  Also, the parse.y doesn't seem to be compatible with bison, I had to force
  the Makefile to use the system yacc (byacc).

Jon

bro-0.8a20-fbsd5.patch (2 KB)

Can you try the attached patch? There seems to be some incompatibility
from gcc <3.0 to >= 3.0.

Robin

a.diff (526 Bytes)