Commit graph

609 commits

Author SHA1 Message Date
Robin Sommer
9d407d882c Two small infrastructure extensions for passing information into the
logging framework.

- To enable passing a type into a bif, there's now a new
  BroType-derived class TypeType and a corresponding TYPE_TYPE tag.
  With that, a Val can now have a type as its value.

  This is experimental for now.

- RecordVal's get a new method CoerceTo() to coerce their value into a
  another record type with the usual semantics. Most of the code in
  there was previously in RecordContructorExpr::InitVal(), which is
  now calling the new CoerceTo() method.
2011-02-18 13:01:34 -08:00
Gregor Maier
2aae4eaf91 New fix for OS X 10.5 compile error wrt llabs() 2011-02-09 15:52:32 -08:00
Gregor Maier
104c7da205 Revert "Fix for OS X 10.5 compile error wrt llabs()"
This reverts commit 3f6aa735e9.

Using abs() does not work if the integer is >2^32 (or <2^32).
Will add a new fix in next commit.
2011-02-09 15:40:36 -08:00
Seth Hall
2be835c4e8 Merge branch 'master' into topic/logging-framework 2011-01-20 16:32:29 -05:00
Robin Sommer
75335b933e Removing global_attrs from parser, per #11, and also record
attributes. Both aren't used anywhere. Along with these goes some
more now unused code.

Closes #11.
2011-01-19 18:00:09 -08:00
Seth Hall
f3b148b019 Checkpoint for logging framework 2011-01-19 09:36:06 -05:00
Jon Siwek
3f6aa735e9 Fix for OS X 10.5 compile error wrt llabs()
GCC < 4.1.0 possibly has a problem w/ choosing an llabs()
unambigiously from stdlib.h and cstdlib

See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13943
2011-01-06 17:06:51 -06:00
Jon Siwek
105d00b9b8 Fix ambiguous call to abs().
Observed on FreeBSD build that the compiler would emit an error claiming

  Val(abs(val.int_val), TYPE_COUNT)

is ambiguous because it can't make a choice between cstdlib's
"int abs(int)" or "long abs(long)" signatures.  And actually, since
we now always use 64 bit integers for bro_int_t, we can use
"long long llabs(long long)".
2010-11-17 20:38:35 -06:00
Robin Sommer
61757ac78b Initial import of svn+ssh:://svn.icir.org/bro/trunk/bro as of r7088 2010-09-27 20:42:30 -07:00