[olsr-dev] Mac osX compile problems

Andreas Tønnesen (spam-protected)
Fri Nov 5 12:51:23 CET 2004


Hi,

Agreed - using FALSE/TRUE was asking for trouble ;-)

They are now known as OLSR_TRUE/OLSR_FALSE in CVS

- Andreas

> Hi Mihi,
>
> Looks like the OS X include files define TRUE and FALSE als macros.
> Let's assume the OS X include files do this as follows:
>
> #define TRUE 1
> #define FALSE 0
>
> Then line 49 will be "0 = 0" => error. So, you migh want to do a
>
> "find /usr/include -type f -exec grep TRUE {} \; -print"
>
> to find out where the TRUE and FALSE constants are defined and then say
> "#undef TRUE" and "#undef FALSE" after the offending include files have
> been included.
>
> But then again, this could also be solved differently:
>
> Andreas, should we rename TRUE and FALSE to OLSR_TRUE and OLSR_FALSE? I
> had the same problems on Windows and other OSes might also have had the
> idea of using TRUE and FALSE als boolean constants. Well, using TRUE and
> FALSE is a pretty obvious choice that is begging for collisions. :-)
>
> Geeeez. Collisions everywhere. Symbols on MIPS, constants on OS X.
>
> -Thomas
>
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev
>


---------
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list