[Click] Two quick patches regarding ELEMENT_LIBS() and long long vs int64

Christian Kreibich christian at icir.org
Fri Aug 31 14:04:40 EDT 2007


Hi Eddie,

On Fri, 2007-08-31 at 08:29 -0700, Eddie Kohler wrote:
> Hi Christian,
> 
> Thanks and thanks!!
> 
> First patch: The normal way to do this, for example in gcc's __attribute__ 
> syntax, is with an extra pair of parentheses, and this is what I have checked 
> in -- preferable because you won't have problems with linker arguments that 
> contain quotes.

Ah, much nicer. Thanks!

> Second patch: Why isn't HAVE_LONG_LONG defined on your system?!?!?!?!??!?! 
> Can you look at config.log and tell me?  In the meantime your patch is totally 
> fine anyway and is checked in.

I looked into it a little more. It's my fault. I have a library that
parses a certain kind of configuration files, and I'm using it across a
few elements. The library uses Click classes, but is not a Click element
itself. It turns I erroneously used this:

  #include <click/config-userlevel.h>
  #include <click/config.h>

Changing it to

  #include <click/config.h>
  #include <click/config-userlevel.h>

solved the problem since HAVE_LONG_LONG is in fact alive and well --
sorry.

ps: I initially tried --disable-int64, but that caused the Click build
to break:

  CXX ../lib/confparse.cc
../lib/confparse.cc: In function ‘bool cp_file_offset(const String&, off_t*)’:
../lib/confparse.cc:924: error: no matching function for call to ‘cp_integer(const String&, uint64_t*)’
../lib/confparse.cc:763: note: candidates are: const char* cp_integer(const char*, const char*, int, int32_t*)           
[...]

-- 
Cheers,
Christian




More information about the click mailing list