Norman Vine writes:
> Curtis L. Olson writes:
> 
> 
> > Norman Vine writes:
> > > this patch have solved the min/max problems
> > > 
>http://cvs.flightgear.org/cgi-bin/viewcvs/viewcvs.cgi/SimGear/simgear/compiler.h.diff?r1=1.1&r2=1.2&cvsroot=SimGear-0.3
> > > as long as WIN32 is defined when the header is parsed
> > 
> > I assume since you refer to a cvs version, the patch is there already
> > and I don't need to take further action.
> 
> Yes ... but note WIN32 *must* be defined when this header is parsed
> Not really sure this is the case unless one uses technique outlined here
> http://seneca.me.umn.edu/pipermail/flightgear-devel/2002-November/013349.html
> 
> ie "simgear_config.h" will *not* have been parsed

That is *really* *really* ugly though.  Does cygwin gcc export some
symbol we can check for to determine if we need to define NOMINMAX.
What if we avoided using min() max() in our code and used slightly
different function names?

Or, what if we use:

  #if defined(__CYGWIN32__) || defined( MSVC ) || defined( MINGWIN ) etc.
     // keep windows.h from #defining min() max() macros
  #  define NOMINMAX
  #endif

Regards,

Curt.
-- 
Curtis Olson   IVLab / HumanFIRST Program       FlightGear Project
Twin Cities    [EMAIL PROTECTED]                  [EMAIL PROTECTED]
Minnesota      http://www.menet.umn.edu/~curt   http://www.flightgear.org

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to