[vbox-dev] build failure on OS/2 due to RT_MAX

Andy Willis abwillis1 at gmail.com
Fri Apr 18 16:25:25 GMT 2008


I tried adding #include <VBox/cdefs.h> to array.h but that didn't 
help.  I ended up taking from cdefs.h and adding to array.h:
#ifdef RT_OS_OS2
/* Undefine RT_MAX since there is an unfortunate clash with the max
    resource type define in os2.h. */
# undef RT_MAX

/** @def RT_MAX
  * Finds the maximum value.
  * @returns The higher of the two.
  * @param   Value1      Value 1
  * @param   Value2      Value 2
  */
#define RT_MAX(Value1, Value2)  ((Value1) >= (Value2) ? (Value1) : 
(Value2))
#endif

This works but I am not certain this is the best way to do it.
Seeings as all the code was taken from other parts I don't see it as 
requiring me to release it but just in case, if this is desired to be 
implemented and needs it then anything on my part I release to public 
domain.

Andy





More information about the vbox-dev mailing list