Mercurial > hg > octave-lyh
diff liboctave/oct-inttypes.h @ 8319:c374691576f6
Fix for MSVC compilation
author | Michael Goffioul <michael.goffioul@gmail.com> |
---|---|
date | Wed, 12 Nov 2008 21:36:39 +0000 |
parents | ad5bb02d267a |
children | 9238637cb81c |
line wrap: on
line diff
--- a/liboctave/oct-inttypes.h +++ b/liboctave/oct-inttypes.h @@ -39,6 +39,12 @@ inline long double xround (long double x) { return roundl (x); } #endif +// Undefine min/max if needed (this may happen under Windows) +#ifdef min +#undef min +#undef max +#endif + // FIXME: we define this by our own because some compilers, such as MSVC, // do not provide std::abs (int64_t) and std::abs (uint64_t). In the future, // it should go away in favor of std::abs.