octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patches for MSVC


From: John W. Eaton
Subject: Re: Patches for MSVC
Date: Mon, 22 Feb 2010 08:54:26 -0500

On 22-Feb-2010, Benjamin Lindner wrote:

| > >> Well, MinGW provides its own version of windows.h, while I'm using
| > >> the standard MS Platform SDK. I guess the MinGW version does not
| > >> provides a #define for min/max.
| > >
| > > Yes it does, in windef.h
| > >
| > > #ifndef NOMINMAX
| > > #ifndef max
| > > #define max(a,b) ((a)>(b)?(a):(b))
| > > #endif
| > > #ifndef min
| > > #define min(a,b) ((a)<(b)?(a):(b))
| > > #endif
| > > #endif
| > >
| > > So -DNOMINMAX would be also required for mingw platform.
| > 
| > I already submitted the change, but NOMINMAX is only defined
| > under MSVC. You'll have to adapt the test in configure.ac to
| > support MinGW platform as well.
| 
| Ok, I'll see to it.

Instead of using AC_DEFINE, maybe it should be added to the AH_BOTTOM
section with something like

  #if defined (OCTAVE_USE_WINDOWS_API)
  #define NOMINMAX
  #endif

?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]