-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
During the work on #3022, @BytesGalore noted that adding the possibility to set constants on compile time the way we do it currently doesn't set the constant everywhere (I'll just qute him):
@Lotterleben changed to configure on compile time, but this may produce unwanted side-effects.
The defines are set right for the FIB/Universal address only (bad news).When including the
ng_fib.h
in a main, for instance in thehello-world
example (withUSEMODULE += fib
of course) and calling saymake UNIVERSAL_ADDRESS_SIZE=17
,
the main will use theUNIVERSAL_ADDRESS_SIZE
default value of16
, while the FIB will initialize and use it with the new value17
. (same applies for all other defines)You can reproduce it by e.g. printing the value of the defines in the FIB (e.g. in
fib_init()
) and in the main accordingly.
So I recommend to not provide this compile time configuration.
This is done in at least one other instance, namely the RPL Makefile (https://github.com/RIOT-OS/RIOT/blob/9ecaea4038d401659f79e6ee93b82692c90c2372/sys/net/routing/rpl/Makefile).