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

Eddie Kohler kohler at cs.ucla.edu
Fri Aug 31 14:10:45 EDT 2007


Hey Christian,

Christian Kreibich wrote:
> 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.

A ha!  Well <click/config.h> will automatically include config-userlevel.h 
when necessary -- it is better style to just include <click/config.h>.

> 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*)           
> [...]

Nice.  I've checked in a fix for this.

Eddie





More information about the click mailing list