[Olsr-dev] libnetlink, linux and olsr

Hans-Christoph Steiner (spam-protected)
Mon Oct 22 17:31:38 CEST 2012

On 10/22/2012 05:01 AM, Henning Rogge wrote:
> On 10/19/2012 11:06 AM, Kees-Jan Hermans wrote:
>> Ok. Here's the diff. I must verify a few things with you:
>> - The way to 'transport' a configuration value to the module is now via
>> global variables and 'extern' definitions in the yacc file. Which is
>> IMHO, a kludge - ugly C. I couldn't find an example of how to do this
>> properly in other lq plugins though.
> Yes... you need to add a variable to the global "olsr config" struct.
>> - I have assumed that the $(OS) definitions as used in the Makefile
>> aren't somehow mutually inclusive. That is, 'android' doesn't also
>> trigger 'linux'.
> OS=Android implies __linux__ of course.
> But the OS variable itself can only contain a single value.

The OS variable is only for the olsrd build system.  Each system's compiler
sets relevant system detection macros.  So GNU/Linux's gcc sets __linux__ and
__gnu_linux__, Android's gcc sets __linux__ since it uses the Linux kernel,
but not __gnu_linux__ since Android is not GNU nor UNIX.  Mac OS X's gcc sets
neither, etc. etc.


>> - I made adjustments to Makefile.inc in what I don't know are the right
>> place.
>> - The configuration names as in the lex file are the result of my
>> imagination. I camelcased what I thought would be proper. Feel free to
>> adjust.
>> KJ
>> - There is still no way to separate out the older libnl libraries (which
>> have completely different names). So keep expectations low - I expect
>> errors.
> Compile-Errors?
> Henning Rogge

More information about the Olsr-dev mailing list